Cascade

Operations

All WebSocket request and reply payloads grouped by operation.

Authenticate the WebSocket connection#

Must be called before accessing protected subscriptions (position, order, createorder, cancelorder)

Channel:WEBSOCKET
Tag:
Authentication

Authenticate the WebSocket connection with JWT token

Parameters

bearerstring

JWT authentication token

Payload
{
  "jsonrpc": "2.0",
  "method": "auth",
  "params": {
    "bearer": "eyJhbGciOiJIUzUxMiIsInR5cCI6IkpXVCJ9..."
  },
  "id": 1
}

Authentication success response

Parameters

message?string

Success message

Payload
{
  "jsonrpc": "2.0",
  "result": {
    "message": "Authenticated successfully"
  },
  "usIn": 1234567890123,
  "usOut": 1234567890456,
  "usDiff": 333,
  "id": 1
}

Error response for failed requests

Parameters

jsonrpcstring

JSON-RPC version

errorobject
usIninteger

Request received timestamp in milliseconds

usOutinteger

Response sent timestamp in milliseconds

usDiffinteger

Processing time in milliseconds

id?string | integer | null

Request identifier (if provided in request, otherwise null)

Payload
{
  "jsonrpc": "2.0",
  "error": {
    "code": -32602,
    "message": "Invalid subscription params"
  },
  "usIn": 1234567890123,
  "usOut": 1234567890456,
  "usDiff": 333,
  "id": 2
}

Subscribe to trade/fill notifications for a symbol#

Primary WebSocket channel for all market data and order management.

Channel:WEBSOCKET
Tag:
Market Data

Request to subscribe to trade/fill notifications

Parameters

sourcestring

Must be 'trade'

symbolsarray

Array of market symbols to subscribe to (e.g., ['BTCUSD', 'ETHUSD', 'SOLUSD']) or empty array [] for all markets

Payload
{
  "jsonrpc": "2.0",
  "method": "subscribe",
  "params": {
    "source": "trade",
    "symbols": [
      "ETHUSD"
    ]
  },
  "id": 2
}

Generic success response for subscription requests

Parameters

message?string

Success message

Payload
{
  "jsonrpc": "2.0",
  "result": {
    "message": "Subscribed to trades"
  },
  "usIn": 1234567890123,
  "usOut": 1234567890456,
  "usDiff": 333,
  "id": 2
}

trade#

REPLY

Published each time a fill occurs in the specified market. Wrapped with type field to identify the message type.

Parameters

symbolstring

Market symbol for this fill

pricestring

Fill price as decimal string

quantitystring

Signed quantity - positive indicates buy, negative indicates sell, as decimal string

timeinteger

Timestamp when fill occurred in milliseconds

Payload
{
  "type": "Trade",
  "data": {
    "symbol": "BTCUSD",
    "price": "106012.450000",
    "quantity": "0.050000",
    "time": 1751793781000
  }
}

Error response for failed requests

Parameters

jsonrpcstring

JSON-RPC version

errorobject
usIninteger

Request received timestamp in milliseconds

usOutinteger

Response sent timestamp in milliseconds

usDiffinteger

Processing time in milliseconds

id?string | integer | null

Request identifier (if provided in request, otherwise null)

Payload
{
  "jsonrpc": "2.0",
  "error": {
    "code": -32602,
    "message": "Invalid subscription params"
  },
  "usIn": 1234567890123,
  "usOut": 1234567890456,
  "usDiff": 333,
  "id": 2
}

Subscribe to order book updates at specified precision#

Primary WebSocket channel for all market data and order management.

Channel:WEBSOCKET
Tag:
Market Data

Request to subscribe to order book updates

Parameters

sourcestring

Must be 'book'

symbolstring

Market symbol for which order book data is desired

tick_sizenumber

Optional price tick size for order aggregation (e.g., 0.01, 0.02, 0.05). Must be base_tick_size * multiplier (1x, 2x, 5x, 10x, 100x, 1000x). Defaults to 0.01 if not specified.

Payload
{
  "jsonrpc": "2.0",
  "method": "subscribe",
  "params": {
    "source": "book",
    "symbol": "SOLUSD",
    "tick_size": 0.01
  },
  "id": 3
}

Generic success response for subscription requests

Parameters

message?string

Success message

Payload
{
  "jsonrpc": "2.0",
  "result": {
    "message": "Subscribed to trades"
  },
  "usIn": 1234567890123,
  "usOut": 1234567890456,
  "usDiff": 333,
  "id": 2
}

Published on subscription with initial snapshot, then delta updates on changes. Wrapped with type field to identify the message type.

Parameters

symbolstring

Market symbol for this book

feed_idstring

Internal feed identifier

tick_sizestring

