Skip to main content

Account requests

Account information (USER_DATA)

{
"id": "605a6d20-6588-4cb9-afa0-b0ab087507ba",
"method": "account.status",
"params": {
"apiKey": "vmPUZE6mv9SD5VNHk4HlWFsOr6aKE2zvsw0MuIgwCIPy6utIco14y7Ju91duEh8A",
"signature": "83303b4a136ac1371795f465808367242685a9e3a42b22edb4d977d0696eb45c",
"timestamp": 1660801839480
}
}

Query information about your account.

Weight: 20

Parameters:

NameTypeMandatoryDescription
apiKeySTRINGYES
omitZeroBalancesBOOLEANNOWhen set to true, emits only the non-zero balances of an account.
Default value: false
recvWindowINTNOThe value cannot be greater than 60000
signatureSTRINGYES
timestampINTYES

Data Source: Memory => Database

Response:

{
"id": "605a6d20-6588-4cb9-afa0-b0ab087507ba",
"status": 200,
"result": {
"makerCommission": 15,
"takerCommission": 15,
"buyerCommission": 0,
"sellerCommission": 0,
"canTrade": true,
"canWithdraw": true,
"canDeposit": true,
"commissionRates": {
"maker": "0.00150000",
"taker": "0.00150000",
"buyer": "0.00000000",
"seller": "0.00000000"
},
"brokered": false,
"requireSelfTradePrevention": false,
"preventSor": false,
"updateTime": 1660801833000,
"accountType": "SPOT",
"balances": [
{
"asset": "BNB",
"free": "0.00000000",
"locked": "0.00000000"
},
{
"asset": "BTC",
"free": "1.3447112",
"locked": "0.08600000"
},
{
"asset": "USDT",
"free": "1021.21000000",
"locked": "0.00000000"
}
],
"permissions": [
"SPOT"
],
"uid": 354937868
},
"rateLimits": [
{
"rateLimitType": "REQUEST_WEIGHT",
"interval": "MINUTE",
"intervalNum": 1,
"limit": 6000
,
"count": 20
}
]
}

Account unfilled order count (USER_DATA)

{
"id": "d3783d8d-f8d1-4d2c-b8a0-b7596af5a664",
"method": "account.rateLimits.orders",
"params": {
"apiKey": "vmPUZE6mv9SD5VNHk4HlWFsOr6aKE2zvsw0MuIgwCIPy6utIco14y7Ju91duEh8A",
"signature": "76289424d6e288f4dc47d167ac824e859dabf78736f4348abbbac848d719eb94",
"timestamp": 1660801839500
}
}

Query your current unfilled order count for all intervals.

Weight: 40

Parameters:

NameTypeMandatoryDescription
apiKeySTRINGYES
recvWindowINTNOThe value cannot be greater than 60000
signatureSTRINGYES
timestampINTYES

Data Source: Memory

Response:

{
"id": "d3783d8d-f8d1-4d2c-b8a0-b7596af5a664",
"status": 200,
"result": [
{
"rateLimitType": "ORDERS",
"interval": "SECOND",
"intervalNum": 10,
"limit": 50,
"count": 0
},
{
"rateLimitType": "ORDERS",
"interval": "DAY",
"intervalNum": 1,
"limit": 160000,
"count": 0
}
],
"rateLimits": [
{
"rateLimitType": "REQUEST_WEIGHT",
"interval": "MINUTE",
"intervalNum": 1,
"limit": 6000,
"count": 40
}
]
}

Account order history (USER_DATA)

{
"id": "734235c2-13d2-4574-be68-723e818c08f3",
"method": "allOrders",
"params": {
"symbol": "BTCUSDT",
"startTime": 1660780800000,
"endTime": 1660867200000,
"limit": 5,
"apiKey": "vmPUZE6mv9SD5VNHk4HlWFsOr6aKE2zvsw0MuIgwCIPy6utIco14y7Ju91duEh8A",
"signature": "f50a972ba7fad92842187643f6b930802d4e20bce1ba1e788e856e811577bd42",
"timestamp": 1661955123341
}
}

Query information about all your orders – active, canceled, filled – filtered by time range.

Weight: 20

Parameters:

