WebSocket Reference

Websocket surface docs

Generated from the websocket endpoints and shared payload types for the public API-gateway surface. Every stream and logical channel below has a stable deep link for docs and support references.

Download public AsyncAPI JSONVisibility taxonomy: public, contributor-internal, service-internal

Public streams and channels

Public multiplexed stream

/ws/publicpublic

Single public socket for instrument and grouped market-data channels using Binance-style control messages.

Auth: No API auth · Source: encore/realtime/src/endpoints/streams/public-mux.ts

Client message schema

{
  "type": "object",
  "properties": {
    "method": {
      "type": "string",
      "enum": [
        "SUBSCRIBE",
        "UNSUBSCRIBE",
        "LIST_SUBSCRIPTIONS"
      ]
    },
    "params": {
      "type": "array",
      "items": {
        "type": "string"
      }
    },
    "id": {
      "type": "number"
    }
  },
  "required": [
    "method"
  ],
  "additionalProperties": false
}

Server payload schema

{
  "type": "object",
  "properties": {
    "result": {
      "oneOf": [
        {},
        {
          "type": "array",
          "items": {
            "type": "string"
          }
        }
      ]
    },
    "id": {
      "type": "number"
    },
    "error": {
      "type": "object",
      "properties": {
        "code": {
          "type": "number"
        },
        "msg": {
          "type": "string"
        }
      },
      "required": [
        "code",
        "msg"
      ],
      "additionalProperties": false
    },
    "stream": {
      "type": "string"
    },
    "data": {}
  },
  "additionalProperties": false
}

Logical channels

Instrument depth channel

<symbol>@depth

Subscribe with `<symbol>@depth` for a single market orderbook.

Grouped depth channel

<underlying>@depth

Subscribe with `<underlying>@depth` for one envelope per matching symbol.

Instrument ticker channel

<symbol>@ticker

Subscribe with `<symbol>@ticker` for a single market ticker.

Grouped ticker channel

<underlying>@ticker

Subscribe with `<underlying>@ticker` for one envelope per matching symbol.

Instrument trade channel

<symbol>@trade

Subscribe with `<symbol>@trade` for a single market trade stream.

Grouped trade channel

<underlying>@trade

Subscribe with `<underlying>@trade` for one envelope per matching symbol.

Index price channel

<pairSymbol>@index

Subscribe with `<pairSymbol>@index` for spot price and volatility updates for a trading pair.

Markets lifecycle channel

global@markets

Subscribe with `global@markets` for series creation and settlement events.

RFQ auction broadcast channel

global@rfq

Subscribe with `global@rfq` for live RFQ auction lifecycle events (created, resolved).

{
  "type": "object",
  "properties": {
    "type": {
      "type": "string",
      "enum": [
        "connected",
        "heartbeat",
        "rfq_request"
      ]
    },
    "timestamp": {
      "type": "number"
    },
    "fanoutAt": {
      "type": "number"
    },
    "createdAt": {
      "type": "number"
    },
    "requestId": {
      "type": "string"
    },
    "taker": {
      "type": "string"
    },
    "pairId": {
      "type": "string"
    },
    "strike": {
      "type": "string"
    },
    "expiry": {
      "type": "number"
    },
    "isCall": {
      "type": "boolean"
    },
    "size": {
      "type": "string"
    },
    "intent": {
      "type": "string",
      "enum": [
        "open",
        "close"
      ]
    },
    "deadline": {
      "type": "number"
    }
  },
  "required": [
    "type"
  ],
  "additionalProperties": false
}

RFQ public auction broadcast stream

/ws/rfq/streampublic

Dedicated public socket for RFQ auction lifecycle events, plus active-auction snapshot fanout on connect.

Auth: No API auth · Source: encore/realtime/src/endpoints/streams/rfq-broadcast.ts

Server payload schema

{
  "type": "object",
  "properties": {
    "type": {
      "type": "string",
      "enum": [
        "connected",
        "heartbeat",
        "rfq_request"
      ]
    },
    "timestamp": {
      "type": "number"
    },
    "fanoutAt": {
      "type": "number"
    },
    "createdAt": {
      "type": "number"
    },
    "requestId": {
      "type": "string"
    },
    "taker": {
      "type": "string"
    },
    "pairId": {
      "type": "string"
    },
    "strike": {
      "type": "string"
    },
    "expiry": {
      "type": "number"
    },
    "isCall": {
      "type": "boolean"
    },
    "size": {
      "type": "string"
    },
    "intent": {
      "type": "string",
      "enum": [
        "open",
        "close"
      ]
    },
    "deadline": {
      "type": "number"
    }
  },
  "required": [
    "type"
  ],
  "additionalProperties": false
}