Upgrade from Eikon -> Workspace. Learn about programming differences.

For a deeper look into our Eikon Data API, look into:

Overview |  Quickstart |  Documentation |  Downloads |  Tutorials |  Articles

question

Upvotes
Accepted
3 0 2 5

Daily Exchange rate through EIKON Python API

I am trying to fetch the daily Exchange rate from EIKON API solution. Please see the below code.

start_date          = '2019-01-01'
end_date            = '2019-03-01' 
field               = ['BID','ASK']
ric                 = ['ZAR=','GBPZAR=']
params              = parameters={'SDate': start_date, 'EDate': end_date,'Frq': 'D'}
 
data,err            = ek.get_data(ric,field,params)

The Output is only showing results of the current date.

Can someone help?

  Instrument      BID      ASK
0       ZAR=  14.4942  14.4992
1    GBPZAR=  19.8543  19.8783


eikoneikon-data-apirefinitiv-dataplatform-eikonworkspaceworkspace-data-api
icon clock
10 |1500

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

Upvote
Accepted
5.7k 21 2 6

Hi @alankar.gupta ,


By using the CodeCreator or Data Item Browser app, you may look for all fields you're looking for, e.g.:


TR.BIDPRICE.date
icon clock
10 |1500

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

Upvote
5.7k 21 2 6

Hi @alankar.gupta ,


Have you tried the CODECREATOR app on Eikon/Workspace?

Using it, I was able to look for different Bid and Ask fields to test, and I found some that seem to work as expected:


start_date ='2019-01-01'
end_date = '2019-03-01'
field = ['TR.BIDPRICE','TR.ASKPRICE']
ric = ['ZAR=','GBPZAR=']
params = {'SDate': start_date, 'EDate': end_date, 'Frq': 'D'}


df2, err = ek.get_data(instruments=ric,
                       fields=field,
                       parameters=params)
df2


Do let me know if this works as you wish.

icon clock
10 |1500

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

Upvotes
3 0 2 5

Hi @jonathan.legrand How do I print the date beside the records?

icon clock
10 |1500

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

Write an Answer

Hint: Notify or tag a user in this post by typing @username.

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