Cancel Replace Order

This function triggers the Cancel / Place Order dialog, populated with the given data.

Important

The supported order types are: LMT, MKT, STOP, STWL.

Lifetime can be one of these options: DAY, GTC, GTD(mm/dd/yyyy).

It takes eleven parameters: the contract, provider, account, the id for that order, side, quantity, order type, price, limit, the callback function that will be called when the result is available, the lifetime and the confirmation.

Important

Confirmation is optional or can be one of the following options:
  • ON, the order will be placed only with user confirmation.

  • OFF, the order will be placed without any confirmation.

  • DEF, the order will be placed according to the Order Entry Properties setting.

  • Default value will be DEF if this parameter is missing

function cancelReplaceOrder(contract, provider, account, orderId, side, quantity, orderType, price, limit, callback, lifetime, confirmation)

Possible Responses:

  • Success

{
    "RQT":"replace_order",      // Request Type
    "RQI":"25",                 // Request Id
    "RES":"OK"                  // Result
    "OD":"435626"               // Order Id

}
  • Error

{
    "RQT":"replace_order",              // Request Type
    "RQI":"25",                         // Request Id
    "RES":"ERR",                        // Result
    "MSG":"Cannot find the order"       // Error Message
}