RDP asyncio.gather / HistoricalPricing.get_summaries_async / Dynamic tasks
Best Answer
-
Hi @kazuhisa
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.
0
Answers
-
Thank you very much for sharing the good news!
0 -
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
0 -
Hi @Zuka1 ,
Is the code running in Codebook? if so, can you try to update the app-key from DEFAULT_WORKSPACE_APP_KEY to DEFAULT_CODE_BOOK_APP_KEY
0 -
Hello..
I am not using codebook, purely using it as RDP... what is the required change?
0 -
Hi @Zuka1 ,
Then please try to use the app key. To generate it, you can follow this quick start guide
hope this could help
0 -
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?
0 -
Hi @Zuka1
Please see the screenshot above from my colleague - this shows the link on the quick start page which can be used to generate an AppKey.
0 -
Hello..
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?
0 -
Can you please post your actual code segment and your error? I noticed you are referring to get_summaries_async and @umer.nalla did not. Yet, you didn’t comment on his example so I really don’t know what we’re working with here.
if you are work8ng with Umer’s example, can you please simplify it for a single request and post your error? And if you are using a config file, include that - no need to display your credentials.
0 -
It seems get_data access to TREP instead of RDP?
refinitiv-data.config.json:
"sessions": {
"default": "platform.default",
"platform": {
"default": {
"app-key": "xxxx",
"username": "xxxx",
"password": "xxxx",
"auto-reconnect": true,
historical access seems good.
0 -
Hi @Zuka1
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)0 -
I got data via your sample but not worked other sample of the rd.get_data() function.
0 -
Hi @Zuka1
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.
0 -
Hi @Zuka1
As explained above, the rd.get_data() call is connecting to RTO, and the alternative code snippet I provided is NOT connecting to RTO - it is using the snapshot API on RDP - two different services.0 -
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....
0
Categories
- All Categories
- 6 AHS
- 39 Alpha
- 161 App Studio
- 4 Block Chain
- 4 Bot Platform
- 16 Connected Risk APIs
- 47 Data Fusion
- 30 Data Model Discovery
- 608 Datastream
- 1.3K DSS
- 577 Eikon COM
- 4.9K Eikon Data APIs
- 7 Electronic Trading
- Generic FIX
- 7 Local Bank Node API
- Trading API
- 2.7K Elektron
- 1.3K EMA
- 236 ETA
- 519 WebSocket API
- 33 FX Venues
- 10 FX Market Data
- 1 FX Post Trade
- 1 FX Trading - Matching
- 12 FX Trading – RFQ Maker
- 5 Intelligent Tagging
- 2 Legal One
- 20 Messenger Bot
- 2 Messenger Side by Side
- 9 ONESOURCE
- 7 Indirect Tax
- 59 Open Calais
- 264 Open PermID
- 39 Entity Search
- 2 Org ID
- PAM
- PAM - Logging
- 8.4K Private Comments
- 6 Product Insight
- Project Tracking
- ProView
- ProView Internal
- 20 RDMS
- 1.4K Refinitiv Data Platform
- 367 Refinitiv Data Platform Libraries
- 3 Refinitiv Due Diligence
- LSEG Due Diligence Portal API
- 3 Refinitiv Due Dilligence Centre
- Rose's Space
- 1.1K Screening
- 18 Qual-ID API
- 13 Screening Deployed
- 23 Screening Online
- 10 World-Check Customer Risk Screener
- 990 World-Check One
- 44 World-Check One Zero Footprint
- 45 Side by Side Integration API
- Test Space
- 3 Thomson One Smart
- 1.2K TR Internal
- Global Hackathon 2015
- 2 Specialists Who Code
- 10 TR Knowledge Graph
- 150 Transactions
- 142 REDI API
- 1.7K TREP APIs
- 4 CAT
- 21 DACS Station
- 117 Open DACS
- 1.1K RFA
- 103 UPA
- 172 TREP Infrastructure
- 224 TRKD
- 886 TRTH
- 5 Velocity Analytics
- 5 Wealth Management Web Services
- 59 Workspace SDK
- 9 Element Framework
- 5 Grid
- 13 World-Check Data File
- Yield Book Analytics
- 46 中文论坛