Request parameters.
Get compressed, aggregate trades. Trades that fill at the time, from the same taker order, with the same price will have the quantity aggregated.
Weight(IP): 4
Security Type: NONE
Notes: Data Source:* Database
Request parameters.
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(IP): 20
Security Type: USER_DATA
Notes: Data Source:* Database
Request parameters.
Get all account orders; active, canceled, or filled.
Weight(IP): 20
Security Type: USER_DATA
Notes: Data Source:* Database
orderId is set, it will get orders >= that orderId. Otherwise most recent orders are returned.cummulativeQuoteQty will be < 0, meaning the data is not available at this time.startTime and/or endTime provided, orderId is not required.startTime and endTime can't be longer than 24 hours.Request parameters.
Current average price for a symbol.
Weight(IP): 2
Security Type: NONE
Notes: Data Source:* Memory
Request parameters.
Cancels all active 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.
Cancel an active order.
Weight(IP): 1
Security Type: TRADE
Notes: Data Source:* Matching Engine
orderId or origClientOrderId must be sent.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.orderId is sent. Sending origClientOrderId or both orderId + origClientOrderId will be slower.Request parameters.
Cancel an entire Order list
Weight(IP): 1
Security Type: TRADE
Notes: Data Source:* Matching Engine
Notes:*
Request parameters.
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.
Current exchange trading rules 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.
permissions can support single or multiple values (e.g. SPOT, ["MARGIN","LEVERAGED"]). This cannot be used in combination with symbol or symbols.
If permissions parameter not provided, all symbols that have either SPOT, MARGIN, or LEVERAGED permission will be exposed.
To display symbols with any permission you need to specify them explicitly in permissions: (e.g. ["SPOT","MARGIN",...].). See Account and Symbol Permissions for the full list.
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.
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.
Get current account information.
Weight(IP): 20
Security Type: USER_DATA
Notes: Data Source:* Memory => Database
Request parameters.
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
Security Type: USER_DATA
Notes: Data Source:* Memory => Database
Request parameters.
Check an order's status.
Weight(IP): 4
Security Type: USER_DATA
Notes: Data Source:* Memory => Database
orderId or origClientOrderId must be sent.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.cummulativeQuoteQty will be < 0, meaning the data is not available at this time.Request parameters.
Retrieves a specific order list based on provided optional parameters.
Weight(IP): 4
Security Type: USER_DATA
Notes: Data Source:* Database
Request parameters.
Get recent trades.
Weight(IP): 25
Security Type: NONE
Notes: Data Source:* Memory
Request parameters.
Get block trades.
Weight(IP): 25
Security Type: MARKET_DATA
Notes:
Request parameters.
Get older trades.
Weight(IP): 25
Security Type: NONE
Notes: Data Source:* Database
Request parameters.
Kline/candlestick bars for a symbol. Klines are uniquely identified by their open time.
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.
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.
Retrieves the list of filters relevant to an account on a given symbol. This is the only endpoint 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.
Displays the list of orders that were expired due to STP.
These are the combinations supported:
symbol + preventedMatchIdsymbol + orderIdsymbol + 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.
Get trades for a specific account and symbol.
| Weight: Condition | Weight |
|---|---|
| Without orderId | 20 |
| With orderId | 5 |
Security Type: USER_DATA
Notes: Data Source:* Memory => Database
*Notes:**:
fromId is set, it will get trades >= that fromId. Otherwise most recent trades are returned.startTime and endTime can't be longer than 24 hours.symbolsymbol + orderIdsymbol + startTimesymbol + endTimesymbol + fromIdsymbol + startTime + endTimesymbol+ orderId + fromIdRequest parameters.
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
Some additional mandatory parameters based on order type:
| Type | Additional mandatory parameters | Additional Information |
|---|---|---|
LIMIT |
timeInForce, quantity, price |
|
MARKET |
quantity or quoteOrderQty |
MARKET orders using the quantity field specifies the amount of the base asset the user wants to buy or sell at the market price. E.g. MARKET order on BTCUSDT will specify how much BTC the user is buying or selling. MARKET orders using quoteOrderQty specifies the amount the user wants to spend (when buying) or receive (when selling) the quote asset; the correct quantity will be determined based on the market liquidity and quoteOrderQty. E.g. Using the symbol BTCUSDT: BUY side, the order will buy as many BTC as quoteOrderQty USDT can. SELL side, the order will sell as much BTC needed to receive quoteOrderQty USDT. |
STOP_LOSS |
quantity, stopPrice or trailingDelta |
This will execute a MARKET order when the conditions are met. (e.g. stopPrice is met or trailingDelta is activated) |
STOP_LOSS_LIMIT |
timeInForce, quantity, price, stopPrice or trailingDelta |
|
TAKE_PROFIT |
quantity, stopPrice or trailingDelta |
This will execute a MARKET order when the conditions are met. (e.g. stopPrice is met or trailingDelta is activated) |
TAKE_PROFIT_LIMIT |
timeInForce, quantity, price, stopPrice or trailingDelta |
|
LIMIT_MAKER |
quantity, price |
This is a LIMIT order that will be rejected if the order immediately matches and trades as a taker. This is also known as a POST-ONLY order. |
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.
Other info:
Any LIMIT or LIMIT_MAKER type order can be made an iceberg order by sending an icebergQty.
Any order with an icebergQty MUST have timeInForce set to GTC.
For STOP_LOSS, STOP_LOSS_LIMIT, TAKE_PROFIT_LIMIT and TAKE_PROFIT orders, trailingDelta can be combined with stopPrice.
MARKET orders using quoteOrderQty will not break LOT_SIZE filter rules; the order will execute a quantity that will have the notional value as close as possible to quoteOrderQty. Trigger order price rules against market price for both MARKET and LIMIT versions:
Price above market price: STOP_LOSS BUY, TAKE_PROFIT SELL
Price below market price: STOP_LOSS SELL, TAKE_PROFIT BUY
Request parameters.
Query Open Order lists
Weight(IP): 6
Security Type: USER_DATA
Notes: Data Source:* Memory -> Database
Request parameters.
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.
Queries all amendments of a single order.
Weight(IP): 4
Security Type: USER_DATA
Notes: Data Source:* Database
Request parameters.
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 POST /api/v3/order, additional mandatory parameters are determined by type.
Response format varies depending on whether the processing of the message succeeded, partially succeeded, or failed.
| 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 |
N/A |
||
❌ FAILURE |
❌ FAILURE |
400 |
|||
❌ FAILURE |
✅ SUCCESS |
N/A | |||
✅ SUCCESS |
❌ FAILURE |
409 |
|||
Notes:*
orderId is sent. Sending origClientOrderId or both orderId + origClientOrderId will be slower.Request parameters.
Send in an one-cancels-the-other (OCO) pair, where activation of one order immediately cancels the other.
LIMIT_MAKER/TAKE_PROFIT/TAKE_PROFIT_LIMIT order and the other must be STOP_LOSS or STOP_LOSS_LIMIT order.SELL side:LIMIT_MAKER/TAKE_PROFIT_LIMIT price > Last Traded Price > STOP_LOSS/STOP_LOSS_LIMIT stopPriceTAKE_PROFIT stopPrice > Last Traded Price > STOP_LOSS/STOP_LOSS_LIMIT stopPriceBUY side:LIMIT_MAKER/TAKE_PROFIT_LIMIT price < Last Traded Price < stopPriceTAKE_PROFIT stopPrice < Last Traded Price < STOP_LOSS/STOP_LOSS_LIMIT stopPrice * OCOs add 2 orders to the EXCHANGE_MAX_ORDERS filter and the MAX_NUM_ORDERS filter.EXCHANGE_MAX_ORDERS filter and the MAX_NUM_ORDERS filter.Weight(IP): 1
Unfilled Order Count: 2
Security Type: TRADE
Notes: Data Source:* Matching Engine
Request parameters.
Place an OPO.
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.
Place an OPOCO.
Weight(IP): 1
Unfilled Order Count: 3
Security Type: TRADE
Notes: Data Source:* Matching Engine
Request parameters.
Place an OTO.
LIMIT or LIMIT_MAKER. Initially, only the working order goes on the order book.MARKET orders using parameter quoteOrderQty. The pending order is only placed on the order book when the working order gets fully filled.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.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.
Place an OTOCO.
LIMIT or LIMIT_MAKER. Initially, only the working order goes on the order book.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.
Send in a new OCO.
SELL: Limit Price > Last Price > Stop PriceBUY: Limit Price < Last Price < Stop PriceICEBERG quantities however do not have to be the sameOCO adds 2 orders to the EXCHANGE_MAX_ORDERS filter and the MAX_NUM_ORDERS filter.Weight(IP): 1
Unfilled Order Count: 2
Security Type: TRADE
Notes: Data Source:* Matching Engine
Request parameters.
Test new order creation and signature/recvWindow long.
Creates and validates a new order but does not send it into the matching engine.
Weight: |Condition|Weight|
|---|---|
|Without computeCommissionRates|1|
|With computeCommissionRates|20|
Security Type: TRADE
Notes: Data Source:* Memory
Request parameters.
Test connectivity to the Rest API.
Weight(IP): 1
Security Type: NONE
Displays the user's unfilled order count for all intervals.
Weight(IP): 40
Security Type: USER_DATA
Notes: Data Source:* Memory
Request parameters.
Query the reference price for a symbol.
Weight(IP): 2
Security Type: NONE
Notes: Data Source:* Memory
Request parameters.
Describes how reference price is calculated for a given symbol.
Weight(IP): 2
Security Type: NONE
Notes: Data Source:* Memory
Request parameters.
Generic function to send a request.
The API endpoint to call.
HTTP method to use (GET, POST, DELETE, etc.).
Query parameters for the request.
Body parameters for the request.
The time unit for the request.
A promise resolving to the response data object.
Generic function to send a signed request.
The API endpoint to call.
HTTP method to use (GET, POST, DELETE, etc.).
Query parameters for the request.
Body parameters for the request.
The time unit for the request.
A promise resolving to the response data object.
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:* POST /api/v3/sor/order only supports LIMIT and MARKET orders. quoteOrderQty is not supported.
Request parameters.
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|Weight|
|---|---|
|Without computeCommissionRates|1|
|With computeCommissionRates|20|
Security Type: TRADE
Notes: Data Source:* Memory
Request parameters.
Note: This endpoint differs from GET /api/v3/ticker/24hr.
The statistical time range of this endpoint can be up to 59999ms longer
than the requested windowSize.
openTime starts at the beginning of a minute, while the end time is
the current time. Therefore, the actual interval can be up to 59999ms
longer than the requested window.
For example, if closeTime is 1641287867099 (January 04, 2022
09:17:47:099 UTC) and windowSize is 1d, then openTime is
1641201420000 (January 3, 2022, 09:17:00 UTC).
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
Request parameters.
24 hour rolling window price change statistics. Careful when accessing this with no symbol.
Weight:
| Parameter | Symbols Provided | Weight |
|---|---|---|
| symbol | 1 | 2 |
| symbol parameter is omitted | 80 | |
| symbols | 1-20 | 2 |
| 21-100 | 40 | |
| 101 or more | 80 | |
| symbols parameter is omitted | 80 |
Security Type: NONE
Notes: Data Source:* Memory
Request parameters.
Best price/qty on the order book for a symbol or symbols.
Weight: |Parameter|Symbols Provided|Weight| |---|---|---| |symbol| 1 |2| | |omitted| 4| |symbols| Any |4|
Security Type: NONE
Notes: Data Source:* Memory
Request parameters.
Latest price for a symbol or symbols.
Weight: |Parameter|Symbols Provided|Weight| |---|---|---| |symbol| 1 |2| | |omitted| 4| |symbols| Any |4|
Security Type: NONE
Notes: Data Source:* Memory
Request parameters.
Price change statistics for a trading day.
Weight: 4 for each requested symbol. 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:**:
timeZone:-1:00, 05:45)0, 8, 4)Request parameters.
Test connectivity to the Rest API and get the current server time.
Weight(IP): 1
Security Type: NONE
The 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.
Get current account commission rates.
Weight(IP): 20
Security Type: USER_DATA
Notes: Data Source:* Database