WebSocket API
Oracle Channel
Streamed index and mark pricing inputs
Channel name: oracle
Subscription
Subscribe by base asset symbol:
{ "op": "sub", "channel": "oracle", "params": { "asset": "BTC" } }params.asset is required (e.g. "BTC", "ETH").
Message Types
Snapshot
{
"channel": "oracle",
"filter": "BTC",
"type": "snapshot",
"data": {
"asset": "BTC",
"mark_px": "50000.00",
"idx_px": "49995.00",
"mark_px_ts": "1234567890000000000",
"idx_px_ts": "1234567890000000000"
},
"gsn": 12345,
"ts": "1234567890000000000"
}Update
Updates follow the same field structure as snapshot messages.
Fields
| Field | Type | Description |
|---|---|---|
filter | string | Base asset symbol (e.g. "BTC") |
data.asset | string | Base asset symbol |
data.mark_px | string | Current mark price |
data.idx_px | string | Current index price |
data.mark_px_ts | string | Mark price timestamp in nanoseconds |
data.idx_px_ts | string | Index price timestamp in nanoseconds |
gsn | number | Global sequence number |
ts | string | Event timestamp in nanoseconds |
These fields match the mark_px and idx_px fields in the v1Market schema returned by GET /markets, and the v1Price schema returned by GET /prices.