getPrice (SDK Trading)

getPrice is a Fintechee API to get the price(limit or stop) of the specific pending order.

getPrice(pendingOrder) ⇒ number

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

Kind: global function
Returns: number - price.

Param Type Description
pendingOrder object specific pending order

getPrice (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 price = getPrice(pendingOrder)
        }
    }
})