REST reference / Trading and account

Account information

GET/fapi/v2/account
Signed requestRead permissionWeight 5

Overview

Live account totals and open positions with database fallback

Send X-MBX-APIKEY and an HMAC-SHA256 signature. Sign requests in your own client. Authentication guide

Behavior and request rules

Requires X-MBX-APIKEY and per-request HMAC-SHA256. Send timestamp (milliseconds), optional recvWindow (default 5000, maximum 60000), and signature. Sign the exact raw query followed by the exact raw body, with NO inserted ampersand, excluding signature. Signature must be last in query or body. Query values take precedence over body values; the first duplicate in each location wins. Values are not percent-decoded. Timestamp must be less than serverTime + 1000 and serverTime - timestamp <= recvWindow. The API-key authorization field alone does not sign requests.

Parameters may be in query, raw urlencoded body, or split across both. Required fields apply to the merged parameters, not independently to each location. Query parameters are marked optional to represent this alternative. GET bodies work at the server but many HTTP clients and proxies cannot send them; use query parameters for portable GET requests. Send the exact bytes you signed, without form re-encoding.

USER_DATA (READ) permission is required.

Parameters

Required fields apply across query and form body. Query values take precedence. The examples use query parameters only.

timestampintegerrequired

Client epoch milliseconds checked against the receive window.

Constraints
type
"integer"
format
"int64"
recvWindowintegeroptional

Receive window in milliseconds.

Constraints
type
"integer"
minimum
1
maximum
60000
default
5000
signaturestringrequired

HMAC-SHA256 of exact raw query + body excluding signature; final parameter in query or body.

Constraints
type
"string"
pattern
"^[0-9a-fA-F]{64}$"
Conditional and combined requirements

These constraints apply after query and body parameters are combined. Field descriptions above explain conditions such as the LIMIT price requirement.

Combined parameter schema
{
  "properties": {
    "recvWindow": {
      "default": 5000,
      "description": "Receive window in milliseconds.",
      "maximum": 60000,
      "minimum": 1,
      "type": "integer"
    },
    "signature": {
      "description": "HMAC-SHA256 of exact raw query + body excluding signature; final parameter in query or body.",
      "pattern": "^[0-9a-fA-F]{64}$",
      "type": "string"
    },
    "timestamp": {
      "description": "Client epoch milliseconds checked against the receive window.",
      "format": "int64",
      "type": "integer"
    }
  },
  "required": [
    "timestamp",
    "signature"
  ],
  "type": "object"
}
Form body schema

Parameters may be in query, raw urlencoded body, or split across both. Required fields apply to the merged parameters, not independently to each location. Query parameters are marked optional to represent this alternative. GET bodies work at the server but many HTTP clients and proxies cannot send them; use query parameters for portable GET requests. Send the exact bytes you signed, without form re-encoding.

Form body schema
{
  "application/x-www-form-urlencoded": {
    "schema": {
      "properties": {
        "recvWindow": {
          "default": 5000,
          "description": "Receive window in milliseconds.",
          "maximum": 60000,
          "minimum": 1,
          "type": "integer"
        },
        "signature": {
          "description": "HMAC-SHA256 of exact raw query + body excluding signature; final parameter in query or body.",
          "pattern": "^[0-9a-fA-F]{64}$",
          "type": "string"
        },
        "timestamp": {
          "description": "Client epoch milliseconds checked against the receive window.",
          "format": "int64",
          "type": "integer"
        }
      },
      "type": "object"
    }
  }
}

Responses

Success

assetsBalance[]required
Array items Balance
accountAliasstringrequired
type
"string"
accountIdintegerrequired
type
"integer"
format
"int64"
assetstringrequired
type
"string"
availableBalancestringrequired

Decimal encoded as a string. Precision follows the symbol or the field's documented scale. Never convert to a binary floating-point number for signing or accounting.

type
"string"
pattern
"^-?[0-9]+(\\.[0-9]+)?$"
balancestringrequired

Decimal encoded as a string. Precision follows the symbol or the field's documented scale. Never convert to a binary floating-point number for signing or accounting.

type
"string"
pattern
"^-?[0-9]+(\\.[0-9]+)?$"
crossUnPnlstringrequired

Decimal encoded as a string. Precision follows the symbol or the field's documented scale. Never convert to a binary floating-point number for signing or accounting.

type
"string"
pattern
"^-?[0-9]+(\\.[0-9]+)?$"
crossWalletBalancestringrequired

Decimal encoded as a string. Precision follows the symbol or the field's documented scale. Never convert to a binary floating-point number for signing or accounting.

type
"string"
pattern
"^-?[0-9]+(\\.[0-9]+)?$"
marginAvailablebooleanrequired
type
"boolean"
maxWithdrawAmountstringrequired

Decimal encoded as a string. Precision follows the symbol or the field's documented scale. Never convert to a binary floating-point number for signing or accounting.

type
"string"
pattern
"^-?[0-9]+(\\.[0-9]+)?$"
updateTimeintegerrequired
type
"integer"
format
"int64"
type
"object"
additionalProperties
false
type
"array"
availableBalancestringrequired

Decimal encoded as a string. Precision follows the symbol or the field's documented scale. Never convert to a binary floating-point number for signing or accounting.

type
"string"
pattern
"^-?[0-9]+(\\.[0-9]+)?$"
canDepositbooleanrequired
type
"boolean"
const
false
canTradebooleanrequired
type
"boolean"
canWithdrawbooleanrequired
type
"boolean"
const
false
feeTierintegerrequired
type
"integer"
format
"int64"
maxWithdrawAmountstringrequired

