GET /markets/live
Returns live market data including index prices, funding rates, mark prices, and open interest for all markets.
Request
curl https://zo-mainnet.n1.xyz/markets/liveResponse
{
"markets": [
{
"marketId": 0,
"indexPrice": 97500.0,
"indexPriceConf": 50.0,
"frozen": false,
"markPrice": 97520.0,
"projectedFundingRate": 0.0001,
"nextFundingTime": "2024-01-15T11:00:00Z",
"openInterest": 200.5
}
]
}Response Fields
MarketLiveInfo Object
| Field | Type | Description |
|---|---|---|
marketId | number | Market identifier |
indexPrice | number | null | Current oracle index price. Null only for a new market. |
indexPriceConf | number | null | Oracle confidence interval for index price |
frozen | boolean | Whether market is currently frozen |
markPrice | number | null | Current mark price of the perpetual. Null only for a new market. |
projectedFundingRate | number | null | Projected funding rate for next funding time. Null right after funding is paid. |
nextFundingTime | string | ISO 8601 timestamp for next funding payment. Locked to the hour. |
openInterest | number | Current open interest for this market |
Example: Python
import requests
API_URL = "https://zo-mainnet.n1.xyz"
def get_markets_live():
resp = requests.get(f"{API_URL}/markets/live")
return resp.json()
live = get_markets_live()
for market in live["markets"]:
mid = market["marketId"]
idx = market.get("indexPrice")
mark = market.get("markPrice")
fr = market.get("projectedFundingRate")
oi = market.get("openInterest", 0)
print(f"Market {mid}: index=${idx}, mark=${mark}, funding={fr}, OI={oi}")Example: TypeScript
const resp = await fetch("https://zo-mainnet.n1.xyz/markets/live");
const data = await resp.json();
for (const market of data.markets) {
console.log(
`Market ${market.marketId}: ` +
`index=$${market.indexPrice} mark=$${market.markPrice} ` +
`funding=${market.projectedFundingRate} OI=${market.openInterest}`
);
}[!NOTE] This endpoint provides a consolidated view of live market state. For static market configuration (decimals, margin parameters), use
GET /info.
Last updated on