Snapping zero-values with the Python RDP library

I'm using the latest release of the RDP python library (1.0.0a7.post7), in particular the get_snapshot() function of the StreamingPrices class. If the value I'm snapping happens to be a float equal to zero (say a yield of 0%), the function get_snapshot() returns None. This is confusing since None is also returned if no value could be found.
Is it possible to make RDP return the value 0 instead of None when the field contains the value 0?
The issue seems to be caused by line 266 in StreamingPrices.py which treats non-existing fields the same way as fields with a value of 0: if _all_fields_value[name].get(f) else None
Best Answer
-
Apologies - a misunderstanding.
I have been advised by the RD Library team that this bug has been fixed in refinitiv-dataplatform 1.0.0a8.post2 - which will be available soon on PyPi.
I will try and update once I know it is available.
0
Answers
-
Thanks for reporting this issue - I have passed it on to the RDP Python library dev team and will get back to you once I get a response / fix release details.
0 -
chased the RDP team for an update again.
0 -
RDP team have advised that a fix for this should be in the end of Q1 release - no exact date yet.
0 -
Hi @umer.nalla
Unfortunately, we do not see this issue as being fixed. Using e.g. 1.0.0a10 from Eikon code book I can reproduce the error. Trying to snap PRIMACT_1 for the ticker DKDISC= should give the floating-point number 0.0 (since this interest rate is currently 0.0%), but instead returns None.
0 -
Sorry to hear it is not working still.
I will check with the RDP Library team and get back to you.
0 -
@Sabina TanaseHi
I can confirm I was able to recreate with a10 and I have reported to the RDP Python Library team. I will get back once I hear back.
0 -
The RDP Library team investigated and responded with an apology. Unfortunately, they mixed up the changes for the existing RDP Python library and the newer RD Python Library they were working on at the time.
The fix was implemented in the RD Library - but not the RDP Library. They have added this bug to the list for a forthcoming RDP Python Library release. They should hopefully confirm an estimated release date for the fix to me tomorrow.
As an alternative to the RDP Python library - you may want to explore the newer RD Library.
For a position statement on RDP Library vs RD Library from the RDP Library owner, please see this page: Refinitiv Data Platform Libraries | Refinitiv Developers
To explore the newer RD Library please refer to this page: Refinitiv Data Library for Python | Refinitiv Developers
I have tested this bug with RD Libraries and it is working correctly e.g.
stream = rd.content.pricing.Definition(
universe = 'DKDISC=',
fields = ['PRIMACT_1']
).get_stream()
stream.open()
stream.get_snapshot()returns:
0 -
Just to confirm this issue has now been fixed in the a13 release
refinitiv-dataplatform 1.0.0a13 - PyPi
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
- 685 Datastream
- 1.4K DSS
- 615 Eikon COM
- 5.2K Eikon Data APIs
- 10 Electronic Trading
- Generic FIX
- 7 Local Bank Node API
- 3 Trading API
- 2.9K Elektron
- 1.4K EMA
- 252 ETA
- 556 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
- 275 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
- 652 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
- 104 UPA
- 193 TREP Infrastructure
- 228 TRKD
- 917 TRTH
- 5 Velocity Analytics
- 9 Wealth Management Web Services
- 90 Workspace SDK
- 11 Element Framework
- 5 Grid
- 18 World-Check Data File
- 1 Yield Book Analytics
- 46 中文论坛