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
Name | Type | Description |
---|---|---|
symbols | string[] | symbol names. |
onDataCallback | QuotesCallback | callback to return the requested data. |
onErrorCallback | QuotesErrorCallback | callback 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
Name | Type | Description |
---|---|---|
symbols | string[] | 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. |
fastSymbols | string[] | list of symbols that should be updated frequently (at least once every 10 seconds) |
onRealtimeCallback | QuotesCallback | callback to send realtime quote data updates |
listenerGUID | string | unique 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
Name | Type | Description |
---|---|---|
listenerGUID | string | unique identifier of the listener |
Returns
void