Cascade
Account

Subscribe Balance

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

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
}