GET /market/{id}/stats
Returns detailed statistics for a specific market, including funding rates and price information.
Request
Path Parameters:
| Name | Type | Required | Description |
|---|---|---|---|
id | number | Yes | Market ID (e.g., 0 for BTC/USD) |
curl https://zo-mainnet.n1.xyz/market/0/statsResponse
{
"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
| Field | Type | Description |
|---|---|---|
marketId | number | Market identifier |
indexPrice | number | Current oracle index price |
indexPriceConf | number | Index price confidence interval |
volumeBase24h | number | 24h volume in base asset |
volumeQuote24h | number | 24h volume in quote asset (USD) |
high24h | number | 24h high price |
low24h | number | 24h low price |
close24h | number | Current 24h close price |
prevClose24h | number | Previous 24h close price |
perpStats Object
| Field | Type | Description |
|---|---|---|
mark_price | number | Current mark price |
funding_rate | number | Current hourly funding rate |
next_funding_time | string | Next funding timestamp (ISO 8601) |
open_interest | number | Total open interest in base units |
aggregated_funding_index | number | Cumulative 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