How can I select feed within Eikon's python Code Book

I have the option to view quotes on different feeds - Q for live or D for delayed. I only have delayed access to some quotes, how can I access these RICs within Code Book. This seems to default to Q (IDN_SELECTFEED)

import refinitiv.data as rd
from refinitiv.data.discovery import Chain

rd.open_session()

fchi = Chain(name="0#MCU-CLS")

Best Answer

  • Jirapongse
    Jirapongse admin
    Answer ✓

    @matthew.walmsley

    I think that the IDN_DELAYEDFEED is not available on CodeBook. I checked and found that the services on CodeBook are IDN_RDFNTS_CF and IDN_RDF.

    I am not sure if CodeBook provides the delayed real-time feed.


Answers

  • @matthew.walmsley Thanks for your question. So I think you need to change the service parameter in the definition. Say your default service is "IDN_SELECTFEED" - you can change it to another service say "IDN_DELAYEDFEED" as follows:

    import refinitiv.data as rd
    from refinitiv.data.content import pricing
    rd.open_session()
    ftse = pricing.chain.Definition("0#.FTSE",service="IDN_DELAYEDFEED").get_stream()
    ftse.open()
    ftse.constituents

    Please let us know if this works for you. I hope this can help.

  • Thank you for your response.


    ftse.open() currently hangs on cell execution - the previous get_stream() call appears to return a refinitiv.data.content.pricing.chain.Stream object. Is there an alternative method?