Skip to main content

command.trading_account.disconnect

Disconnect a trading account.

Method

command.trading_account.disconnect

Description

Disconnects a trading account from Cadenza. All trading functions and event stream notifications will be stopped. The account will be archived and no longer available for trading. To reconnect the same exchange account, create a new connection using command.trading_account.connect.

Parameters

FieldTypeRequiredDescription
tradingAccountIdstringYesTrading account ID to disconnect

Result

Returns the disconnected trading account object.

Trading Account Object

FieldTypeDescription
tradingAccountIdstringUnique account identifier
venuestringExchange venue
statusstringUpdated status (DISCONNECTED)
updatedAtintegerLast update timestamp (ms)

Usage

result = await client.rpc("command.trading_account.disconnect", {
"tradingAccountId": "550e8400-e29b-41d4-a716-446655440000"
})

Example Response

{
"tradingAccountId": "550e8400-e29b-41d4-a716-446655440000",
"externalTradingAccountId": "123456789",
"venue": "BINANCE",
"nickname": "Main Binance Account",
"accountType": "SPOT",
"status": "DISCONNECTED",
"createdAt": 1703052635110,
"updatedAt": 1703152635110
}

Notes

  • Disconnecting an account does not cancel open orders
  • Historical data remains accessible after disconnection
  • Subscriptions to the account channel will stop receiving updates