Price tick size used for aggregation in UFixed6 format (e.g., "10000" = 0.01)

bidsarray

For snapshots: All buy orders sorted by price descending. For deltas: Changed buy orders (quantity 0 means removed).

asksarray

For snapshots: All sell orders sorted by price ascending. For deltas: Changed sell orders (quantity 0 means removed).

timeinteger

Timestamp in milliseconds

sequence_numberinteger

Monotonic sequence number for this feed's order updates

Payload
{
  "type": "Book Snapshot",
  "data": {
    "symbol": "SOLUSD",
    "feed_id": "1",
    "tick_size": "10000",
    "bids": [
      {
        "price": "150.371000",
        "quantity": "0.581222"
      },
      {
        "price": "150.370000",
        "quantity": "0.250000"
      }
    ],
    "asks": [
      {
        "price": "150.372000",
        "quantity": "0.450000"
      },
      {
        "price": "150.373000",
        "quantity": "0.333334"
      }
    ],
    "time": 1752798506000,
    "sequence_number": 12345
  }
}

Error response for failed requests

Parameters

jsonrpcstring

JSON-RPC version

errorobject
usIninteger

Request received timestamp in milliseconds

usOutinteger

Response sent timestamp in milliseconds

usDiffinteger

Processing time in milliseconds

id?string | integer | null

Request identifier (if provided in request, otherwise null)

Payload
{
  "jsonrpc": "2.0",
  "error": {
    "code": -32602,
    "message": "Invalid subscription params"
  },
  "usIn": 1234567890123,
  "usOut": 1234567890456,
  "usDiff": 333,
  "id": 2
}

Subscribe to OHLCV candle data at specified interval#

Primary WebSocket channel for all market data and order management.

Channel:WEBSOCKET
Tag:
Market Data

Request to subscribe to OHLCV candle data

Parameters

sourcestring

Must be 'candle'

symbolsarray

Array of market symbols for which OHLCV data is desired (e.g., ['BTCUSD', 'ETHUSD']) or empty array [] for all markets

intervalstring

Candle interval - accepts either string format or seconds

Payload
{
  "jsonrpc": "2.0",
  "method": "subscribe",
  "params": {
    "source": "candle",
    "symbols": [
      "ETHUSD"
    ],
    "interval": "1m"
  },
  "id": 4
}

Generic success response for subscription requests

Parameters

message?string

Success message

Payload
{
  "jsonrpc": "2.0",
  "result": {
    "message": "Subscribed to trades"
  },
  "usIn": 1234567890123,
  "usOut": 1234567890456,
  "usDiff": 333,
  "id": 2
}

candle#

REPLY

Published once per interval for the subscribed symbol and interval. Wrapped with type field to identify the message type.

Parameters

symbolstring

Market symbol for this candle

openstring

Opening price as decimal string

highstring

Highest price during the candle period as decimal string

lowstring

Lowest price during the candle period as decimal string

closestring

Closing price as decimal string

volumestring

Total volume traded during the candle period as decimal string

timeinteger

Starting timestamp of the candle period in milliseconds

Payload
{
  "type": "Candle Update",
  "data": {
    "symbol": "ETHUSD",
    "open": "2498.123470",
    "high": "2532.678942",
    "low": "2487.234511",
    "close": "2517.982130",
    "volume": "987.543290",
    "time": 1751932800000
  }
}

Error response for failed requests

Parameters

jsonrpcstring

JSON-RPC version

errorobject
usIninteger

Request received timestamp in milliseconds

usOutinteger

Response sent timestamp in milliseconds

usDiffinteger

Processing time in milliseconds

id?string | integer | null

Request identifier (if provided in request, otherwise null)

Payload
{
  "jsonrpc": "2.0",
  "error": {
    "code": -32602,
    "message": "Invalid subscription params"
  },
  "usIn": 1234567890123,
  "usOut": 1234567890456,
  "usDiff": 333,
  "id": 2
}

Subscribe to position updates for an account (requires authentication)#

Primary WebSocket channel for all market data and order management.

Channel:WEBSOCKET
Tag:
Account

Request to subscribe to position updates (requires authentication)

Parameters

sourcestring

Must be 'position'

accountstring

Ethereum address of the account (must match authenticated user)

Payload
{
  "jsonrpc": "2.0",
  "method": "subscribe",
  "params": {
    "source": "position",
    "account": "0xe1c03ec3bcf509b3e8e63abcd03edc661ffe6a78"
  },
  "id": 5
}

Generic success response for subscription requests

Parameters

message?string

Success message

Payload
{
  "jsonrpc": "2.0",
  "result": {
    "message": "Subscribed to trades"
  },
  "usIn": 1234567890123,
  "usOut": 1234567890456,
  "usDiff": 333,
  "id": 2
}

