See rate limit applied to this WebSocket request.
Market Orders vs. Limit Orders
Market orders can be created via the same WebSocket API for creating limit orders. The table below highlights the key differences in payload between a limit order and a market order:Field | Limit Order Value | Market Order Value |
---|---|---|
tradeType | limit | market |
postOnly | true or false | Not supported |
maxSlippage | Not supported | 0 - 1 inclusive |
price | Strict price | Expected price |
maxSlippage
is not specified, it will default to 0.02
.
Fill Price
When submitting a market order, theprice
field in the payload represents the expected price for the order. The actual fill price may differ due to market conditions, but is constrained by the maxSlippage
parameter.
- For buy orders, the fill price will never exceed
expectedPrice × (1 + maxSlippage)
. - For sell orders, the fill price will never be lower than
expectedPrice × (1 - maxSlippage)
.
Order Fill and Cancellation Behavior
Market orders are only executed once and any unfilled quantities are cancelled. If your market order is not fully filled, you will receive a cancellation confirmation message, as described in Cancel Order By ID. The cancellation confirmation message will includefilledQuantity
and avgFillPrice
fields if the order was partially filled.
If your market order is fully filled, you will receive a completeFillOrder
notification, as described in Order Filled Notifications.
IOC Orders
Immediate-Or-Cancel (IOC) orders allow traders to execute as much of the order as possible immediately, with any unfilled portion automatically cancelled. This can be achieved by placing a market order with amaxSlippage
of 0
.