Request parameters.
Promise<WebsocketApiResponse
Query your current unfilled order count for all intervals.
Weight(IP): 40
Security Type: USER_DATA
Notes: Data Source:* Memory
Request parameters.
Promise<WebsocketApiResponse
Query information about your account.
Weight(IP): 20
Security Type: USER_DATA
Notes: Data Source:* Memory => Database
Request parameters.
Promise<WebsocketApiResponse
Query information about all your order lists, filtered by time range.
Weight(IP): 20
Security Type: USER_DATA
Notes: Data Source:* Database
Notes:
If startTime and/or endTime are specified, fromId is ignored.
Order lists are filtered by transactionTime of the last order list 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.
Request parameters.
Promise<WebsocketApiResponse
Query information about all your orders – active, canceled, filled – filtered by time range.
Weight(IP): 20
Security Type: USER_DATA
Notes: Data Source:* Database
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.
Request parameters.
Promise<WebsocketApiResponse
Get current average price for a symbol.
Weight(IP): 2
Security Type: NONE
Notes: Data Source:* Memory
Request parameters.
Promise<WebsocketApiResponse
Get block trades.
Weight(IP): 25
Security Type: NONE
Notes:
Request parameters.
Promise<WebsocketApiResponse
Get current order book.
Note that this request returns limited market depth.
If you need to continuously monitor order book updates, please consider using WebSocket Streams:
<symbol>@depth<levels>
<symbol>@depth
You can use depth request together with <symbol>@depth streams to maintain a local order book.
Weight: Adjusted based on the limit:
| Limit | Request Weight |
|---|---|
| 1-100 | 5 |
| 101-500 | 25 |
| 501-1000 | 50 |
| 1001-5000 | 250 |
Security Type: NONE
Notes: Data Source:* Memory
Request parameters.
Promise<WebsocketApiResponse
Disconnects from the WebSocket server. If there is no active connection, a warning is logged. Otherwise, all connections in the connection pool are closed gracefully, and a message is logged indicating that the connection has been disconnected.
A Promise that resolves when all connections have been closed.
Query current exchange trading rules, rate limits, and symbol information.
Weight(IP): 20
Security Type: NONE
Notes: Data Source:* Memory
Notes:*
If the value provided to symbol or symbols do not exist, the endpoint will throw an error saying the symbol is invalid.
All parameters are optional.
Only one of symbol, symbols, permissions parameters can be specified.
Without parameters, exchangeInfo displays all symbols with ["SPOT", "MARGIN", "LEVERAGED"] permissions.
In order to list all active symbols on the exchange, you need to explicitly request all permissions.
permissions accepts either a list of permissions, or a single permission name. E.g. "SPOT".
Examples of Symbol Permissions Interpretation from the Response:*
[["A","B"]] means you may place an order if your account has either permission "A" or permission "B".
[["A"],["B"]] means you can place an order if your account has permission "A" and permission "B".
[["A"],["B","C"]] means you can place an order if your account has permission "A" and permission "B" or permission "C". (Inclusive or is applied here, not exclusive or, so your account may have both permission "B" and permission "C".)
Request parameters.
Promise<WebsocketApiResponse
Query execution rules for symbols.
| Weight: Parameter | Weight |
|---|---|
symbol |
2 |
symbols |
2 for each symbol, capped at a max of 40 |
symbolStatus |
40 |
| None | 40 |
Security Type: NONE
Notes: Data Source:* Memory
Note:* No combination of multiple parameters is allowed.
Request parameters.
Promise<WebsocketApiResponse
Checks if the WebSocket connection is currently open.
true if the connection is open, false otherwise.
Get klines (candlestick bars).
Klines are uniquely identified by their open & close time.
If you need access to real-time kline updates, please consider using WebSocket Streams:
<symbol>@kline_<interval>
If you need historical kline data, please consider using data.binance.vision.
Weight(IP): 2
Security Type: NONE
Notes: Data Source:* Database
Supported kline intervals (case-sensitive):
| Interval | interval value |
|---|---|
| seconds | 1s |
| minutes | 1m, 3m, 5m, 15m, 30m |
| hours | 1h, 2h, 4h, 6h, 8h, 12h |
| days | 1d, 3d |
| weeks | 1w |
| months | 1M |
Notes:*
If startTime and endTime are not sent, the most recent klines are returned.
Supported values for timeZone:
Hours and minutes (e.g. -1:00, 05:45)
Only hours (e.g. 0, 8, 4)
Accepted range is strictly [-12:00 to +14:00] inclusive
If timeZone provided, kline intervals are interpreted in that timezone instead of UTC.
Note that startTime and endTime are always interpreted in UTC, regardless of timeZone.
Request parameters.
Promise<WebsocketApiResponse
Retrieves allocations resulting from SOR order placement.
Weight(IP): 20
Security Type: USER_DATA
Notes: Data Source:* Database
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.
Request parameters.
Promise<WebsocketApiResponse
Retrieves the list of filters relevant to an account on a given symbol. This is the only method
that shows if an account has MAX_ASSET filters applied to it.
Weight(IP): 40
Security Type: USER_DATA
Notes: Data Source:* Memory
Request parameters.
Promise<WebsocketApiResponse
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
| Weight: Case | Weight |
|---|---|
If symbol is invalid |
2 |
Querying by preventedMatchId |
2 |
Querying by orderId |
20 |
Security Type: USER_DATA
Notes: Data Source:* Database
Request parameters.
Promise<WebsocketApiResponse
Query information about all your trades, filtered by time range.
| Weight: Condition | Weight |
|---|---|
| Without orderId | 20 |
| With orderId | 5 |
Security Type: USER_DATA
Notes: Data Source: Memory => Database
Notes:
fromId is specified, return trades with trade ID >= fromId.startTime and/or endTime are specified, trades are filtered by execution time (time).fromId cannot be used together with startTime and endTime.orderId is specified, only trades related to that order are returned.startTime and endTime cannot be used together with orderId.startTime and endTime can't be longer than 24 hours.Request parameters.
Promise<WebsocketApiResponse
Query execution status of all open order lists.
If you need to continuously monitor order status updates, please consider using WebSocket Streams:
userDataStream.subscribe if on an authenticated session
userDataStream.subscribe.signature if subscribing through signature subscription
Weight(IP): 6
Security Type: USER_DATA
Notes: Data Source:* Memory -> Database
Request parameters.
Promise<WebsocketApiResponse
Cancel all open orders on a symbol. This includes orders that are part of an order list.
Weight(IP): 1
Security Type: TRADE
Notes: Data Source:* Matching Engine
Request parameters.
Promise<WebsocketApiResponse
Query execution status of all open orders.
If you need to continuously monitor order status updates, please consider using WebSocket Streams:
userDataStream.subscribe if on an authenticated session
userDataStream.subscribe.signature if subscribing through signature subscription
Weight: | Parameter | Weight |
| --------- | ------ |
| symbol | 6 |
| none | 80 |
Security Type: USER_DATA
Notes: Data Source: Memory => Database
Request parameters.
Promise<WebsocketApiResponse
Reduce the quantity of an existing open order.
This adds 0 orders to the EXCHANGE_MAX_ORDERS filter and the MAX_NUM_ORDERS filter.
Read Order Amend Keep Priority FAQ to learn more.
Weight(IP): 4
Unfilled Order Count: 0
Security Type: TRADE
Notes: Data Source:* Matching Engine
Request parameters.
Promise<WebsocketApiResponse
Queries all amendments of a single order.
Weight(IP): 4
Security Type: USER_DATA
Notes: Data Source:* Database
Request parameters.
Promise<WebsocketApiResponse
Cancel an active order.
Weight(IP): 1
Security Type: TRADE
Notes: Data Source:* Matching Engine
Notes:
If both orderId and origClientOrderId parameters are provided, the orderId is searched first, then the origClientOrderId from that result is checked against that order. If both conditions are not met the request will be rejected.
newClientOrderId will replace clientOrderId of the canceled order, freeing it up for new orders.
If you cancel an order that is a part of an order list, the entire order list is canceled.
The performance for canceling an order (single cancel or as part of a cancel-replace) is always better when only orderId is sent. Sending origClientOrderId or both orderId + origClientOrderId will be slower.
Request parameters.
Promise<WebsocketApiResponse
newOrderResult: NOT_ATTEMPTED), will still increase the unfilled order count by 1.
You can only cancel an individual order from an orderList using this method, but the result is the same as canceling the entire orderList.not attempted (i.e. when newOrderResult: NOT_ATTEMPTED), will still increase the unfilled order count by 1.Weight(IP): 1
Unfilled Order Count: 1
Security Type: TRADE
Notes: Data Source:* Matching Engine
Similar to the order.place request,
additional mandatory parameters (*) are determined by the new order type.
Available cancelReplaceMode options:
STOP_ON_FAILURE – if cancellation request fails, new order placement will not be attempted.
ALLOW_FAILURE – new order placement will be attempted even if the cancel request fails.
| Request | Response | ||||
|---|---|---|---|---|---|
cancelReplaceMode |
orderRateLimitExceededMode |
Unfilled Order Count | cancelResult |
newOrderResult |
status |
STOP_ON_FAILURE |
DO_NOTHING |
Within Limits | ✅ SUCCESS |
✅ SUCCESS |
200 |
❌ FAILURE |
➖ NOT_ATTEMPTED |
400 |
|||
✅ SUCCESS |
❌ FAILURE |
409 |
|||
| Exceeds Limits | ✅ SUCCESS |
✅ SUCCESS |
N/A | ||
❌ FAILURE |
➖ NOT_ATTEMPTED |
N/A | |||
✅ SUCCESS |
❌ FAILURE |
N/A | |||
CANCEL_ONLY |
Within Limits | ✅ SUCCESS |
✅ SUCCESS |
200 |
|
❌ FAILURE |
➖ NOT_ATTEMPTED |
400 |
|||
✅ SUCCESS |
❌ FAILURE |
409 |
|||
| Exceeds Limits | ❌ FAILURE |
➖ NOT_ATTEMPTED |
429 |
||
✅ SUCCESS |
❌ FAILURE |
429 |
|||
ALLOW_FAILURE |
DO_NOTHING |
Within Limits | ✅ SUCCESS |
✅ SUCCESS |
200 |
❌ FAILURE |
❌ FAILURE |
400 |
|||
❌ FAILURE |
✅ SUCCESS |
409 |
|||
✅ SUCCESS |
❌ FAILURE |
409 |
|||
| Exceeds Limits | ✅ SUCCESS |
✅ SUCCESS |
N/A | ||
❌ FAILURE |
❌ FAILURE |
N/A | |||
❌ FAILURE |
✅ SUCCESS |
N/A | |||
✅ SUCCESS |
❌ FAILURE |
N/A | |||
CANCEL_ONLY |
Within Limits | ✅ SUCCESS |
✅ SUCCESS |
200 |
|
❌ FAILURE |
❌ FAILURE |
400 |
|||
❌ FAILURE |
✅ SUCCESS |
409 |
|||
✅ SUCCESS |
❌ FAILURE |
409 |
|||
| Exceeds Limits | ✅ SUCCESS |
✅ SUCCESS |
200 |
||
❌ FAILURE |
❌ FAILURE |
400 |
|||
❌ FAILURE |
✅ SUCCESS |
N/A | |||
✅ SUCCESS |
❌ FAILURE |
409 |
|||
Notes:
If both cancelOrderId and cancelOrigClientOrderId parameters are provided, the cancelOrderId is searched first, then the cancelOrigClientOrderId from that result is checked against that order. If both conditions are not met the request will be rejected.
cancelNewClientOrderId will replace clientOrderId of the canceled order, freeing it up for new orders.
newClientOrderId specifies clientOrderId value for the placed order.
A new order with the same clientOrderId is accepted only when the previous one is filled or expired.
The new order can reuse old clientOrderId of the canceled order.
This cancel-replace operation is not transactional.
If one operation succeeds but the other one fails, the successful operation is still executed.
For example, in STOP_ON_FAILURE mode, if the new order placement fails, the old order is still canceled.
Filters and order count limits are evaluated before cancellation and order placement occurs.
If new order placement is not attempted, your order count is still incremented.
Like order.cancel, if you cancel an individual order from an order list, the entire order list is canceled.
The performance for canceling an order (single cancel or as part of a cancel-replace) is always better when only orderId is sent. Sending origClientOrderId or both orderId + origClientOrderId will be slower.
Request parameters.
Promise<WebsocketApiResponse
Cancel an active order list.
Weight(IP): 1
Security Type: TRADE
Notes: Data Source:* Matching Engine
Notes:
If both orderListId and listClientOrderId parameters are provided, the orderListId is searched first, then the listClientOrderId from that result is checked against that order. If both conditions are not met the request will be rejected.
Canceling an individual order with order.cancel will cancel the entire order list as well.
Request parameters.
Promise<WebsocketApiResponse
Send in a new one-cancels-the-other (OCO) pair:
LIMIT_MAKER + STOP_LOSS/STOP_LOSS_LIMIT orders (called legs),
where activation of one order immediately cancels the other.
This adds 1 order to EXCHANGE_MAX_ORDERS filter and the MAX_NUM_ORDERS filter
Weight(IP): 1
Unfilled Order Count: 1
Security Type: TRADE
Notes: Data Source:* Matching Engine
Notes:
listClientOrderId parameter specifies listClientOrderId for the OCO pair.
A new OCO with the same listClientOrderId is accepted only when the previous one is filled or completely expired.
listClientOrderId is distinct from clientOrderId of individual orders.
limitClientOrderId and stopClientOrderId specify clientOrderId values for both legs of the OCO.
A new order with the same clientOrderId is accepted only when the previous one is filled or expired.
Price restrictions on the legs:
side |
Price relation |
|---|---|
BUY |
price < market price < stopPrice |
SELL |
price > market price > stopPrice |
Both legs have the same quantity.
However, you can set different iceberg quantity for individual legs.
If stopIcebergQty is used, stopLimitTimeInForce must be GTC.
trailingDelta applies only to the STOP_LOSS/STOP_LOSS_LIMIT leg of the OCO.
Request parameters.
Promise<WebsocketApiResponse
Send in an one-cancels-the-other (OCO) pair, where activation of one order immediately cancels the other.
An OCO has 2 orders called the above order and below order.
One of the orders must be a LIMIT_MAKER/TAKE_PROFIT/TAKE_PROFIT_LIMIT order and the other must be
STOP_LOSS or STOP_LOSS_LIMIT order.
Price restrictions:
If the OCO is on the SELL side:
LIMIT_MAKER/TAKE_PROFIT_LIMIT price > Last Traded Price > STOP_LOSS/STOP_LOSS_LIMIT
stopPrice
TAKE_PROFIT stopPrice > Last Traded Price > STOP_LOSS/STOP_LOSS_LIMIT stopPrice
If the OCO is on the BUY side:
LIMIT_MAKER price < Last Traded Price < STOP_LOSS/STOP_LOSS_LIMIT stopPrice
TAKE_PROFIT stopPrice > Last Traded Price > STOP_LOSS/STOP_LOSS_LIMIT stopPrice
OCOs add 2 orders to the EXCHANGE_MAX_ORDERS filter and MAX_NUM_ORDERS filter.
Weight(IP): 1
Unfilled Order Count: 2
Security Type: TRADE
Notes: Data Source:* Matching Engine
Request parameters.
Promise<WebsocketApiResponse
Place an OPO.
OPOs add 2 orders to the EXCHANGE_MAX_NUM_ORDERS filter and MAX_NUM_ORDERS filter.
Weight(IP): 1
Unfilled Order Count: 2
Security Type: TRADE
Notes: Data Source:* Matching Engine
Request parameters.
Promise<WebsocketApiResponse
Place an OPOCO.
Weight(IP): 1
Unfilled Order Count: 3
Security Type: TRADE
Notes: Data Source:* Matching Engine
Request parameters.
Promise<WebsocketApiResponse
Places an OTO.
An OTO (One-Triggers-the-Other) is an order list comprised of 2 orders.
The first order is called the working order and must be LIMIT or LIMIT_MAKER. Initially, only the
working order goes on the order book.
The second order is called the pending order. It can be any order type except for MARKET orders using
parameter quoteOrderQty. The pending order is only placed on the order book when the working order gets
fully filled*.
If either the working order or the pending order is cancelled individually, the other order in the order list will also be canceled or expired.
When the order list is placed, if the working order gets immediately fully filled, the placement response
will show the working order as FILLED but the pending order will still appear as PENDING_NEW. You need to
query the status of the pending order again to see its updated status.
OTOs add 2 orders to the EXCHANGE_MAX_NUM_ORDERS filter and MAX_NUM_ORDERS filter.
Weight(IP): 1
Unfilled Order Count: 2
Security Type: TRADE
Notes: Data Source:* Matching Engine
Mandatory parameters based on pendingType or workingType*
Depending on the pendingType or workingType, some optional parameters will become mandatory.
| Type | Additional mandatory parameters | Additional information |
|---|---|---|
workingType = LIMIT |
workingTimeInForce |
|
pendingType = LIMIT |
pendingPrice, pendingTimeInForce |
|
pendingType = STOP_LOSS or TAKE_PROFIT |
pendingStopPrice and/or pendingTrailingDelta |
|
pendingType =STOP_LOSS_LIMIT or TAKE_PROFIT_LIMIT |
pendingPrice, pendingStopPrice and/or pendingTrailingDelta, pendingTimeInForce |
Request parameters.
Promise<WebsocketApiResponse
Place an OTOCO.
An OTOCO (One-Triggers-One-Cancels-the-Other) is an order list comprised of 3 orders.
The first order is called the working order and must be LIMIT or LIMIT_MAKER. Initially, only the working order goes on the order book.
The behavior of the working order is the same as the OTO.
OTOCO has 2 pending orders (pending above and pending below), forming an OCO pair. The pending orders are only placed on the order book when the working order gets fully filled.
The rules of the pending above and pending below follow the same rules as the Order list OCO.
OTOCOs add 3 orders to the EXCHANGE_MAX_NUM_ORDERS filter and MAX_NUM_ORDERS filter.
Weight(IP): 1
Unfilled Order Count: 3
Security Type: TRADE
Notes: Data Source:* Matching Engine
Mandatory parameters based on pendingAboveType, pendingBelowType or workingType*
Depending on the pendingAboveType/pendingBelowType or workingType, some optional parameters will become mandatory.
| Type | Additional mandatory parameters | Additional information |
|---|---|---|
workingType = LIMIT |
workingTimeInForce |
|
pendingAboveType= LIMIT_MAKER |
pendingAbovePrice |
|
pendingAboveType = STOP_LOSS/TAKE_PROFIT |
pendingAboveStopPrice and/or pendingAboveTrailingDelta |
|
pendingAboveType=STOP_LOSS_LIMIT/TAKE_PROFIT_LIMIT |
pendingAbovePrice, pendingAboveStopPrice and/or pendingAboveTrailingDelta, pendingAboveTimeInForce |
|
pendingBelowType= LIMIT_MAKER |
pendingBelowPrice |
|
pendingBelowType= STOP_LOSS/TAKE_PROFIT |
pendingBelowStopPrice and/or pendingBelowTrailingDelta |
|
pendingBelowType=STOP_LOSS_LIMIT/TAKE_PROFIT_LIMIT |
pendingBelowPrice, pendingBelowStopPrice and/or pendingBelowTrailingDelta, pendingBelowTimeInForce |
Request parameters.
Promise<WebsocketApiResponse
Check execution status of an Order list.
For execution status of individual orders, use order.status.
Weight(IP): 4
Security Type: USER_DATA
Notes: Data Source:* Database
Notes:
origClientOrderId refers to listClientOrderId of the order list itself.
If both origClientOrderId and orderListId parameters are specified,
only origClientOrderId is used and orderListId is ignored.
Request parameters.
Promise<WebsocketApiResponse
Send in a new order.
This adds 1 order to the EXCHANGE_MAX_ORDERS filter and the MAX_NUM_ORDERS filter.
Weight(IP): 1
Unfilled Order Count: 1
Security Type: TRADE
Notes: Data Source:* Matching Engine
Certain parameters (*) become mandatory based on the order type:
Order type |
Mandatory parameters |
|---|---|
LIMIT |
|
LIMIT_MAKER |
|
MARKET |
|
STOP_LOSS |
|
STOP_LOSS_LIMIT |
|
TAKE_PROFIT |
|
TAKE_PROFIT_LIMIT |
|
Supported order types:
Order type |
Description |
|---|---|
LIMIT |
Buy or sell |
LIMIT_MAKER |
This order type is also known as a POST-ONLY order. |
MARKET |
Buy or sell at the best available market price.
|
STOP_LOSS |
Execute a
I.e., when |
STOP_LOSS_LIMIT |
Place a |
TAKE_PROFIT |
Like |
TAKE_PROFIT_LIMIT |
Like |
Notes on using parameters for Pegged Orders:
These parameters are allowed for LIMIT, LIMIT_MAKER, STOP_LOSS_LIMIT, TAKE_PROFIT_LIMIT orders.
If pegPriceType is specified, price becomes optional. Otherwise, it is still mandatory.
pegPriceType=PRIMARY_PEG means the primary peg, that is the best price on the same side of the order book as your order.
pegPriceType=MARKET_PEG means the market peg, that is the best price on the opposite side of the order book from your order.
Use pegOffsetType and pegOffsetValue to request a price level other than the best one. These parameters must be specified together.
Available timeInForce options,
setting how long the order should be active before expiration:
| TIF | Description |
|---|---|
GTC |
Good 'til Canceled – the order will remain on the book until you cancel it, or the order is completely filled. |
IOC |
Immediate or Cancel – the order will be filled for as much as possible, the unfilled quantity immediately expires. |
FOK |
Fill or Kill – the order will expire unless it cannot be immediately filled for the entire quantity. |
Notes:
newClientOrderId specifies clientOrderId value for the order.
A new order with the same clientOrderId is accepted only when the previous one is filled or expired.
Any LIMIT or LIMIT_MAKER order can be made into an iceberg order by specifying the icebergQty.
An order with an icebergQty must have timeInForce set to GTC.
Trigger order price rules for STOP_LOSS/TAKE_PROFIT orders:
stopPrice must be above market price: STOP_LOSS BUY, TAKE_PROFIT SELL
stopPrice must be below market price: STOP_LOSS SELL, TAKE_PROFIT BUY
MARKET orders using quoteOrderQty follow LOT_SIZE filter rules.
The order will execute a quantity that has notional value as close as possible to requested quoteOrderQty.
Request parameters.
Promise<WebsocketApiResponse
Check execution status of an order.
Weight(IP): 4
Security Type: USER_DATA
Notes: Data Source:* Memory => Database
Notes:
If both orderId and origClientOrderId are provided, the orderId is searched first, then the origClientOrderId from that result is checked against that order. If both conditions are not met the request will be rejected.
For some historical orders the cummulativeQuoteQty response field may be negative,
meaning the data is not available at this time.
Request parameters.
Promise<WebsocketApiResponse
Test order placement.
Validates new order parameters and verifies your signature but does not send the order into the matching engine.
Weight: | Condition | Request Weight |
| --- | --- |
| Without computeCommissionRates | 1 |
| With computeCommissionRates | 20 |
Security Type: TRADE
Notes: Data Source:* Memory
Request parameters.
Promise<WebsocketApiResponse
Test connectivity to the WebSocket API.
Note: You can use regular WebSocket ping frames to test connectivity as well, WebSocket API will respond with pong frames as soon as possible. ping request along with time is a safe way to test request-response handling in your application.
Weight(IP): 1
Security Type: NONE
Notes: Data Source:* Memory
Request parameters.
Promise<WebsocketApiResponse
Query Reference Price
Weight(IP): 2
Security Type: NONE
Notes: Data Source:* Memory
Request parameters.
Promise<WebsocketApiResponse
Query Reference Price Calculation
Weight(IP): 2
Security Type: NONE
Notes: Data Source:* Memory
Request parameters.
Promise<WebsocketApiResponse
Sends a signed message to the WebSocket server with authentication
The API method to call
Message parameters and options
Promise that resolves with the server response
Authenticate WebSocket connection using the provided API key.
After calling session.logon, you can omit apiKey and signature parameters for future requests that require them.
Note that only one API key can be authenticated.
Calling session.logon multiple times changes the current authenticated API key.
Note:* Only Ed25519 keys are supported for this feature.
Weight(IP): 2
Security Type: USER_DATA
Notes: Data Source:* Memory
Request parameters.
Promise<WebsocketApiResponse
Forget the API key previously authenticated. If the connection is not authenticated, this request does nothing.
Note that the WebSocket connection stays open after session.logout request. You can continue using the connection, but now you will have to explicitly provide the apiKey and signature parameters where needed.
Weight(IP): 2
Security Type: NONE
Notes: Data Source:* Memory
Request parameters.
Promise<WebsocketApiResponse
Query the status of the WebSocket connection, inspecting which API key (if any) is used to authorize requests.
Weight(IP): 2
Security Type: NONE
Notes: Data Source:* Memory
Request parameters.
Promise<WebsocketApiResponse
Note:
Users should track the corresponding subscription status of related accounts as needed.
Weight(IP): 2
Security Type: NONE
Notes: Data Source:* Memory
Request parameters.
Promise<WebsocketApiResponse
Places an order using smart order routing (SOR).
This adds 1 order to the EXCHANGE_MAX_ORDERS filter and the MAX_NUM_ORDERS filter.
Read SOR FAQ to learn more.
Weight(IP): 1
Unfilled Order Count: 1
Security Type: TRADE
Notes: Data Source:* Matching Engine
Note:* sor.order.place only supports LIMIT and MARKET orders. quoteOrderQty is not supported.
Request parameters.
Promise<WebsocketApiResponse
Test new order creation and signature/recvWindow using smart order routing (SOR). Creates and validates a new order but does not send it into the matching engine.
Weight: | Condition | Request Weight |
| --- | --- |
| Without computeCommissionRates | 1 |
| With computeCommissionRates | 20 |
Security Type: TRADE
Notes: Data Source:* Memory
Request parameters.
Promise<WebsocketApiResponse
Get rolling window price change statistics with a custom window.
This request is similar to ticker.24hr but statistics are computed on demand using the arbitrary window you specify.
Note:* Window size precision is limited to 1 minute.
While the closeTime is the current time of the request, openTime always start on a minute boundary.
As such, the effective window might be up to 59999 ms wider than the requested windowSize.
For example, a request for "windowSize": "7d" might result in the following window:
{
"openTime": 1659580020000,
"closeTime": 1660184865291
}
Time of the request – closeTime – is 1660184865291 (August 11, 2022 02:27:45.291).
Requested window size should put the openTime 7 days before that – August 4, 02:27:45.291 –
but due to limited precision it ends up a bit earlier: 1659580020000 (August 4, 2022 02:27:00),
exactly at the start of a minute.
If you need to continuously monitor trading statistics, please consider using WebSocket Streams:
<symbol>@ticker_<window_size> or !ticker_<window-size>@arr
Weight: Adjusted based on the number of requested symbols:
| Symbols | Weight |
|---|---|
| 1–50 | 4 per symbol |
| 51–100 | 200 |
Security Type: NONE
Notes: Data Source:* Database
Supported window sizes:
| Unit | windowSize value |
|---|---|
| minutes | 1m, 2m ... 59m |
| hours | 1h, 2h ... 23h |
| days | 1d, 2d ... 7d |
Notes:
Either symbol or symbols must be specified.
Maximum number of symbols in one request: 200.
Window size units cannot be combined.
E.g., 1d 2h is not supported.
Request parameters.
Promise<WebsocketApiResponse
Get 24-hour rolling window price change statistics.
If you need to continuously monitor trading statistics, please consider using WebSocket Streams:
<symbol>@ticker or !ticker@arr
<symbol>@miniTicker or !miniTicker@arr
If you need different window sizes,
use the ticker request.
Weight: Adjusted based on the number of requested symbols:
| Parameter | Symbols Provided | Weight |
|---|---|---|
| symbol | 1 | 2 |
| omitted | 80 | |
| symbols | 1-20 | 2 |
| 21-100 | 40 | |
| 101+ | 80 | |
| omitted | 80 |
Security Type: NONE
Notes: Data Source:* Memory
Notes:
symbol and symbols cannot be used together.
If no symbol is specified, returns information about all symbols currently trading on the exchange.
Request parameters.
Promise<WebsocketApiResponse
Get the current best price and quantity on the order book.
If you need access to real-time order book ticker updates, please consider using WebSocket Streams:
<symbol>@bookTicker
Weight: Adjusted based on the number of requested symbols:
| Parameter | Symbols Provided | Weight |
|---|---|---|
| symbol | 1 | 2 |
| omitted | 4 | |
| symbols | Any | 4 |
Security Type: NONE
Notes: Data Source:* Memory
Notes:
symbol and symbols cannot be used together.
If no symbol is specified, returns information about all symbols currently trading on the exchange.
Request parameters.
Promise<WebsocketApiResponse
Get the latest market price for a symbol.
If you need access to real-time price updates, please consider using WebSocket Streams:
<symbol>@aggTrade
<symbol>@trade
Weight: Adjusted based on the number of requested symbols:
| Parameter | Symbols Provided | Weight |
|---|---|---|
| symbol | 1 | 2 |
| omitted | 4 | |
| symbols | Any | 4 |
Security Type: NONE
Notes: Data Source:* Memory
Notes:
symbol and symbols cannot be used together.
If no symbol is specified, returns information about all symbols currently trading on the exchange.
Request parameters.
Promise<WebsocketApiResponse
Price change statistics for a trading day.
Weight: 4 for each requested symbol regardless of windowSize. The weight for this request will cap at 200 once the number of symbols in the request is more than 50.
Security Type: NONE
Notes: Data Source:* Database
Notes:*
Supported values for timeZone:
Hours and minutes (e.g. -1:00, 05:45)
Only hours (e.g. 0, 8, 4)
Request parameters.
Promise<WebsocketApiResponse
Test connectivity to the WebSocket API and get the current server time.
Weight(IP): 1
Security Type: NONE
Notes: Data Source:* Memory
Request parameters.
Promise<WebsocketApiResponse
Get aggregate trades.
An aggregate trade (aggtrade) represents one or more individual trades.
Trades that fill at the same time, from the same taker order, with the same price –
those trades are collected into an aggregate trade with total quantity of the individual trades.
If you need access to real-time trading activity, please consider using WebSocket Streams:
<symbol>@aggTrade
If you need historical aggregate trade data, please consider using data.binance.vision.
Weight(IP): 4
Security Type: NONE
Notes: Data Source:* Database
fromId is specified, return aggtrades with aggregate trade ID >= fromId. Use fromId and limit to page through all aggtrades.startTime and/or endTime are specified, aggtrades are filtered by execution time (T). fromId cannot be used together with startTime and endTime.Request parameters.
Promise<WebsocketApiResponse
Get historical trades.
Weight(IP): 25
Security Type: NONE
Notes: Data Source:* Database
Notes:
If fromId is not specified, the most recent trades are returned.
Request parameters.
Promise<WebsocketApiResponse
Get recent trades.
If you need access to real-time trading activity, please consider using WebSocket Streams:
<symbol>@trade
Weight(IP): 25
Security Type: NONE
Notes: Data Source:* Memory
Request parameters.
Promise<WebsocketApiResponse
Get klines (candlestick bars) optimized for presentation.
This request is similar to klines, having the same parameters and response. uiKlines return modified kline data, optimized for presentation of candlestick charts.
Weight(IP): 2
Security Type: NONE
Notes: Data Source:* Database
startTime and endTime are not sent, the most recent klines are returned.timeZone:-1:00, 05:45)0, 8, 4)timeZone provided, kline intervals are interpreted in that timezone instead of UTC.startTime and endTime are always interpreted in UTC, regardless of timeZone.Request parameters.
Promise<WebsocketApiResponse
Subscribe to the User Data Stream in the current WebSocket connection.
Notes:*
session.logon.session.status, see the userDataStream flag indicating you have have an active subscription.Weight(IP): 2
Security Type: NONE
Request parameters.
Optionalid: stringOptional custom stream identifier.
Promise<{response: WebsocketApiResponse
Weight(IP): 2
Security Type: USER_STREAM
Notes: Data Source:* Memory
Request parameters.
Optionalid: stringOptional custom stream identifier.
Promise<{response: WebsocketApiResponse
Stop listening to the User Data Stream in the current WebSocket connection.
Note that session.logout will only close the subscription created with userDataStream.subscribe but not subscriptions opened with userDataStream.subscribe.signature.
Weight(IP): 2
Request parameters.
Promise<WebsocketApiResponse
Get current account commission rates.
Weight(IP): 20
Security Type: USER_DATA
Notes: Data Source:* Database