Published each time a position is created or updated for the subscribed account. Wrapped with type field to identify the message type.

Parameters

accountstring

Ethereum address of the account

subaccountIndexstring

Subaccount index as string

symbolstring

Market symbol for this position

quantitystring

Signed decimal string - positive for long, negative for short

basisstring

Signed notional cost basis as decimal string

feesstring

Accumulated trade fees as unsigned decimal string

fundingstring

Accumulated funding fees as signed decimal string

marginstring

Collateral amount reserved for this position as unsigned decimal string

updatedAtinteger

Timestamp when position was last updated in milliseconds

Payload
{
  "type": "Position",
  "data": {
    "account": "0xc2cbbb5bea8fdefb1f441feaf017a0df72e89c9f",
    "subaccountIndex": "0",
    "symbol": "ETHUSD",
    "quantity": "1.5",
    "basis": "3720.226",
    "fees": "1.323667",
    "funding": "87.382478",
    "margin": "558.621108",
    "updatedAt": 1752846925000
  }
}

Error response for failed requests

Parameters

jsonrpcstring

JSON-RPC version

errorobject
usIninteger

Request received timestamp in milliseconds

usOutinteger

Response sent timestamp in milliseconds

usDiffinteger

Processing time in milliseconds

id?string | integer | null

Request identifier (if provided in request, otherwise null)

Payload
{
  "jsonrpc": "2.0",
  "error": {
    "code": -32602,
    "message": "Invalid subscription params"
  },
  "usIn": 1234567890123,
  "usOut": 1234567890456,
  "usDiff": 333,
  "id": 2
}

Subscribe to order updates for an account, symbol, and order type (requires authentication)#

Primary WebSocket channel for all market data and order management.

Channel:WEBSOCKET
Tag:
Orders

Request to subscribe to order updates (requires authentication)

Parameters

sourcestring

Must be 'order'

accountstring

Ethereum address of the account (must match authenticated user)

symbolsarray

Array of market symbols to filter orders (e.g., ['BTCUSD', 'ETHUSD']) or empty array [] for all markets

order_typestring

Order type to filter subscriptions - 'Limit' for limit orders, 'TWAP' for time-weighted average price orders, 'TakeProfit' for take profit orders, 'StopLoss' for stop loss orders, or 'ALL' for all order types

Payload
{
  "jsonrpc": "2.0",
  "method": "subscribe",
  "params": {
    "source": "order",
    "account": "0xe1c03ec3bcf509b3e8e63abcd03edc661ffe6a78",
    "symbols": [
      "BTCUSD"
    ],
    "order_type": "Limit"
  },
  "id": 6
}

Generic success response for subscription requests

Parameters

message?string

Success message

Payload
{
  "jsonrpc": "2.0",
  "result": {
    "message": "Subscribed to trades"
  },
  "usIn": 1234567890123,
  "usOut": 1234567890456,
  "usDiff": 333,
  "id": 2
}

order#

REPLY

Published each time an order is created, updated, filled, or cancelled for the subscribed account and symbol. Wrapped with type field to identify the message type.

Parameters

accountstring

Ethereum address of the account

orderIdstring

Unique 64-character hex identifier for this order

clientIdstring

Client-provided identifier (empty string if not provided)

quantitystring

Signed decimal string - positive for long/buy, negative for short/sell

expiresAtinteger

Order expiration timestamp in milliseconds

symbolstring

Market symbol

subaccountIndexstring

Subaccount index as string

nonceinteger

Order nonce

pricestring

Limit price as decimal string

statusstring

Order status: new (just submitted), open (active), filled (completely filled), cancelled (user cancelled), expired (past expiration), rejected (validation failed)

remainingstring

Unfilled quantity as unsigned decimal string

settledstring

Filled quantity as unsigned decimal string

createdAt?integer

Timestamp when order was created in milliseconds (null for new orders not yet processed)

updatedAt?integer

Timestamp when order was last updated in milliseconds (null for new orders not yet processed)

Payload
{
  "type": "Order",
  "data": {
    "account": "0xc2cbbb5bea8fdefb1f441feaf017a0df72e89c9f",
    "orderId": "a6e139432b47a2dece7734777fc6df8cab8a6a933daa26821c9185020f7f6a10",
    "clientId": "20250709-3481323",
    "quantity": "-0.5",
    "expiresAt": 1968707400000,
    "symbol": "BTCUSD",
    "subaccountIndex": "0",
    "nonce": 388,
    "price": "109912.25",
    "status": "filled",
    "remaining": "0",
    "settled": "0.5",
    "createdAt": 1720615381000,
    "updatedAt": 1720620000000
  }
}

Error response for failed requests

Parameters

jsonrpcstring

