Skip to main content
The realtime feed streams the same live events the OceanX in-app Tracker uses: trades, balance updates and live PnL for every wallet in your view.

Getting a session

Mint a short-lived WebSocket ticket by calling GET /tracker/realtime/session:
If you have no tracked wallets yet:
The wsUrl (and its ticket) is valid for ~60 seconds — open it promptly. Re-fetch a session before each (re)connect. Tickets are single-use-window and expire; don’t cache the URL.

Connecting

Open the wsUrl with any WebSocket client in binary mode. Frames are MessagePack-encoded (the app decodes with @msgpack/msgpack; a JSON text fallback is also accepted). Every frame has a type.

Frame types

Initial frame — snapshot

Sent once on connect: the current cached state for each tracked wallet.

trade

Same shape as items in GET /tracker/trades (type: "trade").

balance_update

pnl and pnl_summary

Live profit-and-loss for a wallet. data is the upstream PnL payload verbatim.

Node.js example