question

Upvotes
Accepted
1 0 0 0

Streaming Previous Values when fail to consume streaming prices

Because of heavy load on application, we have observed that if we fail to read Streaming data on time, application receive many previous values callbacks as part of Sync.


Can We have one flag segregating that values are real Update type or part of "Sync". So from application we can ignore all flag = 'Sync' and we can work on real update values.

rdp-apirefinitiv-data-platformrefinitiv-data-platform-librariesstreaming-prices
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
20.3k 73 10 20

Hi @mehul.gautambhai

For the benefit of anyone interested in the StreamingPrice Cache feature in RDP Python Lib, the following snippets are examples (using library v1.0.0a6)

Assuming you have already created a session, the following created and opens the stream:

streaming_prices = rdp.StreamingPrices(universe=['VOD.L'], fields=['BID','ASK','ACVOL_1', 'OFFCL_CODE'])
streaming_prices.open()

and then whenever you want to query the cache you can call:

streaming_prices.get_snapshot()

to get the latest values for all the fields in the cache e.g.

Or you could do something like this to get a single field:

streaming_prices['VOD.L']['BID']

or to get the values in a dataframe:

df.to_dict('records')

to give you something like:

[{'Instrument': 'VOD.L',  'BID': 108.82,  'ASK': 108.86,  'ACVOL_1': 39056252,  'OFFCL_CODE': 'BH4HKS3'}]



1603378405369.png (3.7 KiB)
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
20.3k 73 10 20

Hi @mehul.gautambhai

Can you please expand on what you mean by part of Sync and real update?

Can you provide a code snippet or refer to an existing RDP example that demonstrates the issue you are facing?

And is this with RDP Python Lib or the RDP .NET Lib?

Just to bear in mind, that since you are using a streaming API, it is expected that you would have to process all the streaming 'ticks' that you receive from the server. All the updates are real updates, just that they are probably being queued up because your application is not processing them in a timely manner.

If you do not wish to handle all ticks, then you should consider using the Snapshot mode which does not deliver streaming tick updates. OR the RDP Lib Streaming Cache functionality - where the Library continues to receive updates in the background and updates a local cache. You can then access the cache to obtain the most recent values.


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 0 0

Thanks Umer, we will work with RDP streaming Cache functionality

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 0 0

Hi Umer

It will be very helpful if you can share piece of code, or confluence page providing details about above (RDP Lib Streaming Cache).

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
7.6k 15 6 9
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
20.3k 73 10 20

Hi @mehul.gautambhai

If you want Python examples, please let me know - due to the beta nature of the Library, not all of the python examples are yet in the public domain.


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