Ⅹ. Basic order types

author-image
OKX

1. Limit order

A limit order is an order that buys or sells a custom amount at a specific price or better. After the order is placed, the system will post it on the order book and match it with the available orders - at the specified price or a price better than that.

Scenario 1: Assuming the current BTC market price is 42,000 USDT and you want to buy at 40,000 USDT. You can select Limit and set the buy price as 40,000 USDT. After the order is placed, the order will be filled automatically when the price drops to 40,000 USDT or below.

2. Advanced limit order

While a regular limit order is Good till Canceled by default, an advanced limit order offers 3 order options — Post Only, Fill or Kill, and Immediate or Cancel.

(1) Post Only

  • Post Only orders are guaranteed to enter the order book with the user being the market maker. If a Post Only order is about to match with an existing order, it will be canceled.

(2) Fill or Kill

  • A Fill or Kill order must be executed in its entirety. Otherwise, the entire order will be canceled.

(3) Immediate or Cancel

  • Immediate or Cancel orders must be executed immediately. Any portion of the order that cannot be executed immediately will be canceled.

For example, if a user wants to buy BTC and the order book is shown as below:

Scenario 1. You wanted to earn a Maker Fee and selected Advanced Limit Order > Post Only. If you set the buy price as 18,726 USDT and there's no immediate matching sell order, your order won't be filled right away and will be placed on the order book, making you a market maker. If your buy price is 18,737.25 USDT and has an immediate matching sell order, your order will be canceled.

Scenario 2. You selected the Fill or Kill option. If your buy price is 18,745.75 USDT and the order amount is 300 BTC, yet the total amount of available BTC on the order book is 266 (1+1+8+100+156), your order will be canceled because it cannot be fulfilled in its entirety (300-266=34 BTC). In this example, if your order amount is 266 BTC or less, the order will be placed and filled.

Scenario 3. You selected the Immediate or Cancel option. If your buy price is 18,745.75 USDT and the order amount is 300 BTC, and the total amount of available BTC on the order book is 266 (1+1+8+100+156), your order will be partially filled and partially canceled. Your order will only be executed with the available 266 BTC and the rest of the order will be canceled.

3. Market order

A market order lets you instantly buy or sell at the best available market price. However, please note a) a single trade's market value cannot exceed 100,000 USDT in spot trading; b) different market orders may have different limits and the limits can be changed as the market fluctuates.

Scenario 1. You want to buy BTC at the current market price and you want your order filled immediately. You can place a market order and set its total amount as 20,000 USDT. Assuming BTC's current market price is 40,500 USDT, your order will be filled at around 40,500 USDT immediately after it's placed.

Scenario 2. You want to close all your positions at the market price as soon as possible. You can use our Market Close All feature to achieve that. Assuming you're holding 100 BTC contracts and BTC's current market price is 10,000 USD, all your positions will be closed at 10,000 USD if you have selected Market Close All. If a position is pending close, you'll be reminded to cancel the pending order and then continue with Market Close All.

Price limit for futures/perpetual swaps

Background:

There is a maximum price for buy orders and a minimum price for sell orders. For market order, it will follow the same price limit rules as limit order, thus it is possible that the market order may not be filled when there is insufficient liquidity in the orderbook and will remain open.

Retrying with a new price limit

The system will try to update the price limit for any unfilled and open market order that users place directly or triggered by any strategy. The price will be updated every second until it is filled, up to 10 minutes.

Size limit for futures/perpetual swaps

Background:

There is a maximum number of contracts that can be placed in a market order. It is possible that users with large positions will not be able to close out their positions in one go. They would have to split up their close order into smaller orders to close.

Splitting of a large order

When users place market close all orders, if the position size is larger than the maximum number of contracts permissible per order, the system will help users break up the orders into smaller amounts. Orders will be placed one by one with each subsequent order only being placed once the previous order has been fully filled. The order size will be the smaller amount between the remaining position size and the max number of contracts for a market order. It minimises the hassle for users with large positions as they will not need to manually split up their orders into smaller amounts.

# 4. Reduce-only order

1. What is a reduce-only order?

A reduce-only order only reduces your current position, as opposed to increasing it. This means you can only use it to close a position. In contrast, non-reduce-only orders can reduce or increase your position.
In one-way mode, you can choose whether to place a reduce-only order to reduce your position. In hedge mode, all closing orders are reduce-only by default, all opening orders are non reduce-only.
You can have a maximum of 100 reduce-only orders under 1 position. If you exceed the maximum amount, the order will fail.