JSON-RPC version

errorobject
usIninteger

Request received timestamp in milliseconds

usOutinteger

Response sent timestamp in milliseconds

usDiffinteger

Processing time in milliseconds

id?string | integer | null

Request identifier (if provided in request, otherwise null)

Payload
{
  "jsonrpc": "2.0",
  "error": {
    "code": -32602,
    "message": "Invalid subscription params"
  },
  "usIn": 1234567890123,
  "usOut": 1234567890456,
  "usDiff": 333,
  "id": 2
}
Channel:WEBSOCKET
Tag:
Account

Request to subscribe to fill updates (requires authentication, supports delegation)

Parameters

sourcestring

Must be 'fill'

accountstring

Ethereum address of the account (must match authenticated user or user must be a delegate)

subaccount_indexinteger

Subaccount index to subscribe to fills for

symbolsarray

Array of market symbols to filter fills (e.g., ['BTCUSD', 'ETHUSD']) or empty array [] for all markets

Payload
{
  "jsonrpc": "2.0",
  "method": "subscribe",
  "params": {
    "source": "fill",
    "account": "0xe1c03ec3bcf509b3e8e63abcd03edc661ffe6a78",
    "subaccount_index": 0,
    "symbols": [
      "ETHUSD"
    ]
  },
  "id": 8
}

Generic success response for subscription requests

Parameters

message?string

Success message

Payload
{
  "jsonrpc": "2.0",
  "result": {
    "message": "Subscribed to trades"
  },
  "usIn": 1234567890123,
  "usOut": 1234567890456,
  "usDiff": 333,
  "id": 2
}

fill#

REPLY

Published each time a fill occurs for the subscribed account and subaccount. Includes realized PnL, exposure, and funding. Wrapped with type field to identify the message type.

Parameters

symbolstring

Market symbol for this fill

pricestring

Fill price as decimal string

quantitystring

Signed quantity - positive indicates buy, negative indicates sell, as decimal string

timeinteger

Timestamp when fill occurred in milliseconds

order_idstring

64-character hex string identifying the order that was filled

realized_exposurestring

Realized exposure from this fill as signed decimal string

realized_fundingstring

Realized funding from this fill as signed decimal string

realized_pnlstring

Realized PnL from this fill (exposure + funding - fees) as signed decimal string

Payload
{
  "type": "Fill",
  "data": {
    "symbol": "ETHUSD",
    "price": "2511.120000",
    "quantity": "1.500000",
    "time": 1751793781000,
    "order_id": "a6e139432b47a2dece7734777fc6df8cab8a6a933daa26821c9185020f7f6a10",
    "realized_exposure": "3766.680000",
    "realized_funding": "0.000000",
    "realized_pnl": "3766.680000"
  }
}

Error response for failed requests

Parameters

jsonrpcstring

JSON-RPC version

errorobject
usIninteger

Request received timestamp in milliseconds

usOutinteger

Response sent timestamp in milliseconds

usDiffinteger

Processing time in milliseconds

id?string | integer | null

Request identifier (if provided in request, otherwise null)

Payload
{
  "jsonrpc": "2.0",
  "error": {
    "code": -32602,
    "message": "Invalid subscription params"
  },
  "usIn": 1234567890123,
  "usOut": 1234567890456,
  "usDiff": 333,
  "id": 2
}

Create a new order (requires authentication)#

Uses the 'create' method with type 'order' to submit a new order to the matching engine

Channel:WEBSOCKET
Tag:
Orders

Request to create a new order (requires authentication)

Parameters

typestring

Must be 'order'

orderobject
Payload
{
  "jsonrpc": "2.0",
  "method": "create",
  "params": {
    "type": "order",
    "order": {
      "account": "0xe1c03ec3bcf509b3e8e63abcd03edc661ffe6a78",
      "clientId": "order-12345",
      "orderType": "Limit",
      "quantity": "1.5",
      "expiresAt": 1968686299000,
      "symbol": "ETHUSD",
      "subaccountIndex": "0",
      "nonce": 387,
      "price": "2511.12",
      "flags": {
        "reduceOnly": false,
        "postOnly": true,
        "ioc": false,
        "selfTradeExpire": null
      },
      "signatures": [
        "0x587244e256b155471bbb11d69edc1f039205411bf29e39209c6862e87735beb2..."
      ],
      "originator": "0x0000000000000000000000000000000000000000",
      "originatorFee": 0
    }
  },
  "id": 7
}

Success response for create order requests

Parameters

message?string

Success message

Payload
{
  "jsonrpc": "2.0",
  "result": {
    "message": "Order with ID a6e139432b47a2dece7734777fc6df8cab8a6a933daa26821c9185020f7f6a10 created successfully"
  },
  "usIn": 1234567890123,
  "usOut": 1234567890456,
  "usDiff": 333,
  "id": 7
}

