Built-in Functions
Structures
Built-in Variables and Constants
Conventions
Exchanges
ORDER_CONDITION_TYPE
Conditional order type constants: the values of the ConditionType field of the Condition structure, used when creating, modifying and querying conditional orders. Ordinary orders have no condition (in Rust, Condition.ConditionType of an Order is -1).
| Constant | Value | Meaning |
|---|---|---|
ORDER_CONDITION_TYPE_OCO | 0 | An OCO order (One-Cancels-the-Other): take-profit and stop-loss conditions are set together, and when one triggers the other is canceled automatically |
ORDER_CONDITION_TYPE_TP | 1 | A take-profit order: an order is placed when the price reaches the take-profit trigger price |
ORDER_CONDITION_TYPE_SL | 2 | A stop-loss order: an order is placed when the price reaches the stop-loss trigger price, to limit losses |
ORDER_CONDITION_TYPE_GENERIC | 3 | A generic conditional order: its behavior depends on the exchange, and it only appears in query results |
In this sectionRead the whole section
| Name | Description |
| ORDER_CONDITION_TYPE_OCO | An OCO order (One-Cancels-the-Other): take-profit and stop-loss conditions are set together, and when one triggers the other is canceled automatically; the valu… |
| ORDER_CONDITION_TYPE_TP | A take-profit order: an order is placed when the price reaches the take-profit trigger price; the value is 1. |
| ORDER_CONDITION_TYPE_SL | A stop-loss order: an order is placed when the price reaches the stop-loss trigger price, to limit losses; the value is 2. |
| ORDER_CONDITION_TYPE_GENERIC | A generic conditional order: its behavior depends on the exchange, and it only appears in query results; the value is 3. |