Unsubscribe Position
Stops receiving position updates for the specified account
Unsubscribe from position updates (requires authentication)#
Stops receiving position updates for the specified account
Request to unsubscribe from position updates
Parameters
sourcestringMust be 'position'
accountstringEthereum address of the account (must match subscription)
subaccountIndicesarrayArray of subaccount indices. Must match the subscription (same indices; order does not matter). Use [] if unsubscribing from an "all subaccounts" subscription.
{
"jsonrpc": "2.0",
"method": "unsubscribe",
"params": {
"source": "position",
"account": "0xe1c03ec3bcf509b3e8e63abcd03edc661ffe6a78",
"subaccountIndices": []
},
"id": 13
}Success response for unsubscribe requests
Parameters
message?stringSuccess message
{
"jsonrpc": "2.0",
"result": {
"message": "Unsubscribed from channel"
},
"usIn": 1234567890123,
"usOut": 1234567890456,
"usDiff": 333,
"id": 10
}Error response for failed requests
Parameters
jsonrpcstringJSON-RPC version
errorobjectusInintegerRequest received timestamp in milliseconds
usOutintegerResponse sent timestamp in milliseconds
usDiffintegerProcessing time in milliseconds
id?string | integer | nullRequest identifier (if provided in request, otherwise null)
{
"jsonrpc": "2.0",
"error": {
"code": -32602,
"message": "Invalid subscription params"
},
"usIn": 1234567890123,
"usOut": 1234567890456,
"usDiff": 333,
"id": 2
}Subscribe Stats
Subscribe to account statistics (UPnL, cross leverage, maintenance margin, account value, free collateral, etc.). Updates are published at a fixed interval (every 5 seconds). Supports delegation - users can subscribe to accounts they are delegated to access.
Unsubscribe Fill
Stops receiving fill updates for the specified account, subaccount, and symbol