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:
Name | Type | Mandatory | Description |
---|---|---|---|
apiKey | STRING | YES | |
omitZeroBalances | BOOLEAN | NO | When set to true , emits only the non-zero balances of an account. Default value: false |
recvWindow | INT | NO | The value cannot be greater than 60000 |
signature | STRING | YES | |
timestamp | INT | YES |
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:
Name | Type | Mandatory | Description |
---|---|---|---|
apiKey | STRING | YES | |
recvWindow | INT | NO | The value cannot be greater than 60000 |
signature | STRING | YES | |
timestamp | INT | YES |
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:
Name | Type | Mandatory | Description |
---|---|---|---|
symbol | STRING | YES | |
orderId | INT | NO | Order ID to begin at |
startTime | INT | NO | |
endTime | INT | NO | |
limit | INT | NO | Default 500; max 1000 |
apiKey | STRING | YES | |
recvWindow | INT | NO | The value cannot be greater than 60000 |
signature | STRING | YES | |
timestamp | INT | YES |
Notes:
-
If
startTime
and/orendTime
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
andendTime
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:
Name | Type | Mandatory | Description |
---|---|---|---|
fromId | INT | NO | Order list ID to begin at |
startTime | INT | NO | |
endTime | INT | NO | |
limit | INT | NO | Default 500; max 1000 |
apiKey | STRING | YES | |
recvWindow | INT | NO | The value cannot be greater than 60000 |
signature | STRING | YES | |
timestamp | INT | YES |
Notes:
-
If
startTime
and/orendTime
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
andendTime
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:
Name | Type | Mandatory | Description |
---|---|---|---|
symbol | STRING | YES | |
orderId | INT | NO | |
startTime | INT | NO | |
endTime | INT | NO | |
fromId | INT | NO | First trade ID to query |
limit | INT | NO | Default 500; max 1000 |
apiKey | STRING | YES | |
recvWindow | INT | NO | The value cannot be greater than 60000 |
signature | STRING | YES | |
timestamp | INT | YES |
Notes:
-
If
fromId
is specified, return trades with trade ID >=fromId
. -
If
startTime
and/orendTime
are specified, trades are filtered by execution time (time
).fromId
cannot be used together withstartTime
andendTime
. -
If
orderId
is specified, only trades related to that order are returned.startTime
andendTime
cannot be used together withorderId
. -
If no condition is specified, the most recent trades are returned.
-
The time between
startTime
andendTime
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:
Name | Type | Mandatory | Description |
---|---|---|---|
symbol | STRING | YES | |
preventedMatchId | LONG | NO | |
orderId | LONG | NO | |
fromPreventedMatchId | LONG | NO | |
limit | INT | NO | Default: 500 ; Max: 1000 |
recvWindow | LONG | NO | The value cannot be greater than 60000 |
timestamp | LONG | YES |
Weight
Case | Weight |
---|---|
If symbol is invalid | 2 |
Querying by preventedMatchId | 2 |
Querying by orderId | 20 |
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:
Name | Type | Mandatory | Description |
---|---|---|---|
symbol | STRING | Yes | |
startTime | LONG | No | |
endTime | LONG | No | |
fromAllocationId | INT | No | |
limit | INT | No | Default 500;Max 1000 |
orderId | LONG | No | |
recvWindow | LONG | No | The value cannot be greater than 60000 |
timestamp | LONG | No |
Supported parameter combinations:
Parameters | Response |
---|---|
symbol | allocations from oldest to newest |
symbol + startTime | oldest allocations since startTime |
symbol + endTime | newest allocations until endTime |
symbol + startTime + endTime | allocations within the time range |
symbol + fromAllocationId | allocations by allocation ID |
symbol + orderId | allocations related to an order starting with oldest |
symbol + orderId + fromAllocationId | allocations 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:
Name | Type | Mandatory | Description |
---|---|---|---|
symbol | STRING | YES |
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
}
]
}