Create Algo Order Sample
STOP
STOP order will be triggered once the given trigger_price is reached and new order of trigger_price_type will be created.
TP_SL
-
For each
TP_SLorder placed, three algo orders will be created in Orderly system. -
To edit a
TP_SLorder, user must send the edit order request on theroot_algo_orderand must pass bothroot_algo_orderandchild_ordersas parameters. User may pass only onechild_orderfor editing. If the goal is to editquantity, bothchild_ordermust be passed and thequantityneed to be identical. -
For each user, there can be at most 10 untriggered
TP_SLorders. -
For each user, there can be at most 1 untriggered
POSITIONAL_TP_SLorder.
TP_SLorders support triggering Limit orders.
POSITIONAL_TP_SL
BRACKET
The nature ofBRACKET order is to use track a regular order and close its position with TP_SL \ POSITIONAL_TP_SL order. In this example, assume the regular order under BRACKET order as leg_1 and the TP_SL \ POSITIONAL_TP_SL child order under BRACKET order as leg_2.
leg_1 = BRACKET and the triggered regular order
leg_2 = POSITIONAL_TP_SL \ TP_SL and their triggered child orders
BRACKET + TP_SL : The quantity of TP_SL order is determined by the executed_quantity of leg_1.
BRACKET + POSITIONAL_TP_SL : The quantity of POSITIONAL_TP_SL order is determined by the user’s position at the time of triggering.
Note: For BRACKET + POSITIONAL_TP_SL, when leg_2’s POSITIONAL_TP_SL order is triggered, the previously active POSITIONAL_TP_SL orders will be canceled. If there were existing triggered POSITIONAL_TP_SL order, leg_2 will be canceled.
Makes sure there’s only one active POSITIONAL_TP_SL order. For any of the regular order under leg_1 being executed, leg_1 and leg_2 will be cutoff such that leg_2 becomes an independent POSITIONAL_TP_SL order.