get_timeseries - Historical fields inconsistencies (interval = TAS)

Hello all,

I have the following code returning either 27 or 52 fields depending on the end date.

(the difference lies in line 2, startdate definition)

Scenario 1: 52 fields returned

endDate = datetime.datetime(year=2020,month=3,day=10)
startDate=datetime.datetime(year=2020,month=3,day=4)

tickreq = ek.get_timeseries('BNPP.PA', fields='*', start_date=startDate, end_date=endDate, interval='tas', calendar=None, corax=None, normalize=False, raw_output=True, debug=False)
#--------------Fields and data extraction from raw data
lfields=[]
for i in tickreq['timeseriesData'][0]['fields']:
    lfields.append(i['name'])
tickdf=pd.DataFrame(tickreq['timeseriesData'][0]['dataPoints'], columns =lfields)

Scenario 2: 27 fields returned

endDate = datetime.datetime(year=2020,month=3,day=10)
startDate=datetime.datetime(year=2020,month=3,day=8)

tickreq = ek.get_timeseries('BNPP.PA', fields='*', start_date=startDate, end_date=endDate, interval='tas', calendar=None, corax=None, normalize=False, raw_output=True, debug=False)
#--------------Fields and data extraction from raw data
lfields=[]
for i in tickreq['timeseriesData'][0]['fields']:
    lfields.append(i['name'])
tickdf=pd.DataFrame(tickreq['timeseriesData'][0]['dataPoints'], columns =lfields)

I understand 08032020 is a sunday, so no trades to be found in theory, but I would still expect to get the same data structure, as I'am asking for all fields.

Is this normal behaviour?

Thank you for your help

Welcome!

It looks like you're new here. Sign in or register to get started.

Answers

  • zoya faberov
    zoya faberov ✭✭✭✭✭

    Hello @MF

    I run the same test, the structure appears to be the same, some fields may not be populated?

    image

  • MF
    MF LSEG

    Hello Zoya,

    thank you for your answer,

    I rerun the test and still have a difference:

    image


    I am even more confused now as we run pretty much the same code but get different results...

  • MF
    MF LSEG

    Hello Zoya,

    The problem is consistent as I can replicate it on my side for the same date,

    I could no replicate it for the same stock at another date,

    I can replicate it for another stock (SOGN.PA) for the same starting date: 08/03/2020

Welcome!

It looks like you're new here. Sign in or register to get started.

Welcome!

It looks like you're new here. Sign in or register to get started.