popupMessage

Common Function SDK | This function pops up a message.

popupMessage(message: string)
Parameters
message (string)

popupWarningMessage

Common Function SDK | This function pops up a warning message.

popupWarningMessage(message: string)
Parameters
message (string)

popupErrorMessage

Common Function SDK | This function pops up an error message.

popupErrorMessage(message: string)
Parameters
message (string)

printMessage

Common Function SDK | This function prints a message.

printMessage(message: string)
Parameters
message (string)

printWarningMessage

Common Function SDK | This function prints a warning message.

printWarningMessage(message: string)
Parameters
message (string)

printErrorMessage

Common Function SDK | This function prints an error message.

printErrorMessage(message: string)
Parameters
message (string)

registerIndicator

Indicator SDK | This function registers an indicator.

registerIndicator(indiName: string, indiDesc: string, indicatorFunction: function, paramsTemplate: array, extParamDataInputTmpl: array, extParamDataOutputTmpl: array, whereToRenderTmpl: number, initFunction: function, deinitFunction: function, renderFunction: function)
Parameters
indiName (string) -- the name of this indicator
indiDesc (string) -- the description of this indicator
indicatorFunction (function) -- the function of this indicator (e.g. function (context) {})
paramsTemplate (array) -- the parameters of this indicator (the range MUST be filled with null if the type is PARAMETER.STRING) e.g. [{ name: "factor", value: 1, required: true, type: PARAMETER.NUMBER, range: [0, 1] }, { name: "checked", value: true, required: false, type: PARAMETER.BOOLEAN, range: null }]
extParamDataInputTmpl (array) -- the maps of the data input of this indicator and the index e.g. [{ name: DATA_NAME.CLOSE, index: 1 }]
extParamDataOutputTmpl (array) -- the setting for the output of this indicator e.g. [{ name: "x", visible: true, renderType: RENDER_TYPE.LINE, color: "steelblue" }]
whereToRenderTmpl (number) -- WHERE_TO_RENDER.CHART_WINDOW or WHERE_TO_RENDER.SEPARATE_WINDOW
initFunction (function) -- the init function of this indicator (e.g. function (context) {})
deinitFunction (function) -- the deinit function of this indicator (e.g. function (context) {})
renderFunction (function) -- the render function of this indicator (e.g. function (context) {})

unregisterIndicator

Indicator SDK | This function unregisters an indicator.

unregisterIndicator(indiName: string)
Parameters
indiName (string) -- the name of an indicator

getIndiName

Indicator SDK | This function gets the name of this indicator.

getIndiName(context: object): string
Parameters
context (object) -- the name should be the same as the name of the parameter of the indicatorFunction
Returns
string: the name of this indicator.

setIndiShift

Indicator SDK | This function sets the shift value of the data output of this indicator.

setIndiShift(context: object, name: string, shift: string)
Parameters
context (object) -- the name should be the same as the name of the parameter of the indicatorFunction
name (string) -- specifies the name of the data output of this indicator
shift (string) -- specifies the shift value of the data output of this indicator

getIndiParameter

Indicator SDK | This function gets the parameter's value of this indicator.

getIndiParameter(context: object, paramName: string): (number | string)
Parameters
context (object) -- the name should be the same as the name of the parameter of the indicatorFunction
paramName (string) -- the name of the specified parameter
Returns
(number | string): the value of the specified parameter.

getDataInput

Indicator SDK | This function gets the data input.

getDataInput(context: object, index: number): array
Parameters
context (object) -- the name should be the same as the name of the parameter of the indicatorFunction
index (number) -- specifies the index of the data input of this indicator
Returns
array: the data input of this indicator.

getDataOutput

Indicator SDK | This function gets the data output.

getDataOutput(context: object, name: string): array
Parameters
context (object) -- the name should be the same as the name of the parameter of the indicatorFunction
name (string) -- specifies the name of the data output of this indicator
Returns
array: the data output of this indicator.

getCalculatedLength

Indicator SDK | This function gets the length of the data to be calculated.

getCalculatedLength(context: object): number
Parameters
context (object) -- the name should be the same as the name of the parameter of the indicatorFunction
Returns
number: the length of the data to be calculated.

registerEA

EA SDK | This function registers an EA.

