Discover Refinitiv
MyRefinitiv Refinitiv Perspectives Careers
Created with Sketch.
All APIs Questions & Answers  Register |  Login
Ask a question
  • Questions
  • Tags
  • Badges
  • Unanswered
Search:
  • Home /
  • Eikon Data APIs /
avatar image
Question by lef_k · Jan 28, 2020 at 04:36 PM · get_datapython eikonhistoricalfx

get_data to fetch history of fx values

Hi there,


I am trying to use get_data from the eikon library for python in order to retrieve some historical values for fx pairs.

This is my code:

rics=['AUDCAD=','AUDCHF=']
fields=['TR.AMERICACLOSEBIDPRICE.date','TR.AMERICACLOSEBIDPRICE','OPEN_PRC','CF_HIGH','CF_LOW','CF_VOLUME']
df, err = ek.get_data(rics, fields, {'SDate': '2020-01-20', 'EDate': '2020-01-24', 'FRQ': 'D'})

The problem is, while AMERICACLOSEBIDPRICE returns the history as expected, the rest of the fields (open/high/low/volume) return only the latest available price, instead of historical.

I know for a fact that historical values are available, because via Excel API formula I can retrieve them using the below...

=RHistory($C$2:$C$3,"NDA_RAW.Nda_date;"&"NDA_RAW.Nda_open;"&"NDA_RAW.Nda_bid_close_america;"&"NDA_RAW.Nda_high;"&"NDA_RAW.Nda_low;"&"NDA_RAW.Nda_volume","START:20-Jan-2020:01:00 INTERVAL:1D",,"CH:In;Fd")


I am struggling finding the fields that would return as the same values as Excel does.

Could you help pls?

Thanks!

results.png (8.6 KiB)

People who like this

0 Show 0
Comment
10 |1500 characters needed characters left characters exceeded
▼
  • Viewable by all users
  • Viewable by moderators
  • Viewable by moderators and the original poster
  • Advanced visibility
Viewable by all users

Up to 2 attachments (including images) can be used with a maximum of 512.0 KiB each and 1.0 MiB total.

1 Reply

  • Sort: 
avatar image
REFINITIV
Best Answer
Answer by nick.zincone.1 · Jan 28, 2020 at 05:07 PM

Hi @lef_k,

If you pull up the DIB (Data Item Browser) within Eikon, and choose just to look at historical fields, you will see the list of available historical fields, i.e.

Not all are available but if you try using the get_timeseries() call, this should provide the fields (open/high/low/volume), i..e



1580230713890.png (172.0 KiB)
ahs.png (16.5 KiB)
Comment
lef_k

People who like this

1 Show 0 · Share
10 |1500 characters needed characters left characters exceeded
▼
  • Viewable by all users
  • Viewable by moderators
  • Viewable by moderators and the original poster
  • Advanced visibility
Viewable by all users

Up to 2 attachments (including images) can be used with a maximum of 512.0 KiB each and 1.0 MiB total.

Watch this question

Add to watch list
Add to your watch list to receive emailed updates for this question. Too many emails? Change your settings >
11 People are following this question.

Related Questions

Trying to retrieve historical levels of curve GBPOIS= in Eikon API (Python)

EIkon 1.1.6. post2 get_data returns -1 while excel returns correct value

Get EPS historical data for stocks

Retrieve historical benchmark curve data

While retrieving TR.Volume using get_data fill blanks with Na instead of 0

  • Feedback
  • Copyright
  • Cookie Policy
  • Privacy Statement
  • Terms of Use
  • Careers
  • Anonymous
  • Sign in
  • Create
  • Ask a question
  • Spaces
  • Alpha
  • App Studio
  • Block Chain
  • Bot Platform
  • Calais
  • Connected Risk APIs
  • DSS
  • Data Fusion
  • Data Model Discovery
  • Datastream
  • Eikon COM
  • Eikon Data APIs
  • Elektron
    • EMA
    • ETA
    • WebSocket API
  • Legal One
  • Messenger Bot
  • Messenger Side by Side
  • ONESOURCE
    • Indirect Tax
  • Open PermID
    • Entity Search
  • Org ID
  • PAM
    • PAM - Logging
  • ProView
  • ProView Internal
  • Product Insight
  • Project Tracking
  • Refinitiv Data Platform
    • Refinitiv Data Platform Libraries
  • Rose's Space
  • Screening
    • Qual-ID API
    • Screening Deployed
    • Screening Online
    • World-Check One
    • World-Check One Zero Footprint
  • Side by Side Integration API
  • TR Knowledge Graph
  • TREP APIs
    • CAT
    • DACS Station
    • Open DACS
    • RFA
    • UPA
  • TREP Infrastructure
  • TRIT
  • TRKD
  • TRTH
  • Thomson One Smart
  • Transactions
    • REDI API
  • Velocity Analytics
  • Wealth Management Web Services
  • World-Check Data File
  • Explore
  • Tags
  • Questions
  • Badges