Take Profit Stop Loss (TPSL) orders are supported in FIX with New Order Single (35=D) and the Create order REST API.
TPSL orders allow users to set predefined profit and loss levels simultaneously for their position.
When an asset price reaches one of the target prices, the position is closed with a limit order. If one of the orders is triggered, the other order is canceled automatically. An order can only have one TP/SL on one side.
These parameters are required for TPSL orders:
Tag | Name | Type | Required | Description |
---|---|---|---|---|
40 | OrdType | Char | Y | Order Type must be O (the letter Oh) |
44 | Price | Decimal | Y | Take profit price (in this context) See Price Rules below. |
99 | StopPx | Decimal | Y | Stop loss trigger price |
3040 | StopLimitPx | Decimal | Y | Limit order price if stop loss triggers |
Price Rules
Price
must be > StopPx
and StopPx
must be > StopLimitPx
Price
must be < StopPx
and StopPx
must be < StopLimitPx
TimeInForce
Price
StopPx
StopLimitPx
OrderQty
This TPSL sell order for BTC-USD places a live sell limit order at price 9785
:
Side=2|Price=9785|StopLimitPx=8245|StopPx=8500
This differs from regular stop orders where a stop order is NOT live until the price is traded through the StopPx.
TPSL Order Example
-> OrdType=O|Side=2|Price=9785|StopLimitPx=8245|StopPx=8500...
Execution Report Example
<- MsgType=8|OrdType=O|Side=2|Price=9785|StopLimitPx=8245|StopPx=8500...