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

FieldTypeDescription
filterstringBase asset symbol (e.g. "BTC")
data.assetstringBase asset symbol
data.mark_pxstringCurrent mark price
data.idx_pxstringCurrent index price
data.mark_px_tsstringMark price timestamp in nanoseconds
data.idx_px_tsstringIndex price timestamp in nanoseconds
gsnnumberGlobal sequence number
tsstringEvent 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.

On this page