perps_pair_stats
24-hour price/volume stats for one pair.
Signature
def perps_pair_stats(self, pair_id: PairId) -> PerpsPairStatsExample
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_id — PairId.
Returns
PerpsPairStats — TypedDict with pairId, currentPrice, price24HAgo, volume24H, priceChange24H. Keys are camelCase (indexer wire shape). See PerpsPairStats.
Notes
- Some fields (
currentPrice,price24HAgo,priceChange24H) can beNonewhen the pair has no recorded trades in the lookback window.
See also
all_perps_pair_stats— every pair in one call