End Period doesnt work

HannaCP
HannaCP LSEG
edited June 19 in Eikon Data APIs

Hi team, I am from the Specialist - helpdesk team and I have a client who raised a query to us and said that the "summaryTimestampLabel":"endPeriod" doesnt work on his end. Can you check? Thanks!

For context, his verbatim below:

It does not seem to work (i.e., I still get a start of period data), but I can handle this in my program.

However, what feels really annoying is that I don't get the most recent data when using any of the APIs.
I ran my code at 11:40am so I expect to get the data of 11am (Paris time) and of the preceding hours (10am, 9am, etc).
I indeed get the data of 10am, 9am, etc, but for the 11am, I get the data of 11:40am.

The end of period you mentioned would be good to fix this (if it works).

Sample code from user:

import lseg.data as lseg
lseg.open_session()

from lseg.data.content import historical_pricing
from lseg.data.content.historical_pricing import Intervals

rics = ['EUR=']
fields = ['BID']

start = py_utils.datetime_checker('2025-06-18 03:00:00')
end  = py_utils.datetime_checker('2025-06-18 12:00:00')

response = historical_pricing.summaries.Definition(
   universe=rics,
   fields=fields,
   start=start - timedelta(hours=2),
   end=end - timedelta(hours=1),
   interval=Intervals.HOURLY,
   extended_params={"summaryTimestampLabel": "endPeriod"}
).get_data()
df = response.data.df
df.drop_duplicates(inplace=True)
df.index = df.index + timedelta(hours=1)

Answers

  • Jirapongse
    Jirapongse ✭✭✭✭✭

    @HannaCP

    Thank you for reaching out to us.

    The summaryTimestampLabel parameter controls the timestamp label in the response to be either at the start summarization period or at the end of summarization period. The parameter is available in the intraday-summaries and interday-summaries APIs and its possible values are as follows:

    • startPeriod indicates that the data returned is labelled at the start of summarization period.
    • endPeriod indicates that the data returned is labelled at the end of summarization period.

    It is not used to get the most recent data.

    The following picture compares the results when setting the summaryTimestampLabel parameter to 'startPeriod' and 'endPeriod' respectively.

    image.png

    With the 'startPeriod', the 1.1507 price value belongs to the 2025-06-18 11:00:00 timestamp while with the 'endPeriod', the same price (1.1507) belongs to the 2025-06-18 12:00:00.

    I understand that the client would like to retrieve the recent data. You need to contact the Historical Pricing API team to verify when the recent data is available in the historical database.