Market-If-Touched
FIX OrdType <40>=J (Market If Touched)
A Market‑If‑Touched order releases a Market order when its trigger price is reached. Traders often use it to enter on a pullback or take profit: a SELL order against a LONG position or a BUY order against a SHORT position.
Use cases
Use a Market‑If‑Touched order to prioritize execution when a target price is touched. It triggers in the opposite market direction from a stop order, such as buying below or selling above the current market. The touch price is not a guaranteed fill price, and the released Market order can slip, be rejected, or remain unfilled.
Example
In the following example we create a Market-If-Touched order on the Binance Futures exchange to SELL 10 ETHUSDT-PERP Perpetual Futures contracts at a trigger price of 10,000 USDT, active until further notice:
use nautilus_model::{
enums::{OrderSide, TimeInForce, TriggerType},
identifiers::InstrumentId,
types::{Price, Quantity},
};
use ustr::Ustr;
let order = self.order().market_if_touched(
InstrumentId::from("ETHUSDT-PERP.BINANCE"),
OrderSide::Sell,
Quantity::from(10),
Price::from("10000.00"),
Some(TriggerType::LastPrice), // optional (default DEFAULT)
Some(TimeInForce::Gtc), // optional (default GTC)
None, // expire_time
Some(false), // reduce_only (default false)
None, // quote_quantity (default false)
None, // emulation_trigger
None, // trigger_instrument_id
None, // exec_algorithm_id
None, // exec_algorithm_params
Some(vec![Ustr::from("ENTRY")]), // tags
None, // client_order_id
);See the
MarketIfTouchedOrder API reference
for further details.
Related guides
- Orders - Trigger types and other execution instructions.
- Emulated orders - Emulating conditional orders on venues without native support.
- Execution - How orders reach the venue and fills are handled.