For a deeper look into our Elektron API, look into:

Overview |  Quickstart |  Documentation |  Downloads |  Tutorials |  Articles

question

Upvotes
Accepted
3 0 1 0

Request real-time data but delayed nearly 2 seconds

I am requesting real-time quotes using Websocket, but sometimes the quotes I received have 2 to 3 seconds delay. I am sending almost 7,000 symbols using batch request with different ID. Something wrong with my connection (or network) or something wrong with server?

treprdp-apiwebsocketsrrtoquotedelayed-feed
icon clock
10 |1500

Up to 2 attachments (including images) can be used with a maximum of 5.0 MiB each and 10.0 MiB total.

Upvotes
Accepted
39.2k 75 11 27

@afra

I see a couple of possible reasons why the value in SALTIM_MS field may be 2-3 seconds behind the time you receive the data:

  • Clock synchronization. I assume you use your machine clock to timestamp the event of receiving data. It's possible that this clock may not be perfectly synchronized.
  • SALTIM_MS field contains the timestamp of the last trade on the instrument. If you're requesting a snapshot of market data and the instrument did not have any trades in the last 2-3 seconds, then the value of SALTIM_MS field you retrieve will be 2-3 seconds behind the current time, as this is when the last trade for the instrument occurred.
  • If you're requesting a snapshot of market data for 7K RICs from the platform or if you're requesting initial images of real-time records when initializing the subscriptions for streaming data (as opposed to getting the update events from active streaming subscriptions), then in my experience the round trip may take several seconds to process the full request of 7K RICs and return the snapshot or the initial images. In this scenario the value of SALTIM_MS field being 2-3 seconds behind the current time is not out of line.

A more detailed description of what you do (ideally including a code snippet) would be very helpful to determine if the symptoms you experience are due to any of the reasons I mentioned above or something else.

icon clock
10 |1500

Up to 2 attachments (including images) can be used with a maximum of 5.0 MiB each and 10.0 MiB total.

Upvotes
1 0 1 0

I am also having data with the eikon python api. I have a list of currencies I pull benchmark yields for and the function is freezing randomly throughout the list of 100 currencies. Different points each time. currency 5, 10, 99, etc. No error message or timeout response. Just running code with no response.

icon clock
10 |1500

Up to 2 attachments (including images) can be used with a maximum of 5.0 MiB each and 10.0 MiB total.

Upvotes
3 0 1 0

By the way, I am using SALTIM_MS field to determine the trade time and the data I want to get is last trade information not bid/ask information.

icon clock
10 |1500

Up to 2 attachments (including images) can be used with a maximum of 5.0 MiB each and 10.0 MiB total.

Upvotes
39.2k 75 11 27

@afra

Would you mind clarifying whether you use the Websocket API (which you mentioned in your post) or Eikon Data APIs (which are the APIs this forum is dedicated to)?

It would be very helpful to include a snippet of the code you use.

I'm also not clear on how you measure the latency. Do you compare the values returned for SALTIM_MS field to the time when you submit the request? Finally, I'm confused why you mentioned that you "want to get is last trade information not bid/ask information". What's the significance of this?

icon clock
10 |1500

Up to 2 attachments (including images) can be used with a maximum of 5.0 MiB each and 10.0 MiB total.

Yes I am using Websocket API. And yes I compare the time when I receive the price with SALTIM_MS. I mention that because I want you to know I am not requesting quote time. I am requesting the last trade time.

Upvotes
11.5k 16 7 10

Hello @afra

Are your WebSocket application connecting to your deployed ADS server or ERT in Cloud server?

If the application connects to the deployed ADS server, you can use the rmdstestclient tool which is a general purpose Elektron consumer application to verify data from ADS server by the following conditions:

  • connect rmdstestclient to the same ADS server as application
  • subscribe the same set of items and server

Please see how to use rmdstestclient to connect to the WebSocket connection from this article.

icon clock
10 |1500

Up to 2 attachments (including images) can be used with a maximum of 5.0 MiB each and 10.0 MiB total.

Click below to post an Idea Post Idea