Skip to main content

get_orders

This function can only be used in trade() and on_order_state_change().

Input​

status: OrderStatus;
limit: number;

Check OrderStatus

Note get_orders will return the SAME response each time the callback is triggered. Recalling CA.get_orders will not get the updated result. The result will be upated the next time the callback is triggered. We are improving this experience - you can leverge on_order_state_change to trigger side effect

Return​

orders: [Order];

Check Order

Example​

To get the latest 5 FILLED orders.

orders = CA.get_orders(CA.OrderStatus.FILLED, 5)

To get the latest 3 NEW orders.

orders = CA.get_orders(CA.OrderStatus.NEW, 3)