cancel_order
This function can only be used in trade() or on_tradingview_signal().Inputβ
order: Order;
Check Order
Exampleβ
To get the lastest 1 order with status as NEW, and cancel this order.
orders = CA.get_orders(CA.OrderStatus.NEW, 1)
for order in orders:
CA.cancel_order(order)
cancel_order_by_client_order_id
This function can only be used in trade() or on_tradingview_signal().Inputβ
client_order_id: string;
Exampleβ
CA.cancel_order_by_client_order_id('order1')