NameTypeMandatoryDescription
symbolSTRINGYES
orderIdINTNOOrder ID to begin at
startTimeINTNO
endTimeINTNO
limitINTNODefault 500; max 1000
apiKeySTRINGYES
recvWindowINTNOThe value cannot be greater than 60000
signatureSTRINGYES
timestampINTYES

Notes:

  • If startTime and/or endTime are specified, orderId is ignored.

    Orders are filtered by time of the last execution status update.

  • If orderId is specified, return orders with order ID >= orderId.

  • If no condition is specified, the most recent orders are returned.

  • For some historical orders the cummulativeQuoteQty response field may be negative, meaning the data is not available at this time.

  • The time between startTime and endTime can't be longer than 24 hours.

Data Source: Database

Response:

Status reports for orders are identical to order.status.

Note that some fields are optional and included only for orders that set them.

{
"id": "734235c2-13d2-4574-be68-723e818c08f3",
"status": 200,
"result": [
{
"symbol": "BTCUSDT",
"orderId": 12569099453,
"orderListId": -1,
"clientOrderId": "4d96324ff9d44481926157",
"price": "23416.10000000",
"origQty": "0.00847000",
"executedQty": "0.00847000",
"cummulativeQuoteQty": "198.33521500",
"status": "FILLED",
"timeInForce": "GTC",
"type": "LIMIT",
"side": "SELL",
"stopPrice": "0.00000000",
"icebergQty": "0.00000000",
"time": 1660801715639,
"updateTime": 1660801717945,
"isWorking": true,
"workingTime": 1660801715639,
"origQuoteOrderQty": "0.00000000",
"selfTradePreventionMode": "NONE",
"preventedMatchId": 0, // This field only appears if the order expired due to STP.
"preventedQuantity": "1.200000" // This field only appears if the order expired due to STP.
}
],
"rateLimits": [
{
"rateLimitType": "REQUEST_WEIGHT",
"interval": "MINUTE",
"intervalNum": 1,
"limit": 6000,
"count": 20
}
]
}

Account order list history (USER_DATA)

{
"id": "8617b7b3-1b3d-4dec-94cd-eefd929b8ceb",
"method": "allOrderLists",
"params": {
"startTime": 1660780800000,
"endTime": 1660867200000,
"limit": 5,
"apiKey": "vmPUZE6mv9SD5VNHk4HlWFsOr6aKE2zvsw0MuIgwCIPy6utIco14y7Ju91duEh8A",
"signature": "c8e1484db4a4a02d0e84dfa627eb9b8298f07ebf12fcc4eaf86e4a565b2712c2",
"timestamp": 1661955123341
}
}

Query information about all your order lists, filtered by time range.

Weight: 20

Parameters:

NameTypeMandatoryDescription
fromIdINTNOOrder list ID to begin at
startTimeINTNO
endTimeINTNO
limitINTNODefault 500; max 1000
apiKeySTRINGYES
recvWindowINTNOThe value cannot be greater than 60000
signatureSTRINGYES
timestampINTYES

Notes:

  • If startTime and/or endTime are specified, fromId is ignored.

    Order lists are filtered by transactionTime of the last execution status update.

  • If fromId is specified, return order lists with order list ID >= fromId.

  • If no condition is specified, the most recent order lists are returned.

  • The time between startTime and endTime can't be longer than 24 hours.

Data Source: Database

Response:

Status reports for Order lists are identical to orderList.status.

{
"id": "8617b7b3-1b3d-4dec-94cd-eefd929b8ceb",
"status": 200,
"result": [
{
"orderListId": 1274512,
"contingencyType": "OCO",
"listStatusType": "EXEC_STARTED",
"listOrderStatus": "EXECUTING",
"listClientOrderId": "08985fedd9ea2cf6b28996",
"transactionTime": 1660801713793,
"symbol": "BTCUSDT",
"orders": [
{
"symbol": "BTCUSDT",
"orderId": 12569138901,
"clientOrderId": "BqtFCj5odMoWtSqGk2X9tU"
},
{
"symbol": "BTCUSDT",
"orderId": 12569138902,
"clientOrderId": "jLnZpj5enfMXTuhKB1d0us"
}
]
}
],
"rateLimits": [
{
"rateLimitType": "REQUEST_WEIGHT",
"interval": "MINUTE",
"intervalNum": 1,
"limit": 6000,
"count": 20
}
]
}

