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

Overview |  Quickstart |  Documentation |  Downloads |  Tutorials |  Articles

question

Upvotes
Accepted
18 0 1 0

Currencies via Python API

I am looking to get historical currencies data (London or Europe close) the Python API, but US CLOSE seems to be the only one that is available. Any ideas about how to pull EU/London close quotations?

import eikon as ek
import datetime as dt
import pandas as pd


ek.set_app_key(API_KEY)


start_date = dt.datetime.now()
end_date = dt.datetime.now() - dt.timedelta(days=100)


currencies_list = []   # CURRENCY CODES GO HERE
df = ek.get_timeseries(
    currencies_list,
    'CLOSE',
    start_date=start_date.strftime('%Y-%m-%d'),
    end_date=end_date.strftime('%Y-%m-%d'),
)
eikoneikon-data-apiworkspaceworkspace-data-apirefinitiv-dataplatform-eikonpythonforex
icon clock
10 |1500

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

Upvotes
Accepted
6.7k 8 6 7

Hi @jhall yes we provide closes for Asia, Europe and US Sessions. You can see all the fields that are available using the Data Item Browser App (type DIB into eikon search bar) and then typing in an instrument say EUR=. See screenshot below:

So you can use for example:

df, e = ek.get_data(['EUR=','GBP=','JPY='], ['TR.AMERICACLOSEBIDPRICE.date','TR.AMERICACLOSEBIDPRICE','TR.ASIACLOSEBIDPRICE','TR.EUROPECLOSEBIDPRICE'], {'SDate':'0D', 'EDate':'-1AW'})
df

I hope this can help.


1599741837168.png (439.0 KiB)
1599742715414.png (184.4 KiB)
icon clock
10 |1500

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

Upvote
18 0 1 0

Thanks a lot!

icon clock
10 |1500

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

Click below to post an Idea Post Idea