Skip to main content

Independent Broker Sub-Account Overview

Independent broker sub-accounts use the same account, asset, spot trading, and futures trading capabilities as standard sub-accounts.

The only difference is the statistics and commission attribution logic used for the independent broker business. There are no other functional differences.

For the endpoint and authentication rules used by the sub-account management APIs in this section, refer to Basic Information.

Trading APIs​

For spot and futures trading, use the standard sub-account API documentation:

note

Base URLs may differ between product sections. Before calling an API, check the Basic Information page in the corresponding section and use the Base URL documented there.

Deposit and Withdrawal History​

Independent broker sub-accounts use the standard spot account history APIs. Refer to the existing documentation:

For both endpoints, currency and chain are optional.

Domains and Signatures​

Independent broker sub-account APIs are served by three domains with different gateways. Make sure the domain and signature method match before sending a request.

API CategoryProduction DomainNotes
Spot sub-account balanceshttps://sapi.xt.comSpot domain
Futures sub-account balanceshttps://fapi.xt.comFutures domain; paths include the /future/user prefix
Sub-account management / fund querieshttps://api.xt.comUser-center domain

All endpoints must be signed with the independent broker master account's API Key. Only a master account that is an approved independent broker can call them.

Request headers:

HeaderDescription
validate-appkeyAPI Key access key
validate-timestampMillisecond timestamp
validate-algorithmsFixed value HmacSHA256
validate-recvwindowRequest validity window (milliseconds); required only for spot and user-center endpoints
validate-signatureHMAC-SHA256 signature of X + Y

The signature string X + Y is built differently per domain:

DomainX (parameters sorted alphabetically)Y
Spot sapi / User center apivalidate-algorithms=HmacSHA256&validate-appkey=<ak>&validate-recvwindow=5000&validate-timestamp=<ts>#<METHOD>#<path>#<query> (query sorted alphabetically by parameter name)
Futures fapivalidate-appkey=<ak>&validate-timestamp=<ts>#<path>#<query> (no METHOD)
note

Futures endpoints return returnCode / msgInfo; spot and user-center endpoints return rc / mc.

Sub-Account Limit​

An independent broker master account supports up to 50,000 sub-accounts, and each sub-account can create up to 10 API Keys. Use Query Sub-Account Quota to check current usage.

Error Codes​

mc / codeDescription
AUTH_001Not authenticated / signature missing
NO_OPERATION_PERMISSIONNo permission: not a master account, not an approved independent broker, or the uid does not belong to the broker
INVALID_PARAMInvalid parameter format, e.g. a non-numeric value for a numeric parameter or a non-existent currency
INVALID_TYPE_PARAM / INVALID_STATUS_PARAM / INVALID_DIRECTION_PARAMInvalid type / status / direction value
WALLET_SERVICE_UNAVAILABLEWallet service temporarily unavailable