Account trade history (USER_DATA)

{
"id": "f4ce6a53-a29d-4f70-823b-4ab59391d6e8",
"method": "myTrades",
"params": {
"symbol": "BTCUSDT",
"startTime": 1660780800000,
"endTime": 1660867200000,
"apiKey": "vmPUZE6mv9SD5VNHk4HlWFsOr6aKE2zvsw0MuIgwCIPy6utIco14y7Ju91duEh8A",
"signature": "c5a5ffb79fd4f2e10a92f895d488943a57954edf5933bde3338dfb6ea6d6eefc",
"timestamp": 1661955125250
}
}

Query information about all your trades, filtered by time range.

Weight: 20

Parameters:

NameTypeMandatoryDescription
symbolSTRINGYES
orderIdINTNO
startTimeINTNO
endTimeINTNO
fromIdINTNOFirst trade ID to query
limitINTNODefault 500; max 1000
apiKeySTRINGYES
recvWindowINTNOThe value cannot be greater than 60000
signatureSTRINGYES
timestampINTYES

Notes:

  • If fromId is specified, return trades with trade ID >= fromId.

  • If startTime and/or endTime are specified, trades are filtered by execution time (time).

    fromId cannot be used together with startTime and endTime.

  • If orderId is specified, only trades related to that order are returned.

    startTime and endTime cannot be used together with orderId.

  • If no condition is specified, the most recent trades are returned.

  • The time between startTime and endTime can't be longer than 24 hours.

Data Source: Memory => Database

Response:

{
"id": "f4ce6a53-a29d-4f70-823b-4ab59391d6e8",
"status": 200,
"result": [
{
"symbol": "BTCUSDT",
"id": 1650422481,
"orderId": 12569099453,
"orderListId": -1,
"price": "23416.10000000",
"qty": "0.00635000",
"quoteQty": "148.69223500",
"commission": "0.00000000",
"commissionAsset": "BNB",
"time": 1660801715793,
"isBuyer": false,
"isMaker": true,
"isBestMatch": true
},
{
"symbol": "BTCUSDT",
"id": 1650422482,
"orderId": 12569099453,
"orderListId": -1,
"price": "23416.50000000",
"qty": "0.00212000",
"quoteQty": "49.64298000",
"commission": "0.00000000",
"commissionAsset": "BNB",
"time": 1660801715793,
"isBuyer": false,
"isMaker": true,
"isBestMatch": true
}
],
"rateLimits": [
{
"rateLimitType": "REQUEST_WEIGHT",
"interval": "MINUTE",
"intervalNum": 1,
"limit": 6000,
"count": 20
}
]
}

Account prevented matches (USER_DATA)

{
"id": "g4ce6a53-a39d-4f71-823b-4ab5r391d6y8",
"method": "myPreventedMatches",
"params": {
"symbol": "BTCUSDT",
"orderId": 35,
"apiKey": "vmPUZE6mv9SD5VNHk4HlWFsOr6aKE2zvsw0MuIgwCIPy6utIco14y7Ju91duEh8A",
"signature": "c5a5ffb79fd4f2e10a92f895d488943a57954edf5933bde3338dfb6ea6d6eefc",
"timestamp": 1673923281052
}
}

Displays the list of orders that were expired due to STP.

These are the combinations supported:

  • symbol + preventedMatchId
  • symbol + orderId
  • symbol + orderId + fromPreventedMatchId (limit will default to 500)
  • symbol + orderId + fromPreventedMatchId + limit

Parameters:

NameTypeMandatoryDescription
symbolSTRINGYES
preventedMatchIdLONGNO
orderIdLONGNO
fromPreventedMatchIdLONGNO
limitINTNODefault: 500; Max: 1000
recvWindowLONGNOThe value cannot be greater than 60000
timestampLONGYES

Weight

CaseWeight
If symbol is invalid2
Querying by preventedMatchId2
Querying by orderId20

Data Source:

Database

Response:

{
"id": "g4ce6a53-a39d-4f71-823b-4ab5r391d6y8",
"status": 200,
"result": [
{
"symbol": "BTCUSDT",
"preventedMatchId": 1,
"takerOrderId": 5,
"makerSymbol": "BTCUSDT",
"makerOrderId": 3,
"tradeGroupId": 1,
"selfTradePreventionMode": "EXPIRE_MAKER",
"price": "1.100000",
"makerPreventedQuantity": "1.300000",
"transactTime": 1669101687094
}
],
"rateLimits": [
{
"rateLimitType": "REQUEST_WEIGHT",
"interval": "MINUTE",
"intervalNum": 1,
"limit": 6000,
"count": 20
}
]
}