The details are as follows:
(1) If you place a reduce-only order, and the order is used to open position or increase your position, the order will fail. The error message is illustrated below:
11

(2) When you place an order, if the conditions permitted by all the reduce-only order to reduce your positions are not met, the system will automatically modify the amount of your open reduce-only orders or cancel your open reduce-only orders. This ensures the overall results of your open orders after modification or cancellation will not increase your position. The reason for order cancellation is as follows (you can check in your order history):
22

(3) Whether the system automatically modifies or cancels your reduce-only order is determined by the total amount of positions you have, as well as by the order filled priority. Orders with a lower priority are cancelled to ensure those with a higher priority can be placed successfully.
(4) Principle of the order filled priority: The higher the price of your buying order, the higher the priority. The lower the price of your selling order, the higher the priority. If orders have the same price, those placed earlier will have higher priority.

Example (BTC-USDT Perpetual, hedge mode):

Scenario Position Open Orders Current Order to Place Order Result
No position, place a closing order None None 100 contracts, close long Order failed
Hold position, place a closing order, amount exceeds open position 100 contracts, long None 200 contracts, close long Order placed. The order amount is modified to 100 contracts
Hold position, place another closing order at a better price 100 contracts, long Sequence 1: 17,000 (price), 80 contracts, close long Sequence 2: 18,000 (price), 20 contracts, close long 16,000 (price), 50 contracts, close long Order placed. The sequence 1 order amount is modified to 50 contracts. The sequence 2 order is cancelled. All closing-long orders add up to 100 contracts.
Hold position, place another closing order with worse price 100 contracts, long Sequence 1: 17,000 (price), 80 contracts, close long Sequence 2: 18,000 (price), 20 contracts, close long 19,000 (price), 50 contracts, close long Order failed (since the current order is sorted at the end of the sequence, and the two orders before it add up to 100 contracts).

Example (BTC-USDT Perpetual, one-way mode):

Scenario Position Open Orders Current Order to Place Order Result
No position, place reduce-only order None None 100 contracts, buy, reduce-only Order failed
Hold position, place a reduce-only order, same direction as the position 100 contracts, buy None 10 contracts, buy, reduce-only Order failed
Hold position, place a reduce-only order, amount exceeds position. 100contracts, buy None 200 contracts, sell, reduce-only Order placed. The amount of the current order is modified to 100 contracts.
Hold position,have open reduce-only orders. Place another reduce-only order.The total amount of all orders exceeds the position. 100contracts, buy Sequence 1: 17,000 (price), 80 contracts, sell, reduce-only Sequence 2: 18,000 (price), 20 contracts, sell, reduce-only 16,000 (price), 50 contracts, sell, reduce-only Order placed. The sequence 1 order amount is modified to 50 contracts. The sequence 2 order is cancelled.
Hold position,have open reduce-only orders and non-reduce-only orders. Place another reduce-only order, total amount of all orders exceeds the position. 100 contracts, buy Sequence 1:17,000 (price), 80 contracts, sell, reduce-only Sequence 2:18,000 (price), 20 contracts, non-reduce-only 16,000 (price), 50 contracts, sell, reduce-only Order placed. The sequence 1 order amount is modified to 50 contracts. The sequence 2 order still exists.(non-reduce-only orders can increase your position)

2. How to place a reduce-only order in hedge mode

All closing orders (including limit order, market order, stop order, trigger order, trailing stop orders) are set to be reduce-only, you do not need to manually select the option.

3.How to place a reduce-only order in one-way mode

Reduce-only orders can only be manually selected in one-way mode. If you do not select the reduce-only option, your order will be a non-reduce-only order.
There can be both reduce-only orders and non-reduce-only orders in your account at the same time.

Placing an order on the order page

1
On the order page (limit order, market order, advanced limit order, or TP/SL order), you can choose "Reduce-only" to place an order.

Submit a TP/SL order along with an open order

2
When submitting a TP/SL order along with an open order,the TP/SL order is a reduce-only order by default.

Placing an order on the position page

3
On the position page, TP/SL, Close, and Close all, are all reduce-only orders by default.