getQuotes (SDK Trading)
getQuotes is a Fintechee API to subscribe the streaming quotes(including bids and asks) of the specific instrument(symbol). This API should be called in the init callback function. You need to input the broker name, the account ID, the symbol name as the parameters.
getQuotes(context, brokerName, accountId, symbolName)
EA SDK This function declares the quotes of which symbol to get. Phase (this API's scope): init
Kind: global function
Param | Type | Description |
---|---|---|
context | object | the name should be the same with the name of parameter of onTickFunction |
brokerName | string | broker name |
accountId | string | account ID |
symbolName | string | symbol name |
getQuotes (SDK Trading)
registerEA(
"test_api",
"An EA to test APIs",
[],
function (context) { // Init()
var account = getAccount(context, 0)
var brokerName = getBrokerNameOfAccount(account)
var accountId = getAccountIdOfAccount(account)
var symbolName = "EUR/USD"
getQuotes (context, brokerName, accountId, symbolName)
},
function (context) { // Deinit()
},
function (context) { // OnTick()
})