Discovering Markets
Read markets from the market catalog, view their trade history, and read their order books.
Public REST market data needs no authentication. If you sign these requests anyway, they count against your member’s read bucket instead of the shared public limit; see Rate Limits. WebSocket market data requires authenticating with an API key that has the read scope.
Discover a market’s ticker through REST first, then subscribe to it over WebSocket: every subscribe command addresses a market only by the ticker the catalog gave you.
Read the Catalog
GET /marketsreturns single-leg and multi-leg markets. Usetype=single_legortype=multi_legto select one; omit the filter to include both. Narrow the list further withstatus,ticker,series_ticker, orevent_ticker: repeatstatusortickerto match any of several values, and a market must match every filter you give.GET /markets/{ticker}returns either by ticker.GET /markets/{ticker}/tradesreturns executed trades over a time range.GET /markets/{ticker}/candlesticksreturns OHLC aggregates per period over a time range.
Single-leg markets omit legs. Multi-leg markets include at least two entries in legs, each with a ticker and selected outcome (yes or no).
The WebSocket API has no catalog read. Read the catalog over REST, then keep it current with the market_lifecycle stream described under Follow Catalog Changes.
Read an Order Book
GET /markets/{ticker}/orderbook returns the current L2 book as a point-in-time snapshot. To read several books in one request, repeat ticker on GET /orderbooks; it returns one book per market, ordered by ticker.
subscribe opens an orderbook subscription per ticker. Select L1 for the best bid and offer, omit level for aggregated L2, or select L3 for anonymous orders in price-time priority. The orderbook stream starts with a snapshot, followed by sequenced updates; use snapshot to re-baseline after a sequence gap.
Read a Market’s Stats
GET /markets/{ticker}/stats returns the market’s open interest, last price, and day and lifetime trading activity.
subscribe opens a stats subscription per ticker; tickers is required. The stats stream sends the market’s complete open interest, last price, and day figures on subscribe and again whenever they change, so each frame replaces the last and no snapshot command is needed. Lifetime figures are not streamed; read them over REST.
Follow Trades
GET /markets/{ticker}/trades lists one market’s trades and GET /trades lists every market’s. To keep a tape current, re-read in ascending order from the last executed_at you hold. A trade the exchange has voided is absent from the next read.
The trades channel is change-only, so establish and maintain a tape in this order:
- Send
subscribefor thetradeschannel. Omittickersfor every market, or list tickers to open one subscription each. - Wait for the
subscribedacknowledgment, then readGET /tradesover REST to establish your starting state. - Apply each
tradeframe inseqorder. Atrade_bustedframe names a trade the exchange voided after it was delivered; remove it. - If you detect a
seqgap, re-readGET /tradesover REST in ascending order from your lastexecuted_at. The channel has no snapshot, so thesnapshotcommand is not accepted for it.
Follow Catalog Changes
REST has no push channel. Re-read GET /markets on your own schedule, and compare each market’s status and public details with your local copy.
The WebSocket API has no catalog-read operation, and REST has no push channel. The market_lifecycle channel is change-only, so establish and maintain your catalog in this order:
- Send
subscribefor themarket_lifecyclechannel. Omittickersfor every published market, or list tickers to open one subscription each. - Wait for the
subscribedacknowledgment, then readGET /marketsover REST to establish your starting state. - Apply each
market_lifecycleframe inseqorder. Each change carries the full market undermsg.market:market_created,market_opened,market_paused,market_closed,market_expired,market_deleted, ormarket_metadata_updated. - If you detect a
seqgap, re-readGET /marketsover REST to rebuild the catalog.
Reconnect a Session
Over WebSocket, subscriptions and sequence numbers do not survive a closed connection, and nothing is replayed after a reconnect. Whatever closed the connection, recover the same way: reconnect with a new signature, create new subscriptions, rebuild every order book from its new initial snapshot, and re-read the catalog over REST.