How can I work with async and StreamingPrices?

Hello,


I'm trying to subscribe to a few thousand RICs and opening straming.open() takes about 5 minutes, so the idea I had was to use asyncio to open multiple streamsprices simultaneously with just 200 RICs each.


However, when making multiple openings, it seems that one only starts when the other receives a "Received Full Snapshot" status. I can make everything else work async, but this is causing me problems as the final opening time for all streams ends up being the same as if I opened just one.


I tried some solutions with threads, but I get the error saying that the object cannot be called.


Any help / suggestion?

Best Answer

  • Gurpreet
    Answer ✓

    Hi @diego37,

    Refinitiv python module uses async for IO. If you take a look at the source code for the module, you can see how its being used.

Answers

  • Good Morning!


    Thanks for the answer.


    I've already taken a look at the source code, but I can't do what I want, which is: instead of opening a stream with 2 thousand RICs, opening 10 with 200 RICs (so that I get a faster "final" return, I mean , a total snapshot more quickly).


    Do you have any idea how I could proceed?


    Thank you in advance for your help.

  • @diego37, The throttling might be happening at the server side. Eikon is a desktop product and not intended for streaming thousands of instruments. If your requirement is to use streaming prices for large number of instruments, then a proper streaming solution like Refinitiv Real Time Optimized might be a better fit.

    Please talk to your account manager, if this interests you. You can read the documentation here.