Skip to main content

Batch Query Sub-Account Futures Balances

Type: GET

Description: /future/user/v1/broker-sub/balances

Base URL: https://fapi.xt.com (futures domain; the path must include the /future/user prefix)

Batch queries the futures assets of sub-accounts belonging to the broker. Sign the request with the broker master account's API Key.

Futures signature

This endpoint uses the futures signature rules, which differ from the spot and user-center endpoints:

  • X = validate-appkey=<ak>&validate-timestamp=<ts>
  • Y = #/future/user/v1/broker-sub/balances#<query> (no METHOD segment)
  • The validate-recvwindow header is not required.
  • Responses use returnCode / msgInfo instead of rc / mc.

Parameters​

NameTypeMandatoryDefaultDescriptionRanges
subAccountIdsstringfalse-Comma-separated sub-account ids; mutually exclusive with cursor-
cursorlongfalse-Cursor; sub-accounts are traversed in ascending id order-
limitintfalse50Items per page1-100

Request Example​

curl -X GET 'https://fapi.xt.com/future/user/v1/broker-sub/balances?limit=50' \
-H 'validate-algorithms: HmacSHA256' \
-H 'validate-appkey: {accessKey}' \
-H 'validate-timestamp: {timestamp}' \
-H 'validate-signature: {signature}'

Response Example​

Response
{
"returnCode": 0,
"msgInfo": "success",
"result": {
"items": [
{
"accountId": 10645823292041,
"userId": 9807285125185,
"coin": "usdt",
"underlyingType": 2,
"walletBalance": "0",
"marginBalance": "0",
"crossedMargin": "0",
"isolatedMargin": "0",
"openOrderMarginFrozen": "0",
"convertUsdtAmount": "0.0000",
"convertBtcAmount": "0.00000000",
"profit": "0",
"notProfit": "0"
}
],
"hasNext": true,
"nextCursor": 10645823357632,
"timestamp": 1792149634276
}
}

Response Parameters​

NameTypeDescription
items[].accountIdlongSub-account id
items[].userIdlongBroker master account uid
items[].coinstringCurrency
items[].underlyingTypeint1=coin-margined, 2=USDT-margined
items[].walletBalancestringWallet balance
items[].marginBalancestringMargin balance
items[].crossedMarginstringCross margin
items[].isolatedMarginstringIsolated margin
items[].openOrderMarginFrozenstringMargin frozen by open orders
items[].convertUsdtAmountstringAmount converted to USDT
items[].convertBtcAmountstringAmount converted to BTC
items[].profitstringRealized PnL
items[].notProfitstringUnrealized PnL
hasNextbooleanWhether there is a next page
nextCursorlongCursor for the next page; null when there is no next page
timestamplongResponse timestamp (milliseconds)