Surface Map
Trading Pairs
Spot and perps are separate active rows (marketType SPOT or MARGIN); derive product support from them. Show perps controls (leverage, margin, funding, positions, liquidation, reduce-only) only for MARGIN rows.
Query Map
Screener and Stats
The screener feeds market lists and tickers;getMarketStats() returns lifetime totals (totalQuoteVolumeLtd, totalTradeCountLtd).
Volume counts order-book and RFQ fills alike. Split fields break it into the two, and the parts add up exactly to the total beside them:
A 24h split is absent while its window holds a candle with no recorded split.
OI surge (24h vs 7d average), kept exact with
decimal.js:
Candles
Backfill over REST, then subscribe toohlcv.
- Intervals:
1m,5m,15m,1h,4h,1d. - ≤500 bars per request (default 350), oldest first; flat bars fill buckets without trades.
- A live candle is re-sent with its full state until the period closes; upsert by period start
T.
getCandlesticks for query rules and the OHLCV channel for price-series and snapshot options.
Orderbooks
The subscription sends the current book, then every update; REST serves one-off reads.magnitude sets price grouping; denomination picks base or quote quantities.
Full depth
orderbook groups the book into at most 20 buckets per side and restates it at most every 100 ms, for display. For the exact book, subscribe to depth: up to 1000 levels per side, then only changed levels, each frame linked to the last by book_seq. sdk.ws.depth keeps the local book; bbo / sdk.ws.bbo carry only best bid and ask. Raw clients follow Keeping a local book.
TypeScript SDK
levels per side and carry bookSeq (a point-in-time read and staleness check, not a base for applying depth frames). They read the book the channels stream, which follows order acknowledgements by a short interval, and return 503 while it cannot be read. Every read counts toward an orderbook read budget.
Trades
REST history is cursor-paged newest first: omitpageToken, then follow nextPageToken until empty. Sending page returns 400.
- REST trades carry both wallets, the raw taker fee, quote volume, and the taker’s application; WebSocket frames do not. The maker’s application is not public.
GET /api/v1/trades(every market) has a per-client-IP read budget; over it the API returns429withRetry-After.- Live trades can carry
seqandmatch_index, linking each trade to the previous so a missed trade shows as a gap; see Sequenced trades.
Mark and Oracle Prices
Read trading availability from the mark/index price andmarket_status, not the oracle provider.
- Pyth-primary markets stream prices, falling back to HTTP polling when the stream stalls.
- SEDA markets use a Pyth Pro feed with a Hyperliquid on-close fallback when the upstream market is shut or the Pyth request fails. The fallback’s asset identity is operator-configured, not automatically verified. In production, SPX and COPPER take Hyperliquid’s mark on every tick instead, with no Pyth leg.
- While upstream is closed, the mark follows the book within a wider basis cap (narrower in session). A book beyond the divergence limit reports
DIVERGEDinlast_regime. Markets stay tradable, liquidations included; market orders stay banded on the mark. - A mark valuing an open position outside the supported notional, margin, or unrealized-PnL range is rejected and the last accepted mark kept, so not every tick changes valuation.
Related Pages
- Order Management: placing orders.
- Available Markets: live table.
- WebSocket API: raw channel grammar.
- TypeScript WebSockets: SDK subscription helpers.

