Submits a new buy or sell order to the exchange for immediate or conditional execution, supporting Market, Limit, and Stop Market order types.
This endpoint is the primary method for executing trades. To place an order, the request must include the symbol (e.g., BTCUSDT.PERP), the side (BUY or SELL), and the order type (MARKET, LIMIT, or STOP_MARKET). Users should specify the size of the order by providing either the quantity (denominated in the base asset) or the amount (denominated in the quote asset).
For Limit orders, the price field allows users to set a specific execution price. Additionally, a priceMatchStrategy can be specified to define advanced matching behaviors for limit orders.
For risk management, the reduceOnly flag can be set to true to ensure the order only reduces an existing position and does not open a new one. A maxSlippagePrice can also be defined to protect against excessive price deviation during execution.
Furthermore, the timeInForce parameter allows users to specify how long an order remains active. For Limit orders, the default policy is GTC (Good Till Cancelled), but users may also select IOC (Immediate or Cancel). For Market orders, while they are processed as IOC internally, providing an explicit timeInForce value will trigger a 400 Bad Request error. Please note that when an order is executed as IOC, any unfilled portion is immediately canceled; consequently, the API response will reflect the actually filled amount in the quantity field and the order status will be marked as CANCELLED.
Ensure the symbol parameter exists in the 'Tradable Symbol List'. If a symbol is not supported to be traded, the request will be rejected with a 400 Bad Request or specific error code indicating the symbol is not tradable.
Request Body Example
Market Buy Order (1 BTC Long)
This example demonstrates opening a Long position with a specific quantity (1 BTC) using a Market order.
This example demonstrates placing a Limit order to Sell a specific value (e.g., 9,000 USDT worth) at a fixed price of 90,000. The system will calculate the corresponding base asset quantity (in this case, 0.1 BTC).
This example demonstrates placing a Limit order where the price is automatically set to the current Best Bid or Offer (BBO) using the priceMatchStrategy, instead of specifying a fixed price.
Stop Market Buy Order
This example demonstrates placing a Stop Market order to enter a Long position (Buy) only when the price reaches or crosses 86,000. This is typically used to catch an upward trend breakout.
Limit Order with IOC (Immediate or Cancel)
This example demonstrates placing a Limit order with the timeInForce parameter set to IOC. This ensures that the order is executed immediately at the specified price or better. If the order cannot be fully filled instantly, any remaining quantity is automatically canceled rather than staying on the order book.
Market Order Restriction Market orders are internally processed as IOC by default. Do not include the timeInForce parameter when placing a MARKET order. Providing any value (such as GTC or even IOC) for a Market order will result in a 400 Bad Request error.