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

perps_pair_stats

24-hour price/volume stats for one pair.

Signature

def perps_pair_stats(self, pair_id: PairId) -> PerpsPairStats

Example

from dango.info import Info
from dango.utils.constants import MAINNET_API_URL
from dango.utils.types import PairId
 
info = Info(MAINNET_API_URL, skip_ws=True)
stats = info.perps_pair_stats(PairId("perp/ethusd"))
print("mid:", stats["currentPrice"], "24h vol:", stats["volume24H"])

Parameters

pair_idPairId.

Returns

PerpsPairStats — TypedDict with pairId, currentPrice, price24HAgo, volume24H, priceChange24H. Keys are camelCase (indexer wire shape). See PerpsPairStats.

Notes

  • Some fields (currentPrice, price24HAgo, priceChange24H) can be None when the pair has no recorded trades in the lookback window.

See also