Enclave Cross’ streaming WebSocket API to get public price updates and an account’s fill and order status updates.

Public Channels

These channels can be subscribed to without authenticating.

Prices Channel

The latest prices for supported price pairs. All messages will have the update type. The data field will contain the following:

{"op": "subscribe", "channel": "prices"}

Example price update message:

{
  "type": "update",
  "channel": "prices",
  "data": {
    "pair": {
      "base": "AVAX",
      "quote": "USDC"
    },
    "price": "13.879000015258789",
    "time": "2022-11-15T16:18:12.049289984Z"
  }
}

Private Channels

These channels require the user to first authenticate with an API key.

Orders Channel

The order channel streams order status changes for your account. You can subscribe with the following message after logging in:

{"op": "subscribe", "channel": "orders"}

You can expect a message to be sent when the following occur:

Example response:

{
  "type": "update",
  "channel": "orders",
  "data": {
    "accountId": "99627194178829804007",
    "orderCategory": "CN",
    "customerOrderId": "8649352166794",
    "internalOrderId": "1",
    "pair": {
      "base": "AVAX",
      "quote": "USDC"
    },
    "side": "SELL",
    "isCancelled": false,
    "isFilled": false,
    "size": "0.1",
    "filledSize": "0",
    "remainingSize": "0.1",
    "exchangedSize": "0",
    "updatedAt": "2022-11-15T19:58:21.810627137Z",
  }
}

Fills Channel

The fills channel streams order fills for your account. You can subscribe with the following message after logging in: