Cascade
Account

Unsubscribe Stats

Stops receiving stats updates for the specified account and subaccount

Unsubscribe from stats updates (requires authentication)#

Stops receiving stats updates for the specified account and subaccount

Channel:WEBSOCKET
Tag:
Account

Request to unsubscribe from stats updates

Parameters

sourcestring

Must be 'stats'

accountstring

Ethereum address of the account (must match subscription)

subaccountIndicesarray

Array of subaccount indices. Must match the subscription (same indices; order does not matter). Use [] if unsubscribing from an "all subaccounts" subscription.

Payload
{
  "jsonrpc": "2.0",
  "method": "unsubscribe",
  "params": {
    "source": "stats",
    "account": "0xe1c03ec3bcf509b3e8e63abcd03edc661ffe6a78",
    "subaccountIndices": [
      0
    ]
  },
  "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
}