Unable to get some fields in Refintiv Data Library (refinitiv.data) - Python
I know there is a migration plan from Refinitiv Eikon to Refinitiv Workspace.
1) May I know will Eikon API proxy will be demised for this migration plan?
2) As I am trying to enhance the coding by using Refinitiv Data Plaform Library instead of Eikon. Can you please advise on how to get below fields when using Workspace API? It seem the fields are only works for data extraction when using Eikon API. Thanks!
Eikon API:
split_rq3 = ek.get_data(
instruments = ['CODE.BO'],
fields = [
'OFF_CLOSE',
'HST_CLOSE',
'OFF_CLS_DT',
'CF_DATE',
'CF_LAST',
'CURRENCY',
],
parameters = {
'CH' : 'Fd',
'SDate' : '2019-09-26',
'EDate' : '2019-09-26'
}
)
Workspace API:
split_rq3 = rd.get_data(
universe = ['CODE.BO'],
fields = [
XXXXXXXX
],
parameters = {
'CH' : 'Fd',
'SDate' :'2019-09-26',
'EDate' : '2019-09-26'
}
)
Best Answer
-
@rita.leung Hi - thanks for your questions - the following works for me:
1) In terms of the migration - the proxy will remain in Workspace - only the much older Eikon COM APIs are not available with Workspace.
The Refinitiv Data (RD) Library also contains the Eikon Data API library as an extension for backwards compatibility - though we recommend using the RD library as it has a number of benefits and new features.
2) The following code works for me:
import refinitiv.data as rd
rd.open_session('YOUR APP KEY HERE')split_rq3 = rd.get_data(universe = ['CODE.BO'],fields =['OFF_CLOSE','HST_CLOSE','OFF_CLS_DT','CF_DATE','CF_LAST','CURRENCY'],parameters = {'CH' : 'Fd','SDate' :'2019-09-26','EDate' : '2019-09-26'})
split_rq3I hope this can help.
0
Answers
-
Hi @jason.ramchandani01, thanks for your reply.
I have tried the same code (with login Refinitiv Workspace), but it seems not works for me.
Once I changed the fields to TR.XXX, it can extract the values. Do you know the root cause and how to solve it?
0 -
Hi @rita.leung,
The code works in the Workspace as well - maybe you don't have permission to view the real time data for this exchange.
0 -
Also please note that these are real-time fields, which do not offer history feature. The parameters Sdate and Edate do not apply to them. See the Data Item Browser for fields which support time series.
0 -
@rita.leung you would use the get_data to get the latest snapshot data for those fields and instruments - if you wanted to get a history you can just check the full historical pricing data model for an instrument - this will tell you what historical realtime fields are captured (they do vary by instrument class). This is very simple to do with the RD Library:
rd.get_history("CODE.BO")
Once you have seen all fields, you can narrow down the selection to which fields you want very easily and for what interval and periods:
rd.get_history(universe="CODE.BO", fields=['OFF_CLOSE','LST_TRD_PR'], interval="1D", start="2022-01-01", end="2022-10-01")
You will not get all the reference or fundamental fields - eg TR.PriceMoPriceCurrency or TR.CommonName, TR.RevenueMean - from the get_history call as it uses the historical pricing data model only. If you need any such non-realtime fields just make a get_data request either snapshot or with history. For realtime fields such as CF_NAME or CURRENCY just make a get_data snapshot call.
I hope this can help.
0 -
jason.ramchandani01 & Gurpreet. Thank you for all your assistance.
For the get_history call, is it available to do the extraction with latest trading day only? It seem the function is required starting from yesterday and end with today.
0 -
@rita.leung No for the last value ie for today you can use a get_data - which can give you latest values. I hope this can help.
0 -
For the extraction of these fields ('OFF_CLOSE','HST_CLOSE','OFF_CLS_DT','CF_DATE','CF_LAST','CURRENCY'), I have used my Delayed account to extract the values by using Eikon API proxy (ek.get_data), which works for the extraction.
However, it can not extraction the result by using Workspace API (rd.get_data). Is it a limitation with Workspace API for this permissions/entitlements?
0 -
jason.ramchandani01 & Gurpreet. Any comment on above question? Thanks a lot!
0 -
0
-
Hello, May I know why the result of currency showing in digit? e.g. CURRENCY=344 for HKD instead of showing HKD? In "DIB" currency field is showing as "HKD"
0
Categories
- All Categories
- 6 AHS
- 37 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 中文论坛