query.trading_account.list
List trading accounts.
Method
query.trading_account.list
Description
Returns a list of trading accounts associated with the current user. Filter by venue, account status, or specific account IDs.
Parameters
| Field | Type | Required | Description |
|---|---|---|---|
tradingAccountId | string | No | Filter by specific account ID |
venue | string | No | Filter by venue (e.g., "BINANCE") |
status | string | No | Filter by status (CONNECTED, DISCONNECTED, DISABLED) |
limit | integer | No | Maximum results (default: 100) |
offset | integer | No | Pagination offset |
Result
Returns an array of trading account objects.
Trading Account Object
| Field | Type | Description |
|---|---|---|
tradingAccountId | string | Unique account identifier (UUID) |
externalTradingAccountId | string | Exchange account ID |
venue | string | Exchange venue |
nickname | string | User-defined account name |
accountType | string | Account type (SPOT, MARGIN, FUTURES) |
credentials | array | Associated credentials |
status | string | Account status |
createdAt | integer | Creation timestamp (ms) |
updatedAt | integer | Last update timestamp (ms) |
Account Status Values
| Status | Description |
|---|---|
CONNECTED | Account is active and connected |
DISCONNECTED | Account is disconnected |
DISABLED | Account is disabled |
Usage
# List all accounts
result = await client.rpc("query.trading_account.list", {})
# List accounts by venue
result = await client.rpc("query.trading_account.list", {
"venue": "BINANCE",
"status": "CONNECTED"
})
Example Response
{
"data": [
{
"tradingAccountId": "550e8400-e29b-41d4-a716-446655440000",
"externalTradingAccountId": "123456789",
"venue": "BINANCE",
"nickname": "Main Trading Account",
"accountType": "SPOT",
"status": "CONNECTED",
"credentials": [
{
"credentialId": "660e8400-e29b-41d4-a716-446655440001",
"venue": "BINANCE",
"status": "VERIFIED"
}
],
"createdAt": 1703052635110,
"updatedAt": 1703052635110
}
],
"pagination": {
"offset": 0,
"limit": 100,
"total": 3
}
}