getPendingOrder (SDK Trading)
getPendingOrder is a Fintechee API to get the specific pending order from the pending orders list. You can specify the pending order that you want to get by the selector(the index of the pending order).
object
getPendingOrder(context, selector) ⇒ EA SDK This function gets pending order. Phase (this API's scope): onTick | deinit
Kind: global function
Returns: object
- pending order.
Param | Type | Description |
---|---|---|
context | object | the name should be the same with the name of parameter of onTickFunction |
selector | number | index of pending order |
getPendingOrder (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)
}
})