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
    Gurpreet admin
    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