Get Balances
Returns the account balance per account. Without an account filter, returns a balance for each of the caller’s accounts.
Balances are a live, point-in-time view projected from the clearinghouse and can briefly differ from the exchange’s authoritative figures while trades, settlement, or funding are still being applied. Reconcile against settled statements rather than treating a single read as final.
GET
/portfolio/balancesAuthorization
UDX-Access-KeyAPI key · headerrequiredOpaque API key ID.
UDX-Access-TimestampAPI key · headerrequiredUnix time in milliseconds, within 30 seconds of server time.
UDX-Access-SignatureAPI key · headerrequiredStandard-base64 RSA-PSS/SHA-256 signature with a 32-byte salt. Sign `timestamp + METHOD + path`; for requests with a body, append `hex(SHA256(body))`; append `UDX-Idempotency-Key` when it is present.
or
AuthorizationBearer token (JWT) · headerrequiredBearer token for an active signed-in UDX user.
Query parameters
account_idEntityIdFilter to a single account.
tickerTickerScopes buying power to this market.
min length 1 · max length 128
limitintegerMaximum number of items to return in one page. Defaults to 10 when omitted; must be an integer from 1 to 100. A value outside that range is rejected with 400 rather than silently clamped. A returned next_page_url preserves the effective value.
min 1 · max 100 · default: 10
pagestringOpaque token identifying the requested page. Clients should not construct or extract this value; follow next_page_url from the previous response unchanged instead.
max length 512
sortstringField to sort balances by. Defaults to account_id.
default: "account_id"
Allowed:
account_idorderstringSort direction. Defaults to desc. Applies to the default sort field when sort is omitted. Nulls sort last in both directions.
default: "desc"
Allowed:
ascdescHeader parameters
UDX-VersionstringDated API version (YYYY-MM-DD). Omit to use the oldest supported version. An unknown version returns `400`.
max length 10
Responses
200A page of account balances.
balancesBalance[]requiredOne page of account balances.
max items 100
Show propertiesHide properties
Array of
Balanceaccount_idobjectrequiredThe account this balance is for.
Show propertiesHide properties
objectbalanceobjectrequiredTotal account cash balance, in dollars.
Show propertiesHide properties
objectavailable_balanceobjectFunds available to open new positions, in dollars. The `ticker` parameter scopes this value to that market.
Show propertiesHide properties
objectopen_ordersobjectFunds held by open orders, in dollars.
Show propertiesHide properties
objectmargin_heldobjectFunds held as margin against open positions and orders, in dollars.
Show propertiesHide properties
objectupdated_atstring<date-time>When the Balance last changed. UDX timestamps use RFC 3339; requests require an explicit UTC offset and zero to six fractional digits; responses use UTC with exactly six fractional digits.
max length 40
next_page_urlNextPageURL | nullrequiredRoot-relative URL for the next page, including the effective limit, sort, order, filters, and opaque cursor. Follow it unchanged with the same authentication. Null when there are no more items. It never contains credentials or an authority/host.
max length 4096 · matches ^/[^/\s#][^\s#]*$
400The request doesn't conform to this spec.
typestring<uri-reference>A stable URI identifying the error's general category. Usually absent (equivalent to "about:blank" per the RFC); documented rate controls use closed URN values so callers can distinguish same-status retry causes without parsing localized prose.
max length 2048
titlestringrequiredA localized, human-readable summary of the error category. Stable for a given status code and resolved language — clients must not use it as a machine-readable discriminator.
max length 40
statusintegerrequiredThe HTTP status code, repeated from the response itself.
detailstringA localized, human-readable explanation specific to this occurrence. Clients must not parse it for machine-readable information.
max length 500
instancestring<uri-reference>An identifier for this specific occurrence, so it can be correlated with server-side logs if you need to report it.
max length 100
401No valid credential was provided.
typestring<uri-reference>A stable URI identifying the error's general category. Usually absent (equivalent to "about:blank" per the RFC); documented rate controls use closed URN values so callers can distinguish same-status retry causes without parsing localized prose.
max length 2048
titlestringrequiredA localized, human-readable summary of the error category. Stable for a given status code and resolved language — clients must not use it as a machine-readable discriminator.
max length 40
statusintegerrequiredThe HTTP status code, repeated from the response itself.
detailstringA localized, human-readable explanation specific to this occurrence. Clients must not parse it for machine-readable information.
max length 500
instancestring<uri-reference>An identifier for this specific occurrence, so it can be correlated with server-side logs if you need to report it.
max length 100
403The credential lacks the `read` scope.
typestring<uri-reference>A stable URI identifying the error's general category. Usually absent (equivalent to "about:blank" per the RFC); documented rate controls use closed URN values so callers can distinguish same-status retry causes without parsing localized prose.
max length 2048
titlestringrequiredA localized, human-readable summary of the error category. Stable for a given status code and resolved language — clients must not use it as a machine-readable discriminator.
max length 40
statusintegerrequiredThe HTTP status code, repeated from the response itself.
detailstringA localized, human-readable explanation specific to this occurrence. Clients must not parse it for machine-readable information.
max length 500
instancestring<uri-reference>An identifier for this specific occurrence, so it can be correlated with server-side logs if you need to report it.
max length 100
429The member rate limit was exceeded. Wait for `Retry-After`.
typestring<uri-reference>A stable URI identifying the error's general category. Usually absent (equivalent to "about:blank" per the RFC); documented rate controls use closed URN values so callers can distinguish same-status retry causes without parsing localized prose.
max length 2048
titlestringrequiredA localized, human-readable summary of the error category. Stable for a given status code and resolved language — clients must not use it as a machine-readable discriminator.
max length 40
statusintegerrequiredThe HTTP status code, repeated from the response itself.
detailstringA localized, human-readable explanation specific to this occurrence. Clients must not parse it for machine-readable information.
max length 500
instancestring<uri-reference>An identifier for this specific occurrence, so it can be correlated with server-side logs if you need to report it.
max length 100
500Something went wrong on UDX's side.
typestring<uri-reference>A stable URI identifying the error's general category. Usually absent (equivalent to "about:blank" per the RFC); documented rate controls use closed URN values so callers can distinguish same-status retry causes without parsing localized prose.
max length 2048
titlestringrequiredA localized, human-readable summary of the error category. Stable for a given status code and resolved language — clients must not use it as a machine-readable discriminator.
max length 40
statusintegerrequiredThe HTTP status code, repeated from the response itself.
detailstringA localized, human-readable explanation specific to this occurrence. Clients must not parse it for machine-readable information.
max length 500
instancestring<uri-reference>An identifier for this specific occurrence, so it can be correlated with server-side logs if you need to report it.
max length 100
503Request admission or account setup is unavailable. Retry later.
typestring<uri-reference>A stable URI identifying the error's general category. Usually absent (equivalent to "about:blank" per the RFC); documented rate controls use closed URN values so callers can distinguish same-status retry causes without parsing localized prose.
max length 2048
titlestringrequiredA localized, human-readable summary of the error category. Stable for a given status code and resolved language — clients must not use it as a machine-readable discriminator.
max length 40
statusintegerrequiredThe HTTP status code, repeated from the response itself.
detailstringA localized, human-readable explanation specific to this occurrence. Clients must not parse it for machine-readable information.
max length 500
instancestring<uri-reference>An identifier for this specific occurrence, so it can be correlated with server-side logs if you need to report it.
max length 100
Request
curl -X GET "https://{hostname}/portfolio/balances" \
-H "UDX-Access-Key: API_KEY_ID" \
-H "UDX-Access-Timestamp: UNIX_MILLISECONDS" \
-H "UDX-Access-Signature: BASE64_SIGNATURE"const response = await fetch("https://{hostname}/portfolio/balances", {
method: "GET",
headers: {
"UDX-Access-Key": "API_KEY_ID",
"UDX-Access-Timestamp": "UNIX_MILLISECONDS",
"UDX-Access-Signature": "BASE64_SIGNATURE"
}
});import requests
response = requests.get(
"https://{hostname}/portfolio/balances",
headers={
"UDX-Access-Key": "API_KEY_ID",
"UDX-Access-Timestamp": "UNIX_MILLISECONDS",
"UDX-Access-Signature": "BASE64_SIGNATURE"
},
)Response
{
"balances": [
{
"account_id": "6820943174116859281",
"balance": "1000.00",
"available_balance": "820.00",
"open_orders": "80.00",
"margin_held": "100.00",
"updated_at": "2026-01-01T00:00:00.000000Z"
}
],
"next_page_url": null
}{
"title": "Bad Request",
"status": 400,
"detail": "request did not pass validation",
"instance": "urn:request-id:8f14e45f-ceea-4abc-a743-e89a34d3f6ef"
}{
"title": "Unauthorized",
"status": 401,
"detail": "invalid authentication credentials",
"instance": "urn:request-id:8f14e45f-ceea-4abc-a743-e89a34d3f6ef"
}{
"title": "Forbidden",
"status": 403,
"detail": "insufficient permissions",
"instance": "urn:request-id:8f14e45f-ceea-4abc-a743-e89a34d3f6ef"
}{
"type": "urn:udx:problem:member-rate-limit-exceeded",
"title": "Too Many Requests",
"status": 429,
"detail": "this member has temporarily exceeded its request rate",
"instance": "urn:request-id:8f14e45f-ceea-4abc-a743-e89a34d3f6ef"
}{
"title": "Internal Server Error",
"status": 500,
"detail": "internal error",
"instance": "urn:request-id:8f14e45f-ceea-4abc-a743-e89a34d3f6ef"
}{
"title": "Service Unavailable",
"status": 503,
"detail": "account setup is still being completed; retry later",
"instance": "urn:request-id:8f14e45f-ceea-4abc-a743-e89a34d3f6ef"
}{
"title": "Service Unavailable",
"status": 503,
"detail": "request admission is temporarily unavailable",
"instance": "urn:request-id:8f14e45f-ceea-4abc-a743-e89a34d3f6ef"
}