getOrderId (SDK Trading)

getOrderId is a Fintechee API to get the ID of the specific pending order.

getOrderId(pendingOrder) ⇒ string

EA SDK This function gets the order ID of the specific pending order. Phase (this API's scope): onTick | deinit

Kind: global function
Returns: string - order ID.

Param Type Description
pendingOrder object specific pending order

getOrderId (SDK Trading)

registerEA(
"test_api",
"An EA to test APIs",
[],
function (context) { // Init()
},
function (context) { // Deinit()
},
function (context) { // OnTick()
    var length = getPendingOrdersListLength(context)
    for (var i = 0; i < length; i++) {
        var pendingOrder = getPendingOrder(context, i)
        if (pendingOrder != null) {
            var orderId = getOrderId(pendingOrder)
        }
    }
})