Account allocations (USER_DATA)

{
"id": "g4ce6a53-a39d-4f71-823b-4ab5r391d6y8",
"method": "myAllocations",
"params": {
"symbol": "BTCUSDT",
"orderId": 500,
"apiKey": "vmPUZE6mv9SD5VNHk4HlWFsOr6aKE2zvsw0MuIgwCIPy6utIco14y7Ju91duEh8A",
"signature": "c5a5ffb79fd4f2e10a92f895d488943a57954edf5933bde3338dfb6ea6d6eefc",
"timestamp": 1673923281052
}
}

Retrieves allocations resulting from SOR order placement.

Weight: 20

Parameters:

NameTypeMandatoryDescription
symbolSTRINGYes
startTimeLONGNo
endTimeLONGNo
fromAllocationIdINTNo
limitINTNoDefault 500;Max 1000
orderIdLONGNo
recvWindowLONGNoThe value cannot be greater than 60000
timestampLONGNo

Supported parameter combinations:

ParametersResponse
symbolallocations from oldest to newest
symbol + startTimeoldest allocations since startTime
symbol + endTimenewest allocations until endTime
symbol + startTime + endTimeallocations within the time range
symbol + fromAllocationIdallocations by allocation ID
symbol + orderIdallocations related to an order starting with oldest
symbol + orderId + fromAllocationIdallocations related to an order by allocation ID

Note: The time between startTime and endTime can't be longer than 24 hours.

Data Source: Database

Response:

{
"id": "g4ce6a53-a39d-4f71-823b-4ab5r391d6y8",
"status": 200,
"result": [
{
"symbol": "BTCUSDT",
"allocationId": 0,
"allocationType": "SOR",
"orderId": 500,
"orderListId": -1,
"price": "1.00000000",
"qty": "0.10000000",
"quoteQty": "0.10000000",
"commission": "0.00000000",
"commissionAsset": "BTC",
"time": 1687319487614,
"isBuyer": false,
"isMaker": false,
"isAllocator": false
}
],
"rateLimits": [
{
"rateLimitType": "REQUEST_WEIGHT",
"interval": "MINUTE",
"intervalNum": 1,
"limit": 6000,
"count": 20
}
]
}

Account Commission Rates (USER_DATA)

{
"id": "d3df8a61-98ea-4fe0-8f4e-0fcea5d418b0",
"method": "account.commission",
"params": {
"symbol": "BTCUSDT",
"apiKey": "vmPUZE6mv9SD5VNHk4HlWFsOr6aKE2zvsw0MuIgwCIPy6utIco14y7Ju91duEh8A",
"signature": "c5a5ffb79fd4f2e10a92f895d488943a57954edf5933bde3338dfb6ea6d6eefc",
"timestamp": 1673923281052
}
}

Get current account commission rates.

Parameters:

NameTypeMandatoryDescription
symbolSTRINGYES

Weight: 20

Data Source: Database

Response:

{
"id": "d3df8a61-98ea-4fe0-8f4e-0fcea5d418b0",
"status": 200,
"result":
[
{
"symbol": "BTCUSDT",
"standardCommission": //Standard commission rates on trades from the order.
{
"maker": "0.00000010",
"taker": "0.00000020",
"buyer": "0.00000030",
"seller": "0.00000040"
},
"taxCommission": //Tax commission rates on trades from the order.
{
"maker": "0.00000112",
"taker": "0.00000114",
"buyer": "0.00000118",
"seller": "0.00000116"
},
"discount": //Discount on standard commissions when paying in BNB.
{
"enabledForAccount": true,
"enabledForSymbol": true,
"discountAsset": "BNB",
"discount": "0.75000000" //Standard commission is reduced by this rate when paying commission in BNB.
}
}
],
"rateLimits":
[
{
"rateLimitType": "REQUEST_WEIGHT",
"interval": "MINUTE",
"intervalNum": 1,
"limit": 6000,
"count": 20
}
]
}