Are you an LLM? Read llms.txt for a summary of the docs, or llms-full.txt for the full context.
Skip to content

getPairStats

Read 24h indexer-computed stats for a single pair: current price, 24h-ago price, 24h volume, and 24h change.

Signature

function getPairStats(
  client: Client,
  parameters: {
    baseDenom: string
    quoteDenom: string
  },
): Promise<PairStats>

Example

import { createPublicClient, createTransport, testnet } from "@left-curve/sdk"
 
const client = createPublicClient({ chain: testnet, transport: createTransport() })
const stats = await client.getPairStats({
  baseDenom: "dango",
  quoteDenom: "bridge/usdc",
})

Parameters

baseDenomstring. Base asset denom.

quoteDenomstring. Quote asset denom.

Returns

PairStats{ baseDenom, quoteDenom, currentPrice, price24HAgo, volume24H, priceChange24H }.

Notes

  • Sourced from the indexer's GraphQL schema, not the on-chain DEX contract. Indexer lag may apply.

See also