registerEA(eaName: string, eaDesc: string, paramsTemplate: array, initFunction: function, deinitFunction: function, onTickFunction: function, onTransactionFunction: function)
Parameters
eaName (string) -- the name of this EA
eaDesc (string) -- the description of this EA
paramsTemplate (array) -- the parameters of this EA (the range MUST be filled with null if the type is PARAMETER.STRING) e.g. [{ name: "factor", value: 1, required: true, type: PARAMETER.NUMBER, range: [0, 1] }, { name: "checked", value: true, required: false, type: PARAMETER.BOOLEAN, range: null }]
initFunction (function) -- the init function of this EA (e.g. function (context) {})
deinitFunction (function) -- the deinit function of this EA (e.g. function (context) {})
onTickFunction (function) -- the onTick function of this EA (e.g. function (context) {})
onTransactionFunction (function) -- the onTransaction function of this EA (e.g. function (context) {})

unregisterEA

EA SDK | This function unregisters an EA.

unregisterEA(eaName: string)
Parameters
eaName (string) -- the name of this EA

launchEA

EA SDK | This function launches the specific EA. Phase (this API's scope): No limitation, but please note that DO NOT call this API in the OnTick function.

launchEA(eaName: string, symbolName: any, params: array)
Parameters
eaName (string) -- the name of the specific EA
symbolName (any)
params (array) -- the parameters of the specific EA e.g. [{ name: "param1", value: 666 }]

getEAName

EA SDK | This function gets the name of this EA.

getEAName(context: object): string
Parameters
context (object) -- the name should be the same as the name of the parameter of the onTickFunction
Returns
string: the name of this EA.

getPendingOrdersListLength

EA SDK | This function gets the length of the pending orders list. Phase (this API's scope): onTick | deinit

getPendingOrdersListLength(context: object): number
Parameters
context (object) -- the name should be the same as the name of the parameter of the onTickFunction
Returns
number: the length of the pending orders list.

getCancelledOrdersListLength

EA SDK | This function gets the length of the cancelled orders(including the rejected orders) list. Phase (this API's scope): onTick | deinit

getCancelledOrdersListLength(context: object): number
Parameters
context (object) -- the name should be the same as the name of the parameter of the onTickFunction
Returns
number: the length of the cancelled orders(including the rejected orders) list.

getPendingOrder

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

getPendingOrder(context: object, selector: number): object
Parameters
context (object) -- the name should be the same as the name of parameter of the onTickFunction
selector (number) -- the index of the pending order
Returns
object: the pending order.

getOrderId

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

getOrderId(order: object): string
Parameters
order (object) -- the specific pending order or cancelled order or rejected order
Returns
string: the order ID.

getPrice

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

getPrice(order: object): number
Parameters
order (object) -- the specific pending order or cancelled order or rejected order
Returns
number: the price.

getTime

EA SDK | This function gets the time(UTC time stamp) of the specific pending order or cancelled order or rejected order. Phase (this API's scope): onTick | deinit

getTime(order: object): number
Parameters
order (object) -- the specific pending order or cancelled order or rejected order
Returns
number: the time(UTC time stamp).

getLots

EA SDK | This function gets the volume lots(or the bet per pip when it comes to Spread Betting) of the specific pending order or cancelled order or rejected order. Phase (this API's scope): onTick | deinit

getLots(order: object): number
Parameters
order (object) -- the specific pending order or cancelled order or rejected order
Returns
number: the volume lots(or the bet per pip when it comes to Spread Betting).

getExpiration

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

getExpiration(order: object): number
Parameters
order (object) -- the specific pending order or cancelled order or rejected order
Returns
number: the expiration.

getOpenTradesListLength

EA SDK | This function gets the length of the open trades list. Phase (this API's scope): onTick | deinit

getOpenTradesListLength(context: object): number
Parameters
context (object) -- the name should be the same as the name of the parameter of the onTickFunction
Returns
number: the length of the open trades list.

getHistoryTradesListLength

EA SDK | This function gets the length of the historical trades list. Phase (this API's scope): onTick | deinit

getHistoryTradesListLength(context: object): number
Parameters
context (object) -- the name should be the same as the name of the parameter of the onTickFunction
Returns
number: the length of the historical trades list.

getOpenTrade

EA SDK | This function gets the open trade. Phase (this API's scope): onTick | deinit

getOpenTrade(context: object, selector: number): object
Parameters
context (object) -- the name should be the same as the name of the parameter of the onTickFunction
selector (number) -- the index of the open trade
Returns
object: the open trade.

getBrokerName

EA SDK | This function gets the broker name of the specific pending order or cancelled order or rejected order or open trade or historical trade. Phase (this API's scope): onTick | deinit

getBrokerName(orderOrTrade: object): string
Parameters
orderOrTrade (object) -- the specific pending order or cancelled order or rejected order or open trade or historical trade
Returns
string: the broker name.

getAccountId

EA SDK | This function gets the account ID of the specific pending order or cancelled order or rejected order or open trade or historical trade. Phase (this API's scope): onTick | deinit

getAccountId(orderOrTrade: object): string
Parameters
orderOrTrade (object) -- the specific pending order or cancelled order or rejected order or open trade or historical trade
Returns
string: the account ID.

getTradeId

EA SDK | This function gets the trade ID of the specific open trade or historical trade. Phase (this API's scope): onTick | deinit

getTradeId(trade: object): string
Parameters
trade (object) -- the specific open trade or historical trade
Returns
string: the trade ID.

getSymbolName

EA SDK | This function gets the symbol name of the specific pending order or cancelled order or rejected order or open trade or historical trade. Phase (this API's scope): onTick | deinit

getSymbolName(orderOrTrade: object): string
Parameters
orderOrTrade (object) -- the specific pending order or cancelled order or rejected order or open trade or historical trade
Returns
string: the symbol name.

getOpenPrice

EA SDK | This function gets the open price of the specific open trade or historical trade. Phase (this API's scope): onTick | deinit

getOpenPrice(trade: object): number
Parameters
trade (object) -- the specific open trade or historical trade
Returns
number: the open price.

getOpenTime

EA SDK | This function gets the open time(UTC time stamp) of the specific open trade or historical trade. Phase (this API's scope): onTick | deinit

getOpenTime(trade: object): number
Parameters
trade (object) -- the specific open trade or historical trade
Returns
number: the open time(UTC time stamp).

getOrderType

EA SDK | This function gets the order type(buy or sell) of the specific pending order or cancelled order or rejected order or open trade or historical trade. Phase (this API's scope): onTick | deinit

getOrderType(orderOrTrade: object): number
Parameters
orderOrTrade (object) -- the specific pending order or cancelled order or rejected order or open trade or historical trade
Returns
number: the order type(ORDER_TYPE.OP_BUY or ORDER_TYPE.OP_SELL or ORDER_TYPE.OP_BUYLIMIT or ORDER_TYPE.OP_SELLLIMIT or ORDER_TYPE.OP_BUYSTOP or ORDER_TYPE.OP_SELLSTOP).

getOpenLots

EA SDK | This function gets the volume lots(or the bet per pip when it comes to Spread Betting) of the specific open trade or historical trade. Phase (this API's scope): onTick | deinit

getOpenLots(trade: object): number
Parameters
trade (object) -- the specific open trade or historical trade
Returns
number: the volume lots(or the bet per pip when it comes to Spread Betting).

getTakeProfit

EA SDK | This function gets the take profit of the specific pending order or cancelled order or rejected order or open trade or historical trade. Phase (this API's scope): onTick | deinit

getTakeProfit(orderOrTrade: object): number
Parameters
orderOrTrade (object) -- the specific pending order or cancelled order or rejected order or open trade or historical trade
Returns
number: the take profit.

getStopLoss

EA SDK | This function gets the stop loss of the specific pending order or cancelled order or rejected order or open trade or historical trade. Phase (this API's scope): onTick | deinit

getStopLoss(orderOrTrade: object): number
Parameters
orderOrTrade (object) -- the specific pending order or cancelled order or rejected order or open trade or historical trade
Returns
number: the stop loss.

getUnrealizedPL

EA SDK | This function gets the unrealized profit or loss of the specific open trade. Phase (this API's scope): onTick | deinit

getUnrealizedPL(openTrade: object): number
Parameters
openTrade (object) -- the specific open trade
Returns
number: the unrealized profit or loss.

getSwapPoint

EA SDK | This function gets the swap point of the specific open trade or historical trade. Phase (this API's scope): onTick | deinit

getSwapPoint(trade: object): number
Parameters
trade (object) -- the specific open trade or historical trade
Returns
number: the swap point.

getCommission

EA SDK | This function gets the commission of the specific open trade or historical trade. Phase (this API's scope): onTick | deinit

getCommission(trade: object): number
Parameters
trade (object) -- the specific open trade or historical trade
Returns
number: the commission.

getPL

EA SDK | This function gets the PL(profit or loss) of the specific historical trade. Phase (this API's scope): onTick | deinit

getPL(trade: object): number
Parameters
trade (object) -- the specific historical trade
Returns
number: the PL(profit or loss).

getMagicNumber

EA SDK | This function gets the magic number of the specific pending order or cancelled order or rejected order or open trade or historical trade. Phase (this API's scope): onTick | deinit

getMagicNumber(orderOrTrade: object): number
Parameters
orderOrTrade (object) -- the specific pending order or cancelled order or rejected order or open trade or historical trade
Returns
number: the magic number.

getComment

EA SDK | This function gets the comment of the specific pending order or cancelled order or rejected order or open trade or historical trade. Phase (this API's scope): onTick | deinit

getComment(orderOrTrade: object): number
Parameters
orderOrTrade (object) -- the specific pending order or cancelled order or rejected order or open trade or historical trade
Returns
number: the comment.

getQuotes

EA SDK | This function declares the quotes of which symbol to get. Phase (this API's scope): init

getQuotes(context: object, brokerName: string, accountId: string, symbolName: string)
Parameters
context (object) -- the name should be the same as the name of the parameter of the initFunction
brokerName (string) -- the broker name
accountId (string) -- the account ID
symbolName (string) -- the symbol name

getBid

EA SDK | This function gets the bid of the specific symbol. Phase (this API's scope): onTick

getBid(context: object, brokerName: string, accountId: string, symbolName: string): number
Parameters
context (object) -- the name should be the same as the name of the parameter of the onTickFunction
brokerName (string) -- the broker name
accountId (string) -- the account ID
symbolName (string) -- the symbol name
Returns
number: -- the bid.

getAsk

EA SDK | This function gets the ask of the specific symbol. Phase (this API's scope): onTick

getAsk(context: object, brokerName: string, accountId: string, symbolName: string): number
Parameters
context (object) the name should be the same as the name of the parameter of the onTickFunction
brokerName (string) -- the broker name
accountId (string) -- the account ID
symbolName (string) -- the symbol name
Returns
number: the ask.

getCurrentTick

EA SDK | This function gets the current tick data that triggered the onTick event. Phase (this API's scope): onTick

getCurrentTick(context: object): object
Parameters
context (object) the name should be the same as the name of the parameter of the onTickFunction
Returns
object: the current tick data.

sendOrder

EA SDK | This function sends an order to the market. Phase (this API's scope): onTick | deinit

sendOrder(brokerName: string, accountId: string, symbolName: string, orderType: number, price: number, slippage: number, volume: number, takeProfit: number, stopLoss: number, comment: string, magicNumber: number, expiration: number)
Parameters
brokerName (string) -- the broker name
accountId (string) -- the account ID
symbolName (string) -- the symbol name
orderType (number) -- the order type(ORDER_TYPE.OP_BUY or OP_SELL or OP_BUYLIMIT or OP_SELLLIMIT or OP_BUYSTOP or OP_SELLSTOP)
price (number) -- the price(if the order is a market order, the price should be set by zero or the current bid or the current ask)
slippage (number) -- the slippage
volume (number) -- the lots(or the bet per pip when it comes to Spread Betting)
takeProfit (number) -- the take profit
stopLoss (number) -- the stop loss
comment (string) -- the comment
magicNumber (number) -- the magic number
expiration (number) -- the expiration

modifyOrder

EA SDK | This function sends an order to the market to replace the specific order that the order ID refers to. Phase (this API's scope): onTick | deinit

modifyOrder(brokerName: string, accountId: string, orderId: string, symbolName: string, orderType: number, price: number, slippage: number, volume: number, takeProfit: number, stopLoss: number, comment: string, magicNumber: number, expiration: number)
Parameters
brokerName (string) -- the broker name
accountId (string) -- the account ID
orderId (string) -- the order ID
symbolName (string) -- the symbol name
orderType (number) -- the order type(ORDER_TYPE.OP_BUY or OP_SELL or OP_BUYLIMIT or OP_SELLLIMIT or OP_BUYSTOP or OP_SELLSTOP)
price (number) -- the price(if the order is a market order, the price should be set by zero or the current bid or the current ask)
slippage (number) -- the slippage
volume (number) -- the lots(or the bet per pip when it comes to Spread Betting)
takeProfit (number) -- the take profit
stopLoss (number) -- the stop loss
comment (string) -- the comment
magicNumber (number) -- the magic number
expiration (number) -- the expiration

cancelOrder

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

cancelOrder(brokerName: string, accountId: string, orderId: string)
Parameters
brokerName (string) -- the broker name
accountId (string) -- the account ID
orderId (string) -- the order ID

modifyTpSlOfTrade

EA SDK | This function modifies the take profit or stop loss of the specific open trade. Phase (this API's scope): onTick | deinit

modifyTpSlOfTrade(brokerName: string, accountId: string, tradeId: string, takeProfit: number, stopLoss: number)
Parameters
brokerName (string) -- the broker name
accountId (string) -- the account ID
tradeId (string) -- the trade ID
takeProfit (number) -- the take profit
stopLoss (number) -- the stop loss

closeTrade

EA SDK | This function closes the specific open trade by sending a market order. Phase (this API's scope): onTick | deinit

closeTrade(brokerName: string, accountId: string, tradeId: string, price: number, slippage: number)
Parameters
brokerName (string) -- the broker name
accountId (string) -- the account ID
tradeId (string) -- the trade ID
price (number) -- the price(the price should be set by zero or the current bid or the current ask)
slippage (number) -- the slippage

getEAParameter

EA SDK | This function gets parameter's value of EA. Phase (this API's scope): init | onTick | deinit

getEAParameter(context: object, paramName: string): (number | string)
Parameters
context (object) -- the name should be the same as the name of the parameter of the onTickFunction
paramName (string) -- the name of the parameter
Returns
(number | string): the value of the parameter.

getChartHandle

EA SDK | This function gets the handle of the specific chart. Phase (this API's scope): init

getChartHandle(context: object, brokerName: string, accountId: string, symbolName: string, timeFrame: string): number
Parameters
context (object) -- the name should be the same as the name of the parameter of the initFunction
brokerName (string) -- the broker name
accountId (string) -- the account ID
symbolName (string) -- the symbol name
timeFrame (string) -- the time frame
Returns
number: the handle.

getIndicatorHandle

EA SDK | This function gets the handle of the specific indicator. Phase (this API's scope): init

getIndicatorHandle(context: object, brokerName: string, accountId: string, symbolName: string, timeFrame: string, indiName: string, params: array): number
Parameters
context (object) the name should be the same as the name of the parameter of the initFunction
brokerName (string) -- the broker name
accountId (string) -- the account ID
symbolName (string) -- the symbol name
timeFrame (string) -- the time frame
indiName (string) -- the name of indicator
params (array) -- the parameters of indicator e.g. [{ name: "factor", value: 1 }]
Returns
number: the handle.

getData

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

getData(context: object, handle: number, name: string): array
Parameters
context (object) -- the name should be the same as the name of the parameter of the onTickFunction
handle (number) -- the return value of the getChartHandle or the getIndicatorHandle
name (string) -- the name of the specific data
Returns
array: the data.

getAccountsListLength

EA SDK | This function gets the length of the list of the accounts that have been signed in. Phase (this API's scope): init | onTick | deinit

getAccountsListLength(context: object): number
Parameters
context (object) -- the name should be the same as the name of the parameter of the initFunction or the deinitFunction or the onTickFunction
Returns
number: the length of the accounts list.

getAccount

EA SDK | This function gets the account. Phase (this API's scope): init | onTick | deinit

getAccount(context: object, selector: number): object
Parameters
context (object) -- the name should be the same as the name of the parameter of the initFunction or the deinitFunction or the onTickFunction
selector (number) -- the index of the account
Returns
object: account.

getBrokerNameOfAccount

EA SDK | This function gets the broker name of the specific account. Phase (this API's scope): init | onTick | deinit

getBrokerNameOfAccount(account: object): string
Parameters
account (object) -- the specific account
Returns
string: the broker name.

getAccountIdOfAccount

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

getAccountIdOfAccount(account: object): string
Parameters
account (object) -- the specific account
Returns
string: the account ID.

getCurrencyOfAccount

EA SDK | This function gets the currency name of the specific account. Phase (this API's scope): init | onTick | deinit

getCurrencyOfAccount(account: object): string
Parameters
account (object) -- the specific account
Returns
string: the currency name.

getToFixedOfAccount

EA SDK | This function gets the number to fixed-point of the specific account. Phase (this API's scope): init | onTick | deinit

getToFixedOfAccount(account: object): string
Parameters
account (object) -- the specific account
Returns
string: the number to fixed-point.

getBalanceOfAccount

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

getBalanceOfAccount(account: object): string
Parameters
account (object) -- the specific account
Returns
string: the balance.

getPLOfAccount

EA SDK | This function gets the profit and loss statement of the specific account. Phase (this API's scope): onTick | deinit

getPLOfAccount(account: object): string
Parameters
account (object) -- the specific account
Returns
string: the profit and loss statement.

getUnrealizedPLOfAccount

EA SDK | This function gets the unrealized profit and loss statement of the specific account. Phase (this API's scope): onTick | deinit

getUnrealizedPLOfAccount(account: object): string
Parameters
account (object) -- the specific account
Returns
string: the unrealized profit and loss statement.

getEquityOfAccount

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

getEquityOfAccount(account: object): string
Parameters
account (object) -- the specific account
Returns
string: the equity.

getMarginUsedOfAccount

EA SDK | This function gets the margin used of the specific account. Phase (this API's scope): onTick | deinit

getMarginUsedOfAccount(account: object): string
Parameters
account (object) -- the specific account
Returns
string: the margin used.

getMarginAvailableOfAccount

EA SDK | This function gets the margin available of the specific account. Phase (this API's scope): onTick | deinit

getMarginAvailableOfAccount(account: object): string
Parameters
account (object) -- the specific account
Returns
string: the margin available.

setOptimizationResult

EA SDK | This function sets the result for the optimization. Phase (this API's scope): deinit

setOptimizationResult(context: object, result: number)
Parameters
context (object) the name should be the same as the name of parameter of deinitFunction
result (number) the result for the optimization

getLatestTransBrokerName

EA SDK | This function gets the broker name of the latest transaction that triggered the onTransaction event. Phase (this API's scope): onTick | onTransaction | deinit

getLatestTransBrokerName(context: object): string
Parameters
context (object) the name should be the same as the name of the parameter of the onTransactionFunction
Returns
string: the broker name of the latest transaction.

getLatestTransAccountId

EA SDK | This function gets the account ID of the latest transaction that triggered the onTransaction event. Phase (this API's scope): onTick | onTransaction | deinit

getLatestTransAccountId(context: object): string
Parameters
context (object) the name should be the same as the name of the parameter of the onTransactionFunction
Returns
string: the account ID of the latest transaction.

getLatestTransId

EA SDK | This function gets the ID of the latest transaction that triggered the onTransaction event. Phase (this API's scope): onTick | onTransaction | deinit

getLatestTransId(context: object): string
Parameters
context (object) the name should be the same as the name of the parameter of the onTransactionFunction
Returns
string: the ID of the latest transaction.

getLatestTransType

EA SDK | This function gets the type of the latest transaction that triggered the onTransaction event. Phase (this API's scope): onTick | onTransaction | deinit

getLatestTransType(context: object): string
Parameters
context (object) the name should be the same as the name of the parameter of the onTransactionFunction
Returns
string: the type of the latest transaction.

getLatestTrans

EA SDK | This function gets the latest transaction that triggered the onTransaction event. Phase (this API's scope): onTick | onTransaction | deinit

getLatestTrans(context: object): object
Parameters
context (object) the name should be the same as the name of the parameter of the onTransactionFunction
Returns
object: the latest transaction.