It seems rdp.HistoricalPricing.get_summaries_async function supports single universe. I am looking for dynamically requesting multiple universes using it. Can I find sample code in Python?
The current RDP Python library does not support multiple RICs only a single one - for the above functionality.
The newer RD Python library will support multiple RICs for the equivalent of the above function e.g.
tasks = asyncio.gather( historical_pricing.events.Definition(['VOD.L','BT.L']).get_data_async(), historical_pricing.summaries.Definition('AAPL.O').get_data_async(), historical_pricing.summaries.Definition('MSFT.O').get_data_async() ) asyncio.get_event_loop().run_until_complete(tasks) voda_bt, apple, microsoft = tasks.result() print("\nVodafone + BT") display(voda_bt.data.df)
Examples and tutorials etc for the new RD Python Library should be available on GitHub and Dev Portal in the coming weeks.
Thank you very much for sharing the good news!
quick question to enable refinitiv-data, do I need to adjust app-key for this? got the following message.
ValueError: Change default 'app-key' value in config. App key value: DEFAULT_WORKSPACE_APP_KEY
I am not using codebook, purely using it as RDP... what is the required change?
I am using MachineID, I thought App-key & user name is the same for machineID users. please let me know to create app key for machine ID?
I think I need to modify config (refinitiv-data.config.json) file..
I changed default session to platform.default, put username/password on it. it seems it went to RDP for historical. what is the correct use-case to switch TREP and RDP?
It seems get_data access to TREP instead of RDP?
historical access seems good.
The rd.get_data() is connecting to the RDP Streaming Service- Refinitiv Real-Time Optimized - which includes a Websocket interface.
Do you actually receive any data back for the get_data() call? If not, do you see any error - it could be your RDP credentials are not licenced for streaming data?
If you want to try and snap non-streaming data from the RDP platform instead then you can try the following:
response = rd.content.pricing.Definition( ['EUR=', 'GBP=', 'JPY=', 'CAD='], fields=['BID', 'ASK'] ).get_data() if (response.is_success): display(response.data.df) else: print(response.http_status)
If you note the last few lines of the error 'missing scopes' - this would indicate your RDP credentials are not licenced for the VOD.L RIC - you could try /VOD.L - i.e. delayed RIC - which you may be entitled to.
Also, one thing I forgot to mention earlier - when posting on the Q&A Forum - it is recommended that you create a new post when the subject changes somewhat from the original reason for the post.
Your original query was about asyncio - and then the query changed to issues with the get_data function.
This will help other users of the forum look for answers to similar queries.
FYI - we have pushed the first beta release of tutorials and examples for RD Python Library to GitHub - Refinitiv-API-Samples/Example.DataLibrary.Python: Example projects and Tutorials demonstrating access to the Refinitiv Data Platform using the Refinitiv Data Library for Python (github.com)
They have been tested with refinitiv-data · PyPI v1.0.0b6
NOTE: The links on the README pages for the Dev Portal tutorials/Quick Start etc won't work as we have not published those yet - hopefully be there next week or in the New Year....