Skip to main content

List Portfolio

List portfolio positions across trading accounts.

Endpoint

GET /api/v3/tradingAccount/portfolio/list

Description

Retrieves portfolio positions (balances) for trading accounts. Can query all accounts or filter by specific accounts and currencies.

Authentication

Requires Bearer token authentication.

Authorization: Bearer {access_token}

Request Parameters

ParameterTypeRequiredDescription
tradingAccountIdstringNoFilter by trading account ID
venuestringNoFilter by exchange venue
currencystringNoFilter by currency (e.g., BTC, USDT)
limitintegerNoMaximum results (default: 10, max: 100)
offsetintegerNoNumber of results to skip

Response

Returns an array of portfolio position objects.

FieldTypeDescription
tradingAccountIdstringTrading account identifier
venuestringExchange venue
currencystringAsset currency
balancestringTotal balance
availablestringAvailable balance (not in orders)
lockedstringLocked balance (in open orders)
updatedAtintegerLast update timestamp (milliseconds)

Usage

import requests

headers = {"Authorization": f"Bearer {access_token}"}

# Get all portfolio positions
response = requests.get(
"https://cadenza-api-uat.algo724.com/api/v3/tradingAccount/portfolio/list",
headers=headers
)

positions = response.json()["data"]
for pos in positions:
print(f"{pos['currency']}: {pos['available']} available, {pos['locked']} locked")

# Get portfolio for specific account
response = requests.get(
"https://cadenza-api-uat.algo724.com/api/v3/tradingAccount/portfolio/list",
headers=headers,
params={
"tradingAccountId": "550e8400-e29b-41d4-a716-446655440000"
}
)

# Get only USDT balances
response = requests.get(
"https://cadenza-api-uat.algo724.com/api/v3/tradingAccount/portfolio/list",
headers=headers,
params={
"currency": "USDT"
}
)
curl "https://cadenza-api-uat.algo724.com/api/v3/tradingAccount/portfolio/list?tradingAccountId=550e8400-e29b-41d4-a716-446655440000" \
-H "Authorization: Bearer eyJhbGciOiJIUzI1NiIs..."

Example Response

{
"data": [
{
"tradingAccountId": "550e8400-e29b-41d4-a716-446655440000",
"venue": "BINANCE",
"currency": "BTC",
"balance": "1.5",
"available": "1.3",
"locked": "0.2",
"updatedAt": 1703052635110
},
{
"tradingAccountId": "550e8400-e29b-41d4-a716-446655440000",
"venue": "BINANCE",
"currency": "USDT",
"balance": "50000.00",
"available": "45000.00",
"locked": "5000.00",
"updatedAt": 1703052635110
},
{
"tradingAccountId": "550e8400-e29b-41d4-a716-446655440000",
"venue": "BINANCE",
"currency": "ETH",
"balance": "10.0",
"available": "10.0",
"locked": "0",
"updatedAt": 1703052635110
}
],
"success": true,
"errno": 0,
"error": null,
"pagination": {
"offset": 0,
"limit": 10,
"total": 3
}
}

Error Responses

HTTP CodeErrorDescription
400Invalid requestInvalid parameter values
401UnauthorizedInvalid or expired access token
404Not foundTrading account not found

Notes

  • balance = available + locked
  • locked represents funds in open orders
  • Balances are synced from the exchange periodically
  • For real-time balance updates, use the WebSocket API and subscribe to the trading account channel
  • Zero balances may be omitted from the response