Decimal encoded as a string. Precision follows the symbol or the field's documented scale. Never convert to a binary floating-point number for signing or accounting.

type
"string"
pattern
"^-?[0-9]+(\\.[0-9]+)?$"
positionsAccountPosition[]required
Array items AccountPosition
entryPricestringrequired

Decimal encoded as a string. Precision follows the symbol or the field's documented scale. Never convert to a binary floating-point number for signing or accounting.

type
"string"
pattern
"^-?[0-9]+(\\.[0-9]+)?$"
initialMarginstringrequired

Decimal encoded as a string. Precision follows the symbol or the field's documented scale. Never convert to a binary floating-point number for signing or accounting.

type
"string"
pattern
"^-?[0-9]+(\\.[0-9]+)?$"
isolatedbooleanrequired
type
"boolean"
leveragestringrequired
type
"string"
maintMarginstringrequired

Decimal encoded as a string. Precision follows the symbol or the field's documented scale. Never convert to a binary floating-point number for signing or accounting.

type
"string"
pattern
"^-?[0-9]+(\\.[0-9]+)?$"
marginTypestringrequired
type
"string"
enum
["cross"]
maxNotionalstringrequired

Decimal encoded as a string. Precision follows the symbol or the field's documented scale. Never convert to a binary floating-point number for signing or accounting.

type
"string"
pattern
"^-?[0-9]+(\\.[0-9]+)?$"
openOrderInitialMarginstringrequired

Decimal encoded as a string. Precision follows the symbol or the field's documented scale. Never convert to a binary floating-point number for signing or accounting.

type
"string"
pattern
"^-?[0-9]+(\\.[0-9]+)?$"
positionAmtstringrequired

Decimal encoded as a string. Precision follows the symbol or the field's documented scale. Never convert to a binary floating-point number for signing or accounting.

type
"string"
pattern
"^-?[0-9]+(\\.[0-9]+)?$"
positionInitialMarginstringrequired

Decimal encoded as a string. Precision follows the symbol or the field's documented scale. Never convert to a binary floating-point number for signing or accounting.

type
"string"
pattern
"^-?[0-9]+(\\.[0-9]+)?$"
positionSidestringrequired
type
"string"
enum
["BOTH"]
symbolstringrequired
type
"string"
unrealizedProfitstringrequired

Decimal encoded as a string. Precision follows the symbol or the field's documented scale. Never convert to a binary floating-point number for signing or accounting.

type
"string"
pattern
"^-?[0-9]+(\\.[0-9]+)?$"
updateTimeintegerrequired
type
"integer"
format
"int64"
type
"object"
additionalProperties
false
type
"array"
totalCrossUnPnlstringrequired

Decimal encoded as a string. Precision follows the symbol or the field's documented scale. Never convert to a binary floating-point number for signing or accounting.

type
"string"
pattern
"^-?[0-9]+(\\.[0-9]+)?$"
totalCrossWalletBalancestringrequired

Decimal encoded as a string. Precision follows the symbol or the field's documented scale. Never convert to a binary floating-point number for signing or accounting.

type
"string"
pattern
"^-?[0-9]+(\\.[0-9]+)?$"
totalInitialMarginstringrequired

Decimal encoded as a string. Precision follows the symbol or the field's documented scale. Never convert to a binary floating-point number for signing or accounting.

type
"string"
pattern
"^-?[0-9]+(\\.[0-9]+)?$"
totalMaintMarginstringrequired

Decimal encoded as a string. Precision follows the symbol or the field's documented scale. Never convert to a binary floating-point number for signing or accounting.

type
"string"
pattern
"^-?[0-9]+(\\.[0-9]+)?$"
totalMarginBalancestringrequired

Decimal encoded as a string. Precision follows the symbol or the field's documented scale. Never convert to a binary floating-point number for signing or accounting.

type
"string"
pattern
"^-?[0-9]+(\\.[0-9]+)?$"
totalOpenOrderInitialMarginstringrequired

Decimal encoded as a string. Precision follows the symbol or the field's documented scale. Never convert to a binary floating-point number for signing or accounting.

type
"string"
pattern
"^-?[0-9]+(\\.[0-9]+)?$"
totalPositionInitialMarginstringrequired

Decimal encoded as a string. Precision follows the symbol or the field's documented scale. Never convert to a binary floating-point number for signing or accounting.

type
"string"
pattern
"^-?[0-9]+(\\.[0-9]+)?$"
totalUnrealizedProfitstringrequired

Decimal encoded as a string. Precision follows the symbol or the field's documented scale. Never convert to a binary floating-point number for signing or accounting.

type
"string"
pattern
"^-?[0-9]+(\\.[0-9]+)?$"
totalWalletBalancestringrequired

Decimal encoded as a string. Precision follows the symbol or the field's documented scale. Never convert to a binary floating-point number for signing or accounting.

type
"string"
pattern
"^-?[0-9]+(\\.[0-9]+)?$"
updateTimeintegerrequired
type
"integer"
format
"int64"
type
"object"
additionalProperties
false
Response headers
X-DP-ACCOUNT-USED-WEIGHT-1M

Per-verified-Trading-Account admitted weight when authenticated.

X-MBX-USED-WEIGHT-1M

Per-IP admitted request weight in the current minute. Requests admitted by the limiter count even if authentication or validation later fails.

Raw response schema
Response schema
{
  "$ref": "#/components/schemas/Account"
}
Errors, limits and retry behavior