ConceptsOrders
Limit
FIX OrdType <40>=2
A Limit order rests on the limit order book at a specified price and executes only at that price or better.
Use cases
Use a Limit order to control the execution price and, when appropriate, provide liquidity. Common uses
include market making, scaling into or out of a position at chosen levels, and targeting maker fees with
post_only. The order cannot fill worse than its limit price, but it may stay unfilled or fill only
partially.
Example
Example: create a Limit order on the Binance Futures Crypto exchange to SELL 20 ETHUSDT-PERP Perpetual Futures contracts. Set a limit price of 5000 USDT to act as a market maker.
use nautilus_model::{
enums::{OrderSide, TimeInForce},
identifiers::InstrumentId,
types::{Price, Quantity},
};
let order = self.order().limit(
InstrumentId::from("ETHUSDT-PERP.BINANCE"),
OrderSide::Sell,
Quantity::from(20),
Price::from("5000.00"),
Some(TimeInForce::Gtc), // optional (default GTC)
None, // expire_time
Some(true), // post_only (default false)
Some(false), // reduce_only (default false)
None, // quote_quantity (default false)
None, // display_qty (default full display)
None, // emulation_trigger
None, // trigger_instrument_id
None, // exec_algorithm_id
None, // exec_algorithm_params
None, // tags
None, // client_order_id
);See the LimitOrder API reference
for further details.
Related guides
- Orders - Order concepts, execution instructions, and the order factory.
- Emulated orders - Emulating Limit orders, released as Market orders on trigger.
- Execution - How orders reach the venue and fills are handled.