Skip to main content
A venue’s capabilities say which market-data reads it offers: order books, recent trades, prices of each kind, best quotes, statistics, indicative funding, open interest and candles. Each of its markets then says which of those reads it supports, and on what terms: which candle intervals, over what statistics window, in what open-interest unit. Venue reads are public and need no API key. Read venue headers with List venues and market summaries with List venue markets. Both are paged.
Venue IDs in examples on this page are illustrative. Discover venues with List.

The header

VenueHeader has an id and capabilities, a VenueCapabilities tree. Every entry is always present.
Apart from the order book and trades, these entries are PerMarket or NotSupported: whether a market has a read depends on the market. NotSupported means no market on the venue has it, for example a venue that reports no index prices.

Market data on each market

VenueMarketSummary.marketData is a VenueMarketData. Each entry is a descriptor: null when the market does not have that data, otherwise an object with a flag for the read and the terms you need. prices and candles are always objects; their per-kind entries are the nullable descriptors.

Prices

Each price kind is separate. Traded, Mark and Index are what the venue reports each price to be: kinds are never relabelled or derived from one another, so a market without a mark price has prices.mark: null rather than a traded price in its place.

Best quote

supportsSizes says whether quote levels carry sizes. When it is false, each level’s size is null and only its price is reported. If you need depth at the top of the book on such a market, read the order book.

Statistics

window says what the statistics cover. Two venues’ windows need not mean the same, so read it rather than assume 24 hours:
  • {"type": "Rolling", "length": "PT24H"}: a window of that ISO 8601 length ending now.
  • {"type": "CalendarDay", "timeZone": "..."}: the current calendar day in that IANA time zone.
supportedFields lists the StatisticsField values the venue reports: Open, High, Low, PreviousClose, VolumeBase, VolumeQuote. Fields not listed are always null in results.

Indicative funding and open interest

Indicative funding is offered only on perpetuals, and open interest only on derivatives. openInterest.unit says what the amount counts: Contracts, BaseAsset or QuoteAsset. Units differ between venues; convert Contracts with the market’s contractDetails before comparing.

Candles

Each price kind has its own CandleSeriesSpec: At least one of list and listBefore is true. Candles are aligned to whole multiples of the interval from the Unix epoch, in UTC. ListCandles returns closed candles only, newest first, with no gaps.

Resolve a read

Check the header leaf, then the market descriptor and its terms. The header alone is enough only for the order book and trades. Here <k> is the lowerCamel price kind (traded, mark, index) for the request’s Traded, Mark or Index.

Batch reads and single-market reads

The two kinds of venue read report a missing capability differently. A batch result’s Unavailable code is the one a single read would return: NotSupported when the market does not support the read, NotFound when the venue reported no value, and UpstreamFailure when the venue read failed. Only NotSupported tells you something about capabilities; the other two can succeed on a later call.
That response is to a Mark price read that included a spot market, which has no mark price. Asking for it was avoidable: filter by capabilities first.

Choose instruments for a batch read

Build each batch from the market summaries, so that every instrument you ask for supports the read:
Each batch becomes one GetPrices request:
Still handle Unavailable results: a market’s support can change between your last refresh and the read, and NotFound or UpstreamFailure can occur on any read.

Page through candle history

To load history for a series, request the latest page with ByInstrument, then follow nextCursor back in time until it is null. Following the cursor needs listBefore. To start from a point in the past, use ByInstrumentBefore, which returns candles that end at or before before:
Plan backfills with maxHistoryAgeByInterval: history older than an interval’s limit is not reachable, so a deep backfill may need a coarser interval. A request for an interval the series does not list, or for a price kind the market has no candles of, returns 422 NotSupported.

Example

An illustrative venue header and the summary of a linear perpetual on it. The structure is exact; the values are examples, so read the live ones from List and ListMarkets.
Reading the summary: all three price kinds are available, with sizes on best quotes; statistics cover a rolling 24 hours and never report PreviousClose; open interest is counted in contracts; traded and mark candles can be listed and paged back, but there are no index candles on this market, and one-minute history reaches back about two days.

Increments are not order rules

increments is the grid the venue quotes market data on. Book levels and trade prices sit on increments.price, and book level sizes on increments.size; use them for display precision and for grouping book levels in whole multiples. Trade sizes can be finer, for example a fill of an order sized by notional. They are not order rules. Never price or size an order from a venue market; use the host’s market order rules. See Market data for reading the data itself.