Skip to main content

command.trading_account.connect

Connect a trading account.

Method

command.trading_account.connect

Description

Connects a new trading account to Cadenza using provided API credentials. Upon successful connection, the account will be available for trading operations and real-time updates.

Parameters

FieldTypeRequiredDescription
credentialIdstringYesCredential ID to use for connection
nicknamestringNoUser-friendly account name

Result

Returns the connected trading account object.

Trading Account Object

FieldTypeDescription
tradingAccountIdstringUnique account identifier (UUID)
externalTradingAccountIdstringExchange account ID
venuestringExchange venue
nicknamestringAccount name
accountTypestringAccount type
statusstringAccount status (CONNECTED)
credentialsarrayAssociated credentials
createdAtintegerCreation timestamp (ms)
updatedAtintegerLast update timestamp (ms)

Usage

result = await client.rpc("command.trading_account.connect", {
"credentialId": "660e8400-e29b-41d4-a716-446655440001",
"nickname": "Main Binance Account"
})

Example Response

{
"tradingAccountId": "550e8400-e29b-41d4-a716-446655440000",
"externalTradingAccountId": "123456789",
"venue": "BINANCE",
"nickname": "Main Binance Account",
"accountType": "SPOT",
"status": "CONNECTED",
"credentials": [
{
"credentialId": "660e8400-e29b-41d4-a716-446655440001",
"venue": "BINANCE",
"status": "VERIFIED"
}
],
"createdAt": 1703052635110,
"updatedAt": 1703052635110
}

Notes

  • Credentials must be verified before connecting an account
  • Each credential can only be connected to one trading account
  • The account type is determined by the credential permissions