Skip to main content

Interface: IDatafeedQuotesApi

Charting Library.IDatafeedQuotesApi

Quotes datafeed API

Methods​

getQuotes​

getQuotes(symbols, onDataCallback, onErrorCallback): void

This function is called when the library needs quote data. The library assumes that onDataCallback is called once when all the requested data is received.

Parameters​

NameTypeDescription
symbolsstring[]symbol names.
onDataCallbackQuotesCallbackcallback to return the requested data.
onErrorCallbackQuotesErrorCallbackcallback for responding with an error.

subscribeQuotes​

subscribeQuotes(symbols, fastSymbols, onRealtimeCallback, listenerGUID): void

Trading Platform calls this function when it wants to receive real-time quotes for a symbol. The library assumes that you will call onRealtimeCallback every time you want to update the quotes.

Parameters​

NameTypeDescription
symbolsstring[]list of symbols that should be updated rarely (once per minute). These symbols are included in the watchlist but they are not visible at the moment.
fastSymbolsstring[]list of symbols that should be updated frequently (at least once every 10 seconds)
onRealtimeCallbackQuotesCallbackcallback to send realtime quote data updates
listenerGUIDstringunique identifier of the listener

unsubscribeQuotes​

unsubscribeQuotes(listenerGUID): void

Trading Platform calls this function when it doesn't want to receive updates for this listener anymore. listenerGUID will be the same object that the Library passed to subscribeQuotes before.

Parameters​

NameTypeDescription
listenerGUIDstringunique identifier of the listener