Type/to search
Built-in Functions
Structures
Built-in Variables and Constants
EXCHANGE
ORDER_STATE
ORDER_TYPE
ORDER_CONDITION_TYPE
ORDER_CONDITION_TYPE_OCO
ORDER_CONDITION_TYPE_TP
ORDER_CONDITION_TYPE_SL
ORDER_CONDITION_TYPE_GENERIC
POSITION_DIRECTION
ORDER_OFFSET
PERIOD
LOG_TYPE
Conventions
Exchanges

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).

ConstantValueMeaning
ORDER_CONDITION_TYPE_OCO0An 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_TP1A take-profit order: an order is placed when the price reaches the take-profit trigger price
ORDER_CONDITION_TYPE_SL2A stop-loss order: an order is placed when the price reaches the stop-loss trigger price, to limit losses
ORDER_CONDITION_TYPE_GENERIC3A generic conditional order: its behavior depends on the exchange, and it only appears in query results

In this sectionRead the whole section

NameDescription
ORDER_CONDITION_TYPE_OCOAn 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_TPA take-profit order: an order is placed when the price reaches the take-profit trigger price; the value is 1.
ORDER_CONDITION_TYPE_SLA 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_GENERICA generic conditional order: its behavior depends on the exchange, and it only appears in query results; the value is 3.