Skip to Content
API ReferenceREST APIGET /market/[id]/stats

GET /market/{id}/stats

Returns detailed statistics for a specific market, including funding rates and price information.

Request

Path Parameters:

NameTypeRequiredDescription
idnumberYesMarket ID (e.g., 0 for BTC/USD)
curl https://zo-mainnet.n1.xyz/market/0/stats

Response

{ "indexPrice": null, "indexPriceConf": null, "frozen": true, "volumeBase24h": 1, "volumeQuote24h": 1, "high24h": null, "low24h": null, "close24h": null, "prevClose24h": null, "perpStats": null }

Response Fields

FieldTypeDescription
indexPricenumber | nullCurrent oracle index price
indexPriceConfnumber | nullIndex price confidence interval
volumeBase24hnumber24h volume in base asset
volumeQuote24hnumber24h volume in quote asset (USD)
high24hnumber | null24h high price
low24hnumber | null24h low price
close24hnumber | nullCurrent 24h close price
prevClose24hnumber | nullPrevious 24h close price
frozenbooleanWhether the market is frozen

perpStats Object

FieldTypeDescription
mark_pricenumberCurrent mark price
funding_ratenumberCurrent hourly funding rate
next_funding_timestringNext funding timestamp (ISO 8601)
open_interestnumberTotal open interest in base units
aggregated_funding_indexnumberCumulative funding index

Example: Python

import requests market_id = 0 # BTC/USD response = requests.get(f"https://zo-mainnet.n1.xyz/market/{market_id}/stats") stats = response.json() print(f"Index Price: ${stats['indexPrice']:,.2f}") print(f"Funding Rate: {stats['perpStats']['funding_rate']:.4%}") print(f"Open Interest: {stats['perpStats']['open_interest']:,.2f} BTC")

Fetching Multiple Markets

import requests from concurrent.futures import ThreadPoolExecutor market_ids = [0, 1, 2] # BTC, ETH, SOL def fetch_stats(market_id): resp = requests.get(f"https://zo-mainnet.n1.xyz/market/{market_id}/stats") return (market_id, resp.json()) with ThreadPoolExecutor(max_workers=3) as executor: all_stats = list(executor.map(fetch_stats, market_ids)) for market_id, stats in all_stats: print(f"Market {market_id}: {stats['perpStats']['funding_rate']:.4%}")
Last updated on