Error response for failed requests

Parameters

jsonrpcstring

JSON-RPC version

errorobject
usIninteger

Request received timestamp in milliseconds

usOutinteger

Response sent timestamp in milliseconds

usDiffinteger

Processing time in milliseconds

id?string | integer | null

Request identifier (if provided in request, otherwise null)

Payload
{
  "jsonrpc": "2.0",
  "error": {
    "code": -32602,
    "message": "Invalid subscription params"
  },
  "usIn": 1234567890123,
  "usOut": 1234567890456,
  "usDiff": 333,
  "id": 2
}

Cancel an existing order (requires authentication)#

Uses the 'cancel' method with type 'order' to cancel an existing order by its order ID

Channel:WEBSOCKET
Tag:
Orders

Request to cancel an existing order (requires authentication)

Parameters

typestring

Must be 'order'

order_idstring

64-character hex string identifying the order to cancel

Payload
{
  "jsonrpc": "2.0",
  "method": "cancel",
  "params": {
    "type": "order",
    "order_id": "a6e139432b47a2dece7734777fc6df8cab8a6a933daa26821c9185020f7f6a10"
  },
  "id": 8
}

Success response for cancel order requests

Parameters

message?string

Success message

Payload
{
  "jsonrpc": "2.0",
  "result": {
    "message": "Order cancelled successfully"
  },
  "usIn": 1234567890123,
  "usOut": 1234567890456,
  "usDiff": 333,
  "id": 8
}

Error response for failed requests

Parameters

jsonrpcstring

JSON-RPC version

errorobject
usIninteger

Request received timestamp in milliseconds

usOutinteger

Response sent timestamp in milliseconds

usDiffinteger

Processing time in milliseconds

id?string | integer | null

Request identifier (if provided in request, otherwise null)

Payload
{
  "jsonrpc": "2.0",
  "error": {
    "code": -32602,
    "message": "Invalid subscription params"
  },
  "usIn": 1234567890123,
  "usOut": 1234567890456,
  "usDiff": 333,
  "id": 2
}

Create a batch of orders (requires authentication)#

Uses the 'create' method with type 'batchOrders' to submit multiple orders to the matching engine. Supports batch Limit orders, TWAP orders and Iceberg orders All orders in the batch must have the same: - account - subaccountIndex - symbol - orderType - period (if applicable) - side (buy or sell) For TWAP orders, the quantity of each order should be set such that the sum equals the total desired quantity. TWAPs must specify a nonzero period (in milliseconds) between orders. For Iceberg orders, the quantity of each order should be set to the desired display quantity.

Channel:WEBSOCKET
Tag:
Orders

Request to create a batch of orders (requires authentication)

Parameters

typestring

Must be 'batchOrders'

ordersarray

Array of orders to create. All orders must have the same: - account - subaccountIndex - symbol - orderType - period (if applicable) - side (buy or sell) For TWAP orders, period must be nonzero and the same for all orders.

Payload
{
  "jsonrpc": "2.0",
  "method": "create",
  "params": {
    "type": "batchOrders",
    "orders": [
      {
        "account": "0xe1c03ec3bcf509b3e8e63abcd03edc661ffe6a78",
        "clientId": "batch-order-1",
        "orderType": "Limit",
        "quantity": "-1.5",
        "expiresAt": 1968686299000,
        "symbol": "ETHUSD",
        "subaccountIndex": 0,
        "nonce": 387,
        "price": "2511.12",
        "flags": {
          "reduceOnly": false,
          "postOnly": true,
          "ioc": false
        },
        "signatures": [
          "0x587244e256b155471bbb11d69edc1f039205411bf29e39209c6862e87735beb2..."
        ],
        "originator": "0x0000000000000000000000000000000000000000",
        "originatorFee": 0
      },
      {
        "account": "0xe1c03ec3bcf509b3e8e63abcd03edc661ffe6a78",
        "clientId": "batch-order-2",
        "orderType": "Limit",
        "quantity": "-1.5",
        "expiresAt": 1968686299000,
        "symbol": "ETHUSD",
        "subaccountIndex": 0,
        "nonce": 388,
        "price": "2515.00",
        "flags": {
          "reduceOnly": false,
          "postOnly": true,
          "ioc": false
        },
        "signatures": [
          "0x9a8b7c6d5e4f3a2b1c0d9e8f7a6b5c4d3e2f1a0b9c8d7e6f5a4b3c2d1e0f9a8b..."
        ],
        "originator": "0x0000000000000000000000000000000000000000",
        "originatorFee": 0
      }
    ]
  },
  "id": 9
}

Success response for batch create order requests

