Getting daily historical data at a fixed timestamp

Hi,


Does anyone know how to get the bid/ask at a specific time every day? Eg. ESc1 at 6:00am UTC time for the past 2 years. There has to be a better way than to get hourly data and filter it. I am currently using the refinitiv data library in python.


Thanks

Best Answer

  • Hi @D ,


    You mentioned that the issue with using start and end arguments in the rd function is that it requires pulling unnecessary data.

    If you only want one result, you can choose the count:


    import refinitiv.data as rd
    rd.open_session()
    IntradayTimeSeriesDf = rd.get_history(
    universe=['ESc1'],
    fields=['BID'],
    interval="1min", # The consolidation interval. Supported intervals are: tick, tas, taq, minute, 1min, 5min, 10min, 30min, 60min, hourly, 1h, daily, 1d, 1D, 7D, 7d, weekly, 1W, monthly, 1M, quarterly, 3M, 6M, yearly, 1Y.
    start="2022-05-06T06:00:00",
    end="2022-05-06T06:01:00",
    count=1
    )
    IntradayTimeSeriesDf


    1661858613165.png

Answers