Managing Orders

Order Management

Order management is crucial for the more advanced bots and trading systems.

With these commands you are able to:

  • Cancel all or specific orders

  • Check if orders are open or filled

Cancelling orders

To cancel a specific order, we use CancelOrder.

To cancell ALL orders, we use CancelAllOrders.

Open orders

There are multiple ways to check for open orders.

We can either do IsAnyOrderOpen, which checks for any open orders in the bot or a system. If the positionId parameter is not set, then the system will check for all orders that a bot or system has created.

This command also works for managed trading.

Or we can do IsOrderOpen to check for specific order.

Order Information

Gather order information to keep an eye on your orders and let your system know what it needs to do next. Using this category of commands you can check if an order is partially or fully filled, how much the fee costs are, when was the order opened and much more.

Order containers and collections

To get all possible information about partially filled and filled orders, we use GetAllFilledOrders. This command returns a collection of all (partially) filled orders executed by the bot.

Not available in Visual Editor. Use OrderContainer instead.

For open orders, we use GetAllOpenOrders. This command returns a collection of all open orders executed by the bot.a

Not available in Visual Editor. Use OrderContainer

For all order-specific information, we use OrderContainer. The returned value is an array that contains the information.

Cancelled amount

To get order's cancelled amount, we use GetOrderCancelledAmount. This amount is what was left unfilled when the order was cancelled, or the full amount when the order is completed.

Filled amount

To get the order's filled amount, we use GetOrderFilledAmount. This value tells how much of the order has been filled. The amount will be the same as the executed amount if the order is filled.

Order timestamp

To get the time when the order was created, we use GetOrderOpenTime. The returned value is presented as minutes.

Last updated