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

Overview |  Quickstart |  Documentation |  Downloads |  Tutorials |  Articles

question

Upvotes
Accepted
1 1 0 0

how do I get historical ticks using Python eikon package

Hello, how do I get historical ticks using Python eikon package?

For example, the Excel way to get real-time ticks is =TR(E3:E1001,"TR.InstrumentDescription;PRIMACT_1;SEC_ACT_1;CF_TIME;GV6_TEXT;CF_BID;CF_ASK","UPDFRQ=STREAM CH=Fd RH=IN")

What about getting historical ticks in Python? I tried the following but with no luck.

import eikon as ek

ek.set_app_key('{my app key here}')

list_rics = ['775109BB6=', ]

list_fields = ['TR.InstrumentDescription', 'PRIMACT_1', 'SEC_ACT_1', 'CF_TIME', 'GV6_TEXT', 'CF_BID', 'CF_ASK']

sd = '2019-09-06T06:00:00'

ed = '2019-09-06T21:00:00'

df = ek.get_timeseries(list_rics, list_fields, start_date=sd, end_date=ed, interval='tick')

print(df)

eikoneikon-data-apiworkspaceworkspace-data-apirefinitiv-dataplatform-eikonpythontick-history-rest-apihistorical
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
629 2 4 7

currently the fields supported by ek.get_timeseries() are; 'TIMESTAMP', 'VALUE', 'VOLUME', 'HIGH', 'LOW', 'OPEN', 'CLOSE', 'COUNT' , which for most instrument types is fine; but for bonds there need to be additional fields added. You can retrieve historical yield data for bonds on a tick basis. (via Eikon Excel you would reference BID.Close and ASK.Close for historical bid/ask levels - these have yet to be added to Eikon DAPI).

ts = ek.get_timeseries(['775109BB6='], fields = ['VALUE'], start_date = "2019-09-06T06:00:00", end_date = "'2019-09-06T21:00:00", interval="tick")


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
3.8k 4 4 6

Hi,

If you need to get the granular data you may use 'taq' (times and quotes) interval that is not yet officially supported.

ek.get_timeseries('775109BB6=',['Bid','Bid_yield'], start_date = "2019-09-06T06:00:00", end_date = "'2019-09-06T21:00:00", interval="taq")


ahs.jpg (55.1 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.

Click below to post an Idea Post Idea