Module stop
Expand description
Stop orders: conditional orders of the exchange.
Bybit has no separate stop order method for category linear. A conditional order is an ordinary order with a
triggerPrice: it waits as Untriggered and becomes a working order when the price crosses the trigger. The shared
kinds map as follows.
| Kind | Order | Trigger direction |
|---|---|---|
StopLoss | market | a sell waits for a fall, a buy for a rise |
TakeProfit | market | a sell waits for a rise, a buy for a fall |
StopLimit | limit at limit_price | as StopLoss |
The take profit and stop loss that the exchange keeps on a position (/v5/position/trading-stop) are conditional
orders too: they are listed here, with a made-up cid, but this connector does not create them (they need an open
position and cannot carry a client order id).
Functions§
- build
- The request for a stop order.
- snapshot
- The snapshot of a conditional order.
- state_
of - The state of a conditional order by the status of the exchange.
- trigger_
direction - The trigger direction of the API:
1when the order fires as the price rises to the trigger price,2when it falls to it.