Trying to retrieve historical levels of curve GBPOIS= in Eikon API (Python)
Hi, I am trying to retrieve historical levels of the curve <GBPOIS=>, but I am struggling. The answer to my previous question allowed me to do it for 0#GBBMK= by doing the following:
df, e = ek.get_data(['0#GBBMK='], ['MATUR_DATE'])
ric_list = df['Instrument'].tolist()
df2, e2 = ek.get_data(ric_list,
['TR.MIDPRICE', 'TR.MIDPRICE.Date', 'TR.MIDYIELD', 'TR.MIDYIELD.Date'],
{'SDate': strdate, 'EDate': strdate})
If I apply the same approach to GBPOIS= it doesn't work. Note that I have tried using the correct fields listed in Data Item Browser. Could you please advise? Thanks
Best Answer
-
0
Answers
-
Hi @riccardop
I am not sure why the chain RIC does not get expanded.
Anyway, this is the workaround, you can list all the underlying RIC code manually.
And I could not find yield fields for these RIC codes.
You have to contact the Refinitiv Content Helpdesk at https://my.refinitiv.com to get help to identify what fields are carrying the (history) yield information.
0 -
Hi the Eikon helpdesk said that on Excel they would use:
=RHistory("GBP1MOIS=",".Timestamp;.Close","START:01-Jan-2020 END:12-Feb-2020 INTERVAL:1D",,"TSREPEAT:NO CH:Fd",B8)
How would that translate in Python? Thanks
0 -
Hi @riccardop
Can you share a screenshot that you got this error please?
ValueError: not enough values to unpack (expected 2, got 1)
0 -
Apologies, my mistake. I have re-run the script you provided, and it does work. I had edited my code and left df3, e = instead of df3 =.
Could I suggest to post code in a way that it can be copy-pasted, and not an image? (To reduce silly errors like mine!)
Thanks again.
0
Categories
- All Categories
- 6 AHS
- 39 Alpha
- 162 App Studio
- 4 Block Chain
- 5 Bot Platform
- 17 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
- 370 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
- 60 Workspace SDK
- 9 Element Framework
- 5 Grid
- 13 World-Check Data File
- Yield Book Analytics
- 46 中文论坛