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 | DECIMAL | NO | The value cannot be greater than 60000. Supports up to three decimal places of precision (e.g., 6000.346) so that microseconds may be specified. |
| 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
}
Current open orders (USER_DATA)
GET /api/v3/openOrders
Get all open orders on a symbol. Careful when accessing this with no symbol.
Weight: 6 for a single symbol; 80 when the symbol parameter is omitted
Parameters:
| Name | Type | Mandatory | Description |
|---|---|---|---|
| symbol | STRING | NO | |
| recvWindow | DECIMAL | NO | The value cannot be greater than 60000. Supports up to three decimal places of precision (e.g., 6000.346) so that microseconds may be specified. |
| timestamp | LONG | YES |
- If the symbol is not sent, orders for all symbols will be returned in an array.
Data Source: Memory => Database
Response:
[
{
"symbol": "LTCBTC",
"orderId": 1,
"orderListId": -1, // Unless it's part of an order list, value will be -1
"clientOrderId": "myOrder1",
"price": "0.1",
"origQty": "1.0",
"executedQty": "0.0",
"cummulativeQuoteQty": "0.0",
"status": "NEW",
"timeInForce": "GTC",
"type": "LIMIT",
"side": "BUY",
"stopPrice": "0.0",
"icebergQty": "0.0",
"time": 1499827319559,
"updateTime": 1499827319559,
"isWorking": true,
"origQuoteOrderQty": "0.000000",
"workingTime": 1499827319559,
"selfTradePreventionMode": "NONE"
}
]
Note: The payload above does not show all fields that can appear. Please refer to Conditional fields in Order Responses.
All orders (USER_DATA)
GET /api/v3/allOrders
Get all account orders; active, canceled, or filled.
Weight: 20
Data Source: Database
Parameters:
| Name | Type | Mandatory | Description |
|---|---|---|---|
| symbol | STRING | YES | |
| orderId | LONG | NO | |
| startTime | LONG | NO | |
| endTime | LONG | NO | |
| limit | INT | NO | Default 500; Maximum: 1000. |
| recvWindow | DECIMAL | NO | The value cannot be greater than 60000. Supports up to three decimal places of precision (e.g., 6000.346) so that microseconds may be specified. |
| timestamp | LONG | YES |
Notes:
- If
orderIdis set, it will get orders >= thatorderId. Otherwise most recent orders are returned. - For some historical orders
cummulativeQuoteQtywill be < 0, meaning the data is not available at this time. - If
startTimeand/orendTimeprovided,orderIdis not required. - The time between
startTimeandendTimecan't be longer than 24 hours.
Response:
[
{
"symbol": "LTCBTC",
"orderId": 1,
"orderListId": -1, //Unless it's part of an order list, value will be -1
"clientOrderId": "myOrder1",
"price": "0.1",
"origQty": "1.0",
"executedQty": "0.0",
"cummulativeQuoteQty": "0.0",
"status": "NEW",
"timeInForce": "GTC",
"type": "LIMIT",
"side": "BUY",
"stopPrice": "0.0",
"icebergQty": "0.0",
"time": 1499827319559,
"updateTime": 1499827319559,
"isWorking": true,
"origQuoteOrderQty": "0.000000",
"workingTime": 1499827319559,
"selfTradePreventionMode": "NONE",
}
]
Note: The payload above does not show all fields that can appear. Please refer to Conditional fields in Order Responses.
Query Order list (USER_DATA)
GET /api/v3/orderList
Retrieves a specific order list based on provided optional parameters.
Weight:
4
Parameters:
| Name | Type | Mandatory | Description |
|---|---|---|---|
| orderListId | LONG | NO* | Query order list by orderListId. orderListId or origClientOrderId must be provided. |
| origClientOrderId | STRING | NO* | Query order list by listClientOrderId. orderListId or origClientOrderId must be provided. |
| recvWindow | DECIMAL | NO | The value cannot be greater than 60000. Supports up to three decimal places of precision (e.g., 6000.346) so that microseconds may be specified. |
| timestamp | LONG | YES |
Data Source: Database
Response:
{
"orderListId": 27,
"contingencyType": "OCO",
"listStatusType": "EXEC_STARTED",
"listOrderStatus": "EXECUTING",
"listClientOrderId": "h2USkA5YQpaXHPIrkd96xE",
"transactionTime": 1565245656253,
"symbol": "LTCBTC",
"orders": [
{
"symbol": "LTCBTC",
"orderId": 4,
"clientOrderId": "qD1gy3kc3Gx0rihm9Y3xwS"
},
{
"symbol": "LTCBTC",
"orderId": 5,
"clientOrderId": "ARzZ9I00CPM8i3NhmU9Ega"
}
]
}
Query all Order lists (USER_DATA)
GET /api/v3/allOrderList
Retrieves all order lists based on provided optional parameters
Note that the time between startTime and endTime can't be longer than 24 hours.
Weight:
20
Parameters:
| Name | Type | Mandatory | Description |
|---|---|---|---|
| fromId | LONG | NO | If supplied, neither startTime or endTime can be provided |
| startTime | LONG | NO | |
| endTime | LONG | NO | |
| limit | INT | NO | Default: 500; Maximum: 1000 |
| recvWindow | DECIMAL | NO | The value cannot be greater than 60000. Supports up to three decimal places of precision (e.g., 6000.346) so that microseconds may be specified. |
| timestamp | LONG | YES |
Data Source: Database
Response:
[
{
"orderListId": 29,
"contingencyType": "OCO",
"listStatusType": "EXEC_STARTED",
"listOrderStatus": "EXECUTING",
"listClientOrderId": "amEEAXryFzFwYF1FeRpUoZ",
"transactionTime": 1565245913483,
"symbol": "LTCBTC",
"orders": [
{
"symbol": "LTCBTC",
"orderId": 4,
"clientOrderId": "oD7aesZqjEGlZrbtRpy5zB"
},
{
"symbol": "LTCBTC",
"orderId": 5,
"clientOrderId": "Jr1h6xirOxgeJOUuYQS7V3"
}
]
},
{
"orderListId": 28,
"contingencyType": "OCO",
"listStatusType": "EXEC_STARTED",
"listOrderStatus": "EXECUTING",
"listClientOrderId": "hG7hFNxJV6cZy3Ze4AUT4d",
"transactionTime": 1565245913407,
"symbol": "LTCBTC",
"orders": [
{
"symbol": "LTCBTC",
"orderId": 2,
"clientOrderId": "j6lFOfbmFMRjTYA7rRJ0LP"
},
{
"symbol": "LTCBTC",
"orderId": 3,
"clientOrderId": "z0KCjOdditiLS5ekAFtK81"
}
]
}
]
Query Open Order lists (USER_DATA)
GET /api/v3/openOrderList
Weight: 6
Parameters:
| Name | Type | Mandatory | Description |
|---|---|---|---|
| recvWindow | DECIMAL | NO | The value cannot be greater than 60000. Supports up to three decimal places of precision (e.g., 6000.346) so that microseconds may be specified. |
| timestamp | LONG | YES |
Data Source: Database
Response:
[
{
"orderListId": 31,
"contingencyType": "OCO",
"listStatusType": "EXEC_STARTED",
"listOrderStatus": "EXECUTING",
"listClientOrderId": "wuB13fmulKj3YjdqWEcsnp",
"transactionTime": 1565246080644,
"symbol": "LTCBTC",
"orders": [
{
"symbol": "LTCBTC",
"orderId": 4,
"clientOrderId": "r3EH2N76dHfLoSZWIUw1bT"
},
{
"symbol": "LTCBTC",
"orderId": 5,
"clientOrderId": "Cv1SnyPD3qhqpbjpYEHbd2"
}
]
}
]
Account trade list (USER_DATA)
GET /api/v3/myTrades
Get trades for a specific account and symbol.
Weight:
| Condition | Weight |
|---|---|
| Without orderId | 20 |
| With orderId | 5 |
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; Maximum: 1000. |
| recvWindow | DECIMAL | NO | The value cannot be greater than 60000. Supports up to three decimal places of precision (e.g., 6000.346) so that microseconds may be specified. |
| timestamp | LONG | YES |
Notes:
- If
fromIdis set, it will get trades >= thatfromId. Otherwise most recent trades are returned. - The time between
startTimeandendTimecan't be longer than 24 hours. - These are the supported combinations of all parameters:
symbolsymbol+orderIdsymbol+startTimesymbol+endTimesymbol+fromIdsymbol+startTime+endTimesymbol+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
}
]