Fetching intraday tick data with eikon in Python

Hi, good day


In Excel the formula writes:

=RHistory("CNYQM7R3Y=TPSC","MID_PRICE.Timestamp;MID_PRICE.Value","START:24-Sep-2019:09:00 END:24-Sep-2019:17:00 INTERVAL:TICK",,"CH:Fd",B2)

It works just fine and I can get the ticks for the mid price of CNYQM7R3Y=TPSC.

But how can I translate this into Python with the eikon api? I've tried both get_data and get_timeseries as below and they dont work.

eikon.get_data('CNYQM7R1Y=TPSC','TR.MIDPRICE(SDate=2019-09-24,EDate=2019-09-24,Frq=NA)')

eikon.get_timeseries(['CNYQM7R1Y=TPSC'],fields = 'TR.MIDPRICE',interval="tick")


Your help means a lot! Thanks!

Best Answer

  • m.bunkowski
    Answer ✓

    Hi @cty

    The tick interval is not yet officially supported however you can fetch some data already.

    Here is an example that gives you tick data but only for BID:

    ek.get_timeseries('CNYQM7R3Y=TPSC','Value', start_date = "2019-09-24T06:00:00", end_date = "2019-09-24T09:30:00",interval="tick")

    image

Answers