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

getPrices

Read oracle prices, paginated.

Signature

function getPrices(
  client: Client,
  parameters?: {
    startAfter?: Denom
    limit?: number
    height?: number
  },
): Promise<Record<Denom, Price>>

Example

import { createPublicClient, createTransport, testnet } from "@left-curve/sdk"
 
const client = createPublicClient({ chain: testnet, transport: createTransport() })
const prices = await client.getPrices({ limit: 100 })
console.log(prices["bridge/usdc"]?.humanizedPrice)

Parameters

startAfterDenom, optional. Denom to start after.

limitnumber, optional. Maximum entries.

heightnumber, optional. Block height. Default 0 (latest).

Returns

Record<Denom, Price> — each Price is { humanizedPrice, humanizedEma, precision, timestamp }.

See also