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

getPerpsPairStats

Read 24h indexer-computed stats for a single perps pair.

Signature

function getPerpsPairStats(
  client: Client,
  parameters: { pairId: string },
): Promise<PerpsPairStats>

Example

import { createPublicClient, createTransport, testnet } from "@left-curve/sdk"
 
const client = createPublicClient({ chain: testnet, transport: createTransport() })
const stats = await client.getPerpsPairStats({ pairId: "BTC-PERP" })

Parameters

pairIdstring. Perps pair identifier.

Returns

PerpsPairStats{ pairId, currentPrice, price24HAgo, volume24H, priceChange24H }.

Notes

  • Sourced from the indexer's GraphQL schema. Indexer lag may apply.

See also