Parameters

message?string

Success message

Payload
{
  "jsonrpc": "2.0",
  "result": {
    "message": "Batch orders created successfully: 3 orders"
  },
  "usIn": 1234567890123,
  "usOut": 1234567890456,
  "usDiff": 333,
  "id": 9
}

Error response for failed requests

Parameters

jsonrpcstring

JSON-RPC version

errorobject
usIninteger

Request received timestamp in milliseconds

usOutinteger

Response sent timestamp in milliseconds

usDiffinteger

Processing time in milliseconds

id?string | integer | null

Request identifier (if provided in request, otherwise null)

Payload
{
  "jsonrpc": "2.0",
  "error": {
    "code": -32602,
    "message": "Invalid subscription params"
  },
  "usIn": 1234567890123,
  "usOut": 1234567890456,
  "usDiff": 333,
  "id": 2
}

Unsubscribe from trade notifications#

Stops receiving trade updates for the specified symbol

Channel:WEBSOCKET
Tag:
Market Data

Request to unsubscribe from trade notifications

Parameters

sourcestring

Must be 'trade'

symbolsarray

Array of market symbols to unsubscribe from (must match the symbols used when subscribing) or empty array [] for all markets

Payload
{
  "jsonrpc": "2.0",
  "method": "unsubscribe",
  "params": {
    "source": "trade",
    "symbols": [
      "ETHUSD"
    ]
  },
  "id": 10
}

Success response for unsubscribe requests

Parameters

message?string

Success message

Payload
{
  "jsonrpc": "2.0",
  "result": {
    "message": "Unsubscribed from channel"
  },
  "usIn": 1234567890123,
  "usOut": 1234567890456,
  "usDiff": 333,
  "id": 10
}

Error response for failed requests

Parameters

jsonrpcstring

JSON-RPC version

errorobject
usIninteger

Request received timestamp in milliseconds

usOutinteger

Response sent timestamp in milliseconds

usDiffinteger

Processing time in milliseconds

id?string | integer | null

Request identifier (if provided in request, otherwise null)

Payload
{
  "jsonrpc": "2.0",
  "error": {
    "code": -32602,
    "message": "Invalid subscription params"
  },
  "usIn": 1234567890123,
  "usOut": 1234567890456,
  "usDiff": 333,
  "id": 2
}

Unsubscribe from order book updates#

Stops receiving order book updates for the specified symbol

Channel:WEBSOCKET
Tag:
Market Data

Request to unsubscribe from order book updates

Parameters

sourcestring

Must be 'book'

symbolstring

Market symbol to unsubscribe from

tick_size?number

Optional tick size (must match subscription if provided)

Payload
{
  "jsonrpc": "2.0",
  "method": "unsubscribe",
  "params": {
    "source": "book",
    "symbol": "SOLUSD",
    "tick_size": 0.01
  },
  "id": 11
}

Success response for unsubscribe requests

Parameters

message?string

Success message

Payload
{
  "jsonrpc": "2.0",
  "result": {
    "message": "Unsubscribed from channel"
  },
  "usIn": 1234567890123,
  "usOut": 1234567890456,
  "usDiff": 333,
  "id": 10
}

Error response for failed requests

Parameters

jsonrpcstring

JSON-RPC version

errorobject
usIninteger

Request received timestamp in milliseconds

usOutinteger

Response sent timestamp in milliseconds

usDiffinteger

Processing time in milliseconds

id?string | integer | null

Request identifier (if provided in request, otherwise null)

Payload
{
  "jsonrpc": "2.0",
  "error": {
    "code": -32602,
    "message": "Invalid subscription params"
  },
  "usIn": 1234567890123,
  "usOut": 1234567890456,
  "usDiff": 333,
  "id": 2
}

Unsubscribe from candle data#

Stops receiving candle data for the specified symbol and interval

Channel:WEBSOCKET
Tag:
Market Data

Request to unsubscribe from candle data

Parameters

sourcestring

Must be 'candle'

symbolsarray

Array of market symbols to unsubscribe from (must match the symbols used when subscribing) or empty array [] for all markets

intervalstring

Candle interval - accepts either string format or seconds

Payload
{
  "jsonrpc": "2.0",
  "method": "unsubscribe",
  "params": {
    "source": "candle",
    "symbols": [
      "BTCUSD"
    ],
    "interval": "1m"
  },
  "id": 12
}

Success response for unsubscribe requests

Parameters

message?string

Success message

Payload
{
  "jsonrpc": "2.0",
  "result": {
    "message": "Unsubscribed from channel"
  },
  "usIn": 1234567890123,
  "usOut": 1234567890456,
  "usDiff": 333,
  "id": 10
}

Error response for failed requests

Parameters

jsonrpcstring

