Skip to main content

IDatafeedQuotesApi

Interface

Quotes datafeed API

Methods

getQuotes

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.

Signature

getQuotes(symbols: string[], onDataCallback: QuotesCallback, onErrorCallback: QuotesErrorCallback) => void

Parameters

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

Returns

void


subscribeQuotes

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.

Signature

subscribeQuotes(symbols: string[], fastSymbols: string[], onRealtimeCallback: QuotesCallback, listenerGUID: string) => void

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

Returns

void


unsubscribeQuotes

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.

Signature

unsubscribeQuotes(listenerGUID: string) => void

Parameters

NameTypeDescription
listenerGUIDstringunique identifier of the listener

Returns

void