allMarkets channel pushes the current oracle price, mark price, and 24-hour volume for every contract in one frame, about once per second. One subscription covers the whole market — you do not need a separate ticker subscription per contract. This is a public channel and requires no authentication.
It carries three values per contract by design. For a single contract’s full statistics — price change, high, low, trade count, funding rate — use ticker.
Subscribing
asset field.
Push message format
Field reference
int64
Generation time of the frame, in Unix milliseconds.
array
One entry per contract that currently has a price. Each entry contains:
asset(string) — the contract ID.oraclePx(string) — current oracle price, raw integer scaled bypriceScale;"0"when no data.markPx(string) — current mark price, raw integer scaled bypriceScale;"0"when no data.vol24h(string) — 24-hour rolling volume in base units, raw integer scaled byqtyScale. Measured on the same basis asvolumein thetickerchannel.
Consuming the stream
1
Key by asset
Index
markets by asset and replace your local map from each frame. Frames are full snapshots, never deltas.2
Expect every priced contract
Coverage is all active contracts that have a price. A contract with a price but no trades yet reports
vol24h as "0" — that is not an error.3
Convert raw values
Apply each contract’s
priceScale and qtyScale from configs before display; never hardcode a scale.