JSON-RPC version

errorobject
usIninteger

Request received timestamp in milliseconds

usOutinteger

Response sent timestamp in milliseconds

usDiffinteger

Processing time in milliseconds

id?string | integer | null

Request identifier (if provided in request, otherwise null)

Payload
{
  "jsonrpc": "2.0",
  "error": {
    "code": -32602,
    "message": "Invalid subscription params"
  },
  "usIn": 1234567890123,
  "usOut": 1234567890456,
  "usDiff": 333,
  "id": 2
}

Unsubscribe from position updates (requires authentication)#

Stops receiving position updates for the specified account

Channel:WEBSOCKET
Tag:
Account

Request to unsubscribe from position updates

Parameters

sourcestring

Must be 'position'

accountstring

Ethereum address of the account (must match authenticated user)

Payload
{
  "jsonrpc": "2.0",
  "method": "unsubscribe",
  "params": {
    "source": "position",
    "account": "0xe1c03ec3bcf509b3e8e63abcd03edc661ffe6a78"
  },
  "id": 13
}

Success response for unsubscribe requests

Parameters

message?string

Success message

Payload
{
  "jsonrpc": "2.0",
  "result": {
    "message": "Unsubscribed from channel"
  },
  "usIn": 1234567890123,
  "usOut": 1234567890456,
  "usDiff": 333,
  "id": 10
}

Error response for failed requests

Parameters

jsonrpcstring

JSON-RPC version

errorobject
usIninteger

Request received timestamp in milliseconds

usOutinteger

Response sent timestamp in milliseconds

usDiffinteger

Processing time in milliseconds

id?string | integer | null

Request identifier (if provided in request, otherwise null)

Payload
{
  "jsonrpc": "2.0",
  "error": {
    "code": -32602,
    "message": "Invalid subscription params"
  },
  "usIn": 1234567890123,
  "usOut": 1234567890456,
  "usDiff": 333,
  "id": 2
}

Unsubscribe from order updates (requires authentication)#

Stops receiving order updates for the specified account, symbol, and order type

Channel:WEBSOCKET
Tag:
Orders

Request to unsubscribe from order updates

Parameters

sourcestring

Must be 'order'

accountstring

Ethereum address of the account (must match authenticated user)

symbolsarray

Array of market symbols to unsubscribe from (must match the symbols used when subscribing) or empty array [] for all markets

order_typestring

Order type to match subscription - must match the order_type used when subscribing

Payload
{
  "jsonrpc": "2.0",
  "method": "unsubscribe",
  "params": {
    "source": "order",
    "account": "0xe1c03ec3bcf509b3e8e63abcd03edc661ffe6a78",
    "symbols": [
      "BTCUSD"
    ],
    "order_type": "Limit"
  },
  "id": 14
}

Success response for unsubscribe requests

Parameters

message?string

Success message

Payload
{
  "jsonrpc": "2.0",
  "result": {
    "message": "Unsubscribed from channel"
  },
  "usIn": 1234567890123,
  "usOut": 1234567890456,
  "usDiff": 333,
  "id": 10
}

Error response for failed requests

Parameters

jsonrpcstring

JSON-RPC version

errorobject
usIninteger

Request received timestamp in milliseconds

usOutinteger

Response sent timestamp in milliseconds

usDiffinteger

Processing time in milliseconds

id?string | integer | null

Request identifier (if provided in request, otherwise null)

Payload
{
  "jsonrpc": "2.0",
  "error": {
    "code": -32602,
    "message": "Invalid subscription params"
  },
  "usIn": 1234567890123,
  "usOut": 1234567890456,
  "usDiff": 333,
  "id": 2
}

Unsubscribe from fill updates (requires authentication)#

Stops receiving fill updates for the specified account, subaccount, and symbol

Channel:WEBSOCKET
Tag:
Account

Request to unsubscribe from fill updates

Parameters

sourcestring

Must be 'fill'

accountstring

Ethereum address of the account (must match subscription)

subaccount_indexinteger

Subaccount index (must match subscription)

symbolsarray

Array of market symbols to unsubscribe from (must match the symbols used when subscribing) or empty array [] for all markets

Payload
{
  "jsonrpc": "2.0",
  "method": "unsubscribe",
  "params": {
    "source": "fill",
    "account": "0xe1c03ec3bcf509b3e8e63abcd03edc661ffe6a78",
    "subaccount_index": 0,
    "symbols": [
      "ETHUSD"
    ]
  },
  "id": 18
}

Success response for unsubscribe requests

Parameters

message?string

Success message

Payload
{
  "jsonrpc": "2.0",
  "result": {
    "message": "Unsubscribed from channel"
  },
  "usIn": 1234567890123,
  "usOut": 1234567890456,
  "usDiff": 333,
  "id": 10
}

