Feeds / Crypto exchanges (live)

OKX

Spot. WebSocket snapshot (action "snapshot"), then deltas (action "update"); a REST snapshot is also requested but ignored once the WebSocket snapshot is applied.

Live in productionWebSocket400 levels

Live now

-
books live
-
messages / s
-
level changes / s
-
KB / s

Messages / s and KB / s are what our handler receives from the exchange (KB after decompression, REST snapshots included); level changes / s are counted after normalization, for the markets we publish.

Open live books Replay

How we connect

Market
Spot
WebSocket
wss://ws.okx.com:8443/ws/v5/public
Channels
books — 400-level snapshot, then incremental updates every 100 ms
trades — trades
Update model
WebSocket snapshot (action "snapshot"), then deltas (action "update"); a REST snapshot is also requested but ignored once the WebSocket snapshot is applied.
Snapshot (REST)
https://www.okx.com/api/v5/market/books?instId={SYMBOL}&sz=400
Sequencing
seqId from each update. Updates that arrive before the snapshot are buffered and only those newer than the snapshot's seqId are replayed; live updates with seqId <= the last applied are dropped. prevSeqId and the checksum are not checked.
On a gap
No gap check; books are rebuilt from fresh WebSocket snapshots on reconnect (socket error, close, or 30 s without data; 5 s backoff, doubling).
Depth
400 levels
Authentication
none
Heartbeat
We answer the server's WebSocket pings; a 30 s no-data watchdog forces a reconnect.
Symbol format
BTC-USDT

Subscribe message

{"op":"subscribe","args":[{"channel":"books","instId":"BTC-USDT"},{"channel":"trades","instId":"BTC-USDT"},...]}

What our handler takes care of

Instruments

loading...

Upcoming and recent changes

2026-11-19InfoTravel Rule deposit APIs added
OKX added two endpoints for viewing locked Travel Rule deposits and unlocking them, plus new funding error codes 58385-58389.
Details

New endpoints: GET Get locked Travel Rule deposits and POST Unlock Travel Rule deposit. Error codes 58385-58389 were added to the funding error code list. These are account and funding features; no change to public market data, books or trades channels. No action required for a market data client.

Our handler: The change covers account/funding deposit endpoints and error codes, not the public books or trades channels or the market books REST snapshot.

Source ↗

2026-11-13InfoSBE order entry and private data services launched in demo
OKX launched SBE services for order entry and private order and fill updates in demo, with production expected in early December 2026. Existing REST and JSON WebSocket APIs are unaffected.
Details

New endpoints are /ws/v5/trade-sbe and /ws/v5/private-sbe, with updated XML schemas. Both require authentication and are for trading and private data. No action is needed for public market data.

Our handler: These are authenticated order-entry and private-data services, not the public books or trades channels.

Source ↗

2026-11-12InfoCorporate actions query for stock-backed instruments
A new public endpoint, GET Get corporate actions, returns corporate action events affecting stock-backed derivative instruments.
Details

It covers dividends, splits, spinoffs and similar events. No action is required.

Our handler: This is a new endpoint for stock-backed derivatives, and our handler uses only spot books and trades.

Source ↗

2026-11-11InfoMax open size direction-specific calculation
In long/short position mode, maximum openable quantity calculations now differ by direction for SWAP and FUTURES.
Details

Descriptions were updated for leverage estimate and max order size endpoints. These are account and trading calculations.

Our handler: This affects account and trading endpoints for derivatives, not public market data.

Source ↗

2026-11-05InfoELP names retired in favor of RPI nameseffective 2026-10-31
ELP names such as books-elp, ordType elp and elpMaker are no longer supported after 2026-10-31; use the RPI names.
Details

books-elp becomes books-rpi, and the trading and fee parameters are renamed to their RPI equivalents. Only clients using the ELP order book channel need to change. Our handler uses the standard books channel.

Our handler: Our handler uses the books and trades channels, not books-elp or books-rpi.

Source ↗

2026-10-27InfoNew bbo-rpi-tbt order book channel
A new public WebSocket channel, bbo-rpi-tbt, pushes the best RPI bid and ask.
Details

It sends a 1-level snapshot first, then a snapshot every 10 ms when the best RPI levels change. No login is required. It is optional and requires no action.

Our handler: This is a new optional channel, and our handler subscribes only to books and trades.

Source ↗

Collected from the exchange's changelog and notices, summarized automatically; check the source before acting. All changes for this feed

Official documentation

OKX API v5 — WS order book channel ↗www.okx.comOKX API v5 — WS trades channel ↗www.okx.comOKX API v5 — GET order book (REST) ↗www.okx.comOKX API v5 — rate limits ↗www.okx.comOKX API v5 — WebSocket connect ↗www.okx.comOKX API v5 — changelog ↗www.okx.comSystem status ↗www.okx.com

Links go to the exchange's own documentation; it is theirs and may change. Our handler follows the version described above.