Account Endpoints
Account information (USER_DATA)
GET /api/v3/account
Get current account information.
Weight: 20
Parameters:
Name | Type | Mandatory | Description |
---|---|---|---|
omitZeroBalances | BOOLEAN | NO | When set to true , emits only the non-zero balances of an account. Default value: false |
recvWindow | LONG | NO | The value cannot be greater than 60000 |
timestamp | LONG | YES |
Data Source: Memory => Database
Response:
{
"makerCommission": 15,
"takerCommission": 15,
"buyerCommission": 0,
"sellerCommission": 0,
"commissionRates": {
"maker": "0.00150000",
"taker": "0.00150000",
"buyer": "0.00000000",
"seller": "0.00000000"
},
"canTrade": true,
"canWithdraw": true,
"canDeposit": true,
"brokered": false,
"requireSelfTradePrevention": false,
"preventSor": false,
"updateTime": 123456789,
"accountType": "SPOT",
"balances": [
{
"asset": "BTC",
"free": "4723846.89208129",
"locked": "0.00000000"
},
{
"asset": "LTC",
"free": "4763368.68006011",
"locked": "0.00000000"
}
],
"permissions": [
"SPOT"
],
"uid": 354937868
}
Account trade list (USER_DATA)
GET /api/v3/myTrades
Get trades for a specific account and symbol.
Weight: 20
Parameters:
Name | Type | Mandatory | Description |
---|---|---|---|
symbol | STRING | YES | |
orderId | LONG | NO | This can only be used in combination with symbol . |
startTime | LONG | NO | |
endTime | LONG | NO | |
fromId | LONG | NO | TradeId to fetch from. Default gets most recent trades. |
limit | INT | NO | Default 500; max 1000. |
recvWindow | LONG | NO | The value cannot be greater than 60000 |
timestamp | LONG | YES |
Notes:
- If
fromId
is set, it will get trades >= thatfromId
. Otherwise most recent trades are returned. - The time between
startTime
andendTime
can't be longer than 24 hours. - These are the supported combinations of all parameters:
symbol
symbol
+orderId
symbol
+startTime
symbol
+endTime
symbol
+fromId
symbol
+startTime
+endTime
symbol
+orderId
+fromId
Data Source: Memory => Database
Response:
[
{
"symbol": "BNBBTC",
"id": 28457,
"orderId": 100234,
"orderListId": -1,
"price": "4.00000100",
"qty": "12.00000000",
"quoteQty": "48.000012",
"commission": "10.10000000",
"commissionAsset": "BNB",
"time": 1499865549590,
"isBuyer": true,
"isMaker": false,
"isBestMatch": true
}
]
Query Unfilled Order Count (USER_DATA)
GET /api/v3/rateLimit/order
Displays the user's unfilled order count for all intervals.
Weight: 40
Parameters:
Name | Type | Mandatory | Description |
---|---|---|---|
recvWindow | LONG | NO | The value cannot be greater than 60000 |
timestamp | LONG | YES |
Data Source: Memory
Response:
[
{
"rateLimitType": "ORDERS",
"interval": "SECOND",
"intervalNum": 10,
"limit": 50,
"count": 0
},
{
"rateLimitType": "ORDERS",
"interval": "DAY",
"intervalNum": 1,
"limit": 160000,
"count": 0
}
]
Query Prevented Matches (USER_DATA)
GET /api/v3/myPreventedMatches
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:
[
{
"symbol": "BTCUSDT",
"preventedMatchId": 1,
"takerOrderId": 5,
"makerSymbol": "BTCUSDT",
"makerOrderId": 3,
"tradeGroupId": 1,
"selfTradePreventionMode": "EXPIRE_MAKER",
"price": "1.100000",
"makerPreventedQuantity": "1.300000",
"transactTime": 1669101687094
}
]
Query Allocations (USER_DATA)
GET /api/v3/myAllocations
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:
[
{
"symbol": "BTCUSDT",
"allocationId": 0,
"allocationType": "SOR",
"orderId": 1,
"orderListId": -1,
"price": "1.00000000",
"qty": "5.00000000",
"quoteQty": "5.00000000",
"commission": "0.00000000",
"commissionAsset": "BTC",
"time": 1687506878118,
"isBuyer": true,
"isMaker": false,
"isAllocator": false
}
]
Query Commission Rates (USER_DATA)
GET /api/v3/account/commission
Get current account commission rates.
Weight: 20
Parameters:
Name | Type | Mandatory | Description |
---|---|---|---|
symbol | STRING | YES |
Data Source: Database
Response:
{
"symbol": "BTCUSDT",
"standardCommission": { //Commission rates on trades from the order.
"maker": "0.00000010",
"taker": "0.00000020",
"buyer": "0.00000030",
"seller": "0.00000040"
},
"taxCommission": { //Tax commission rates for trades from the order.
"maker": "0.00000112",
"taker": "0.00000114",
"buyer": "0.00000118",
"seller": "0.00000116"
},
"discount": { //Discount commission 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.
}
}