The WebSocket feed encodes all messages as JSON. All response messages contain a type and a channel field.

Message types

These are possible values for the type field:

  • snapshot: contains current snapshot of current market or account data.
  • update: contains an update about the current market data.
  • subscribed: indicates a successful subscription to the channel.
  • unsubscribed: indicates a successful un-subscription to the channel.
  • pong: indicates a successful ping-pong operation.
  • error: exists when an error occurs. There will be accompanying fields message with the error message and (optional) code for the standard HTTP error code

Request format

  • op: one of sub, unsub or ping
  • channeland product : Name of the channel and product, currently supported values are:
    • book
      • support product BTC-PERP, ETH-PERP, SOL-PERP right now
    • ticker:
      • support product BTC-PERP, ETH-PERP, SOL-PERP right now
    • trades:
      • support product BTC-PERP, ETH-PERP, SOL-PERP right now
    • orders:
      • support product BTC-PERP, ETH-PERP, SOL-PERP right now
    • oracle:
      • support product BTC, ETH, SOL right now

Response format

  • channel: See above section for possible channel values
  • type: See above section for possible message types
  • data: The realtime data feed
  • product: Product ID of the requested data feed
  • code: standard HTTP error codes if there type is error
  • message: Error message where type is error