Error response for failed requests

Parameters

jsonrpcstring

JSON-RPC version

errorobject
usIninteger

Request received timestamp in milliseconds

usOutinteger

Response sent timestamp in milliseconds

usDiffinteger

Processing time in milliseconds

id?string | integer | null

Request identifier (if provided in request, otherwise null)

Payload
{
  "jsonrpc": "2.0",
  "error": {
    "code": -32602,
    "message": "Invalid subscription params"
  },
  "usIn": 1234567890123,
  "usOut": 1234567890456,
  "usDiff": 333,
  "id": 2
}

Subscribe to balance updates for an account (requires authentication, supports delegation)#

Subscribe to real-time balance updates for owned or delegated accounts. Can subscribe to all subaccounts or a specific subaccount.

Channel:WEBSOCKET
Tag:
Account

Request to subscribe to balance updates (requires authentication, supports delegation)

Parameters

sourcestring

Must be 'balance'

accountstring

Ethereum address of the account (must match authenticated user or user must be a delegate)

subaccount_indices?array

Optional array of subaccount indices. - If OMITTED or EMPTY: Subscribes to ALL subaccounts (owner only - delegation not allowed) - If PROVIDED: Subscribes to specified subaccounts (delegation allowed) For delegated access, delegation is checked for ALL specified subaccounts. Subscription fails if user lacks delegation for any subaccount in the array.

Payload
{
  "jsonrpc": "2.0",
  "method": "subscribe",
  "params": {
    "source": "balance",
    "account": "0xe1c03ec3bcf509b3e8e63abcd03edc661ffe6a78"
  },
  "id": 7
}

Generic success response for subscription requests

Parameters

message?string

Success message

Payload
{
  "jsonrpc": "2.0",
  "result": {
    "message": "Subscribed to trades"
  },
  "usIn": 1234567890123,
  "usOut": 1234567890456,
  "usDiff": 333,
  "id": 2
}

Published each time an account balance is created or updated for the subscribed account. Supports delegation - users can receive updates for accounts they are delegated to access. Wrapped with type field to identify the message type.

Parameters

accountstring

Ethereum address of the account

subaccountIndexstring

Subaccount index as string

balancestring

Current account balance as Fixed6 decimal string

updatedAtinteger

Timestamp when balance was last updated in milliseconds

Payload
{
  "type": "Balance Update",
  "data": {
    "account": "0xc2cbbb5bea8fdefb1f441feaf017a0df72e89c9f",
    "subaccountIndex": "0",
    "balance": "1000.500000",
    "updatedAt": 1752846925000
  }
}

Error response for failed requests

Parameters

jsonrpcstring

JSON-RPC version

errorobject
usIninteger

Request received timestamp in milliseconds

usOutinteger

Response sent timestamp in milliseconds

usDiffinteger

Processing time in milliseconds

id?string | integer | null

Request identifier (if provided in request, otherwise null)

Payload
{
  "jsonrpc": "2.0",
  "error": {
    "code": -32602,
    "message": "Invalid subscription params"
  },
  "usIn": 1234567890123,
  "usOut": 1234567890456,
  "usDiff": 333,
  "id": 2
}

Unsubscribe from balance updates (requires authentication)#

Stops receiving balance updates for the specified account

Channel:WEBSOCKET
Tag:
Account

Request to unsubscribe from balance updates

Parameters

sourcestring

Must be 'balance'

accountstring

Ethereum address of the account (must match subscription)

subaccount_indices?array

Optional array of subaccount indices. Must match the subscription if provided (same order not required, but same indices).

Payload
{
  "jsonrpc": "2.0",
  "method": "unsubscribe",
  "params": {
    "source": "balance",
    "account": "0xe1c03ec3bcf509b3e8e63abcd03edc661ffe6a78"
  },
  "id": 15
}

Success response for unsubscribe requests

Parameters

message?string

Success message

Payload
{
  "jsonrpc": "2.0",
  "result": {
    "message": "Unsubscribed from channel"
  },
  "usIn": 1234567890123,
  "usOut": 1234567890456,
  "usDiff": 333,
  "id": 10
}

Error response for failed requests

Parameters

jsonrpcstring

JSON-RPC version

errorobject
usIninteger

Request received timestamp in milliseconds

usOutinteger

Response sent timestamp in milliseconds

usDiffinteger

Processing time in milliseconds

id?string | integer | null

Request identifier (if provided in request, otherwise null)

Payload
{
  "jsonrpc": "2.0",
  "error": {
    "code": -32602,
    "message": "Invalid subscription params"
  },
  "usIn": 1234567890123,
  "usOut": 1234567890456,
  "usDiff": 333,
  "id": 2
}