Cascade
Account

Subscribe Fill

Primary WebSocket channel for all market data and order management.

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
}