Streaming 1min bars from Refinitiv Data Library for Python

Does the Refinitiv Data Library for Python (link) support streaming 1 minute OHLC bars?

I.e. allow to open a subscription and await/stream the bars as they come in, using a websockets-like event based framework.


As opposed to having to query them repetitively with the REST rd.get_history function.

Best Answer

  • Hi @pvklooster

    The Refinitiv Data Library for Python does not presently support streaming timeseries bars. However, this is something that will be worked on in 2023. No timelines have been set for the Python implementation. However, the Refinitiv Data Library for .Net is planning a release of this capability in Q1 2023.

    Hope this helps.

Answers

  • Hi @pvklooster

    I just received word that you can try the following feature (this may have been addressed on another thread - but here is a bit of sample code):

    def print_history(history, recorder):
    print(history)

    stream = rd.open_pricing_stream(universe=["EUR="], fields=["BID", "ASK"])

    stream.recorder.record(frequency="5s", duration="60s", on_data=print_history)
    stream.close()

    history = stream.recorder.get_history()
    print(history)
    rd.close_session()