Parameters
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
- Sell TPSL:
Price
must be >StopPx
andStopPx
must be >StopLimitPx
- Buy TPSL:
Price
must be <StopPx
andStopPx
must be <StopLimitPx
Caveats
- Only GTC and GTD are supported for
TimeInForce
- Like Stop orders, TPSL orders cannot be modified.
- TPSL orders cannot be submitted during auction mode.
- The Post-Only tag is not supported. It cannot be populated or must be false.
- Batch orders are not supported.
Auction Mode TransitionExisting TPSL orders will be canceled if a product is transitioned to auction mode.
Samples
TPSL Sell Order
This TPSL sell order for BTC-USD places a live sell limit order at price 9785Side=2|Price=9785|StopLimitPx=8245|StopPx=8500
- If the price falls below 8500 and no part of this limit order has been filled, it will be repriced from 9785 to 8245.
- If this limit order is filled or partially filled at 9785, then it will never be repriced.
TriggerPriceDirection
is NOT accepted.
Message Flow
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...
Repricing ExampleIf the stop is triggered and the order is repriced, an ExecutionReport is returned with a RestatementReason of
3
for “Repricing of order”:
<- MsgType=8|OrdType=O|ExecType=D|ExecRestatementReason=3|Price=8245...
WebSocket User Channel
If the stop is triggered and the order is repriced, a change message is published, for example:tpsl_triggered
. Other clients will receive change reason, modify_order
.