Delete Order

To delete an order, please fill the following values in the value map:

Parameter name

Datatype

Description

COMMAND

String

The command. Must be DeleteOrder.

ORDER_ID

String

The identifier of the order. The order must exist and must be in the waiting status.

ACCOUNT_ID

String

The identifier of the account the order should be placed for. The value must be obtained from the Accounts table, the AccountID column.

Please note that the account identifier may not necessarily be equal to the account name which is shown in the Trading Station application.

Example: Delete an order [hide]

    private void deleteOrder(String sOrderID, string sAccountID)
    {
       O2GRequestFactory factory = mSession.getRequestFactory();
       if (factory == null) {
           return;
       }
       O2GValueMap valuemap = factory.createValueMap();
       valuemap.setString(O2GRequestParamsEnum.COMMAND, Constants.Commands.DeleteOrder);
       valuemap.setString(O2GRequestParamsEnum.ORDER_ID, sOrderID);
       valuemap.setString(O2GRequestParamsEnum.ACCOUNT_ID, sAccountID);
       O2GRequest request = factory.createOrderRequest(valuemap);
       mSession.sendRequest(request);
    }

back