跳到主要内容

Native Market Data API

Public, unauthenticated endpoints under /api/v1 that complement the FAPI market endpoints. Same data, snake_case JSON, and a few things FAPI does not expose (recent public trades, per-side open interest, insurance fund, external reference prices).

Base: https://api-avax.<sparky-domain>/api/v1 (per chain).

MethodPathNotes
GET/markets?limit=200All markets with 24 h stats, rank, max leverage; ordered by display sort_order. limit max 500.
GET/markets/{symbol}/tickerlast_price, 24 h change/high/low/volume, open_interest, funding_rate, next_funding_time (s).
GET/markets/{symbol}/pricemark_price, index_price, last_price, bid_price, ask_price, funding_rate, next_funding_rate, next_funding_time (s), updated_at (ms).
GET/markets/{symbol}/orderbookTop 20 levels, [price, qty] arrays, timestamp (ms). Empty arrays on a cold book.
GET/markets/{symbol}/tradesLast 50 fills: id, price, amount, side (buy/sell), timestamp (ms). Not available on FAPI.
GET/markets/{symbol}/candles?period=1h&limit=300&from=&to=Native klines; period1m 5m 15m 1h 4h 1d 1w 1M; time in seconds; limit max 10000; from/to seconds or ms (auto-detected).
GET/markets/{symbol}/candles/latest?period=5mForming candle with is_final.
GET/klines/{symbol}/candles?period=15m&limit=500&start=&end=Proxy of Binance Futures klines (extended periods); start/end ms.
GET/funding-rates, /funding-rates/{symbol}, /funding-rates/{symbol}/history?limit=100funding_rate, funding_rate_per_hour, mark_price, index_price, next_funding_time (ms), long_open_interest, short_open_interest (USD).
GET/open-interest/{symbol} (+ /history, /ratio, /accounts, /top-positions, /top-accounts, /taker-volume, /leverage-brackets)OI analytics behind the /futures/data/* FAPI endpoints, plus leverage brackets.
GET/liquidations/{symbol}, /liquidations/{symbol}/config, /insurance-fund/{symbol}Liquidation feed, parameters and insurance-fund balance.
GET/adl/{symbol}/rankings, /adl/{symbol}/events, /adl/{symbol}/configReal ADL queue (unlike the simplified FAPI adlQuantile).
GET/trigger-orders/{symbol}/configTrigger-order limits per market.
GET/external/markets, /external/markets/{symbol}/{ticker,orderbook,trades,candles}External reference-source data (cached 60 s / 3 s / — / 30 s; circuit breaker; stale data flagged with the X-Data-Stale: true header).
GET/markets/risk-paramsMargin tiers and risk parameters.
GET/public/account/{address}/{positions,orders,pnl}Public view of any address's positions / orders / PnL.
GET/leaderboard/tradersTrader PnL leaderboard.

Error shape

{ "error": "Unknown trading pair: XYZUSDT", "code": "INVALID_MARKET" }
HTTPcode
400ERR_INVALID_PERIOD, ERR_INVALID_TIME_RANGE
404INVALID_MARKET, ERR_NO_DATA, EXTERNAL_ERROR
502ERR_BINANCE_ERROR
503PRICE_DATA_UNAVAILABLE, CIRCUIT_OPEN

Example

import requests
BASE = "https://api-avax.<sparky-domain>/api/v1"

markets = requests.get(f"{BASE}/markets").json()["markets"]
book = requests.get(f"{BASE}/markets/BTCUSDT/orderbook").json()
candles = requests.get(f"{BASE}/markets/BTCUSDT/candles", params={"period": "1h", "limit": 100}).json()["candles"]