getSwapPoint (SDK Trading)
getSwapPoint is a Fintechee API to get the swap point(financing) of the specific open trade.
number
getSwapPoint(openTrade) ⇒ EA SDK This function gets the swap point of the specific open trade. Phase (this API's scope): onTick | deinit
Kind: global function
Returns: number
- swap point.
Param | Type | Description |
---|---|---|
openTrade | object | specific open trade |
getSwapPoint (SDK Trading)
registerEA(
"test_api",
"An EA to test APIs",
[],
function (context) { // Init()
},
function (context) { // Deinit()
},
function (context) { // OnTick()
var length = getOpenTradesListLength(context)
for (var i = 0; i < length; i++) {
var openTrade = getOpenTrade(context, i)
if (openTrade != null) {
var swapPoint = getSwapPoint(openTrade)
}
}
})