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)