Account & Trades (v2)
REST v2 under /api/v2/account for spot-relevant account flows (shared with contract accounts where the same key applies). U-margined futures v2: Account & Trades (v2).
Get account balance flow (USER_DATA)
GET /api/v2/account/balance-flow
Weight:5
Parameters
| Name | Type | Mandatory | Description |
|---|---|---|---|
| accountType | STRING | NO | MAIN or FUTURES (default MAIN) |
| coin | STRING | NO | token id |
| flowType | STRING | NO | flow type enum name (e.g. USER_ACCOUNT_TRANSFER); same naming as in data[].flowType |
| fromId | LONG | NO | Flow ID cursor; returns records with IDs less than this value |
| endId | LONG | NO | Flow ID cursor; returns records with IDs greater than this value |
| startTime | LONG | NO | start (ms) |
| endTime | LONG | NO | end (ms) |
| limit | INT | NO | default 20, min 1, max 1000 |
| timestamp | LONG | YES | — |
| recvWindow | LONG | NO | — |
Notes:
- Flow records are sorted by ID in descending order by default.
fromIdandendIdare exclusive boundaries. With onlyfromId, the endpoint returns earlier records; with onlyendId, it returns newer records in ascending ID order. If both cursors are provided, the endpoint returns records between them. For descending pagination, pass the page's maximum ID asendIdto retrieve the previous page, or its minimum ID asfromIdto retrieve the next page changeis the asset amount changed by the flow: a positive value indicates an increase and a negative value indicates a decrease. Public flow records alone do not identify the associated long or short position or establish a one-to-one link between a funding flow and a trade- Time parameters use milliseconds. Boundary-record inclusion for historical queries may vary by server-side query path; do not rely on records at the boundary timestamps being included. The queryable range depends on data available on the server; the request range does not constitute a data-retention commitment
flowType Enum Values
| Enum name | Description |
|---|---|
TRADE | Trade |
FEE | Trading fee |
TRANSFER | General transfer flow |
DEPOSIT | Deposit |
PNL | Contracts PnL |
LIQUIDATION | Liquidation |
FUNDING_SETTLEMENT | Funding fee settlement |
OTC_BUY_COIN | OTC buy coin |
OTC_SELL_COIN | OTC sell coin |
USER_ACCOUNT_TRANSFER | User account transfer |
AGENT_REFERRAL_BONUS_SPOT | Affiliate referral commission (spot) |
AGENT_REFERRAL_BONUS_FUTURES | Affiliate referral commission (futures) |
AGENT_REFERRAL_BONUS_CASHBACK_SPOT | Affiliate referral cashback (spot) |
AGENT_REFERRAL_BONUS_CASHBACK_FUTURES | Affiliate referral cashback (futures) |
AGENT_BROKER_REFERRAL_BONUS_SPOT | Broker referral commission (spot) |
AGENT_BROKER_REFERRAL_BONUS_CONTRACT | Broker referral commission (futures) |
Response
json
{
"code": 200,
"msg": "success",
"data": [
{
"id": "539870570957903104",
"accountType": "MAIN",
"coin": "BTC",
"symbol": "BTCUSDT",
"flowType": "USER_ACCOUNT_TRANSFER",
"flowName": "Transfer",
"change": "-12.5",
"total": "379.624059937852365",
"voucherType": 0,
"deductionAmount": "",
"created": "1579093587214"
}
]
}New response fields:
| Name | Type | Description |
|---|---|---|
| voucherType | INT | Voucher type. Common deduction types: 2 cash voucher, 3 trial voucher, 7 copy-trading trial voucher, and 8 lead-trading trial voucher. 0 means no applicable voucher is associated with the flow |
| deductionAmount | STRING | Voucher amount deducted by this flow, preserving decimal precision as a string; empty when no deduction applies |
In the response,
idandcreatedare returned as string-typed numbers in JSON, consistent with other v2 list APIs. The legacy v1 flow listGET /api/v1/account/balanceFlowremains available; the v2 route uses string accountType and flowType and omits deprecated numeric-only fields in the public reference. See SIGNED for request signing.