Skip to main content

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