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

{ "marketId": 0, "indexPrice": 97500.5, "indexPriceConf": 50.0, "volumeBase24h": 1250.5, "volumeQuote24h": 121923750.0, "high24h": 98500.0, "low24h": 96000.0, "close24h": 97500.0, "prevClose24h": 96800.0, "perpStats": { "mark_price": 97520.0, "funding_rate": 0.0001, "next_funding_time": "2026-01-15T12:00:00Z", "open_interest": 5000.0, "aggregated_funding_index": 1.0025 } }

Response Fields

FieldTypeDescription
marketIdnumberMarket identifier
indexPricenumberCurrent oracle index price
indexPriceConfnumberIndex price confidence interval
volumeBase24hnumber24h volume in base asset
volumeQuote24hnumber24h volume in quote asset (USD)
high24hnumber24h high price
low24hnumber24h low price
close24hnumberCurrent 24h close price
prevClose24hnumberPrevious 24h close price

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 resp.json() with ThreadPoolExecutor(max_workers=3) as executor: all_stats = list(executor.map(fetch_stats, market_ids)) for stats in all_stats: print(f"Market {stats['marketId']}: {stats['perpStats']['funding_rate']:.4%}")
Last updated on