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

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)