Place Order

This function trigger the Place Order dialog, populated with given data.

Important

The supported order types are: LMT, MKT, STOP, STWL. Lifetime can be one off this options: DAY, GTC, GTD(mm/dd/yyyy).

It takes ten parameters: the contract, provider, account, side, quantity, order type, price, limit, the callback function ,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 placeOrder(contract, provider, account, side, quantity, orderType, price, limit, callback, lifetime, confimartion)

Possible Responses:

  • Success

{
    "RQT":"place_order",        // Request Type
    "RQI":"15",                 // Request Id
    "RES":"OK",                 // Result
    "PV":"QOR",                 // Provider
    "AC":"4635",                // Account
    "INS":"ESZ17",              // Instrument
    "SD":"B",                   // Side
    "QT":"1",                   // Quantity
    "TP":"MKT",                 // Order Type
    "OD":"435626"               // Order Id
}
  • Error

{
    "RQT":"place_order",                // Request Type
    "RQI":"15",                         // Request Id
    "RES":"ERR",                        // Result
    "MSG":"Cannot place the order"      // Error Message
}