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
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-apipythonrefinitiv-dataplatform-eikonworkspaceworkspace-data-apitick-history-rest-apihistorical
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
644 4 7 8

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 512.0 KiB each and 1.0 MiB total.

@James.Perkins

Hi James! a follow up on this one:


As you mentioned, the bond timeseries data can be retrieved by excel plug in, and I was able to get that. Any chance this function is supported by tickHistoryRaw or python eikon api right now?


Thank you so much for your help!

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 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.