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.
Best Answer
-
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'}]
0
Answers
-
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.
0 -
Thanks Umer, we will work with RDP streaming Cache functionality
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).
0 -
Not sure Are you using the RDP library for .NET? We have a tutorial and a quick start at the following link.
https://developers.refinitiv.com/en/api-catalog/refinitiv-data-platform/refinitiv-data-platform-libraries/tutorials
There are sample codes for .NET provided on
https://github.com/Refinitiv-API-Samples/Example.RDPLibrary.DotNet0 -
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.
0
Categories
- All Categories
- 3 Polls
- 6 AHS
- 36 Alpha
- 166 App Studio
- 6 Block Chain
- 4 Bot Platform
- 18 Connected Risk APIs
- 47 Data Fusion
- 34 Data Model Discovery
- 688 Datastream
- 1.4K DSS
- 625 Eikon COM
- 5.2K Eikon Data APIs
- 11 Electronic Trading
- 1 Generic FIX
- 7 Local Bank Node API
- 3 Trading API
- 2.9K Elektron
- 1.4K EMA
- 255 ETA
- 557 WebSocket API
- 38 FX Venues
- 14 FX Market Data
- 1 FX Post Trade
- 1 FX Trading - Matching
- 12 FX Trading – RFQ Maker
- 5 Intelligent Tagging
- 2 Legal One
- 23 Messenger Bot
- 3 Messenger Side by Side
- 9 ONESOURCE
- 7 Indirect Tax
- 60 Open Calais
- 276 Open PermID
- 44 Entity Search
- 2 Org ID
- 1 PAM
- PAM - Logging
- 6 Product Insight
- Project Tracking
- ProView
- ProView Internal
- 22 RDMS
- 1.9K Refinitiv Data Platform
- 695 Refinitiv Data Platform Libraries
- 4 LSEG Due Diligence
- LSEG Due Diligence Portal API
- 4 Refinitiv Due Dilligence Centre
- Rose's Space
- 1.2K Screening
- 18 Qual-ID API
- 13 Screening Deployed
- 23 Screening Online
- 12 World-Check Customer Risk Screener
- 1K World-Check One
- 46 World-Check One Zero Footprint
- 45 Side by Side Integration API
- 2 Test Space
- 3 Thomson One Smart
- 10 TR Knowledge Graph
- 151 Transactions
- 143 REDI API
- 1.8K TREP APIs
- 4 CAT
- 27 DACS Station
- 121 Open DACS
- 1.1K RFA
- 105 UPA
- 194 TREP Infrastructure
- 229 TRKD
- 918 TRTH
- 5 Velocity Analytics
- 9 Wealth Management Web Services
- 92 Workspace SDK
- 11 Element Framework
- 5 Grid
- 18 World-Check Data File
- 1 Yield Book Analytics
- 48 中文论坛