I'm using the Eikon Data API and trying to get streaming prices working from a script (not jupyter). I'm using the example code provided on PyPI and on github (in a script form). Currently the streaming_prices.open() receives updates and refreshes for the specified instruments and then almost immediately completes and ends the script. Is there a way to run a StreamingPrices instance "forever" and use the callbacks to evaluate realtime data?Cheers
You can try something like
streaming = ek.StreamingPrices(....) streaming.open() asyncio.get_event_loop().run_until_complete(asyncio.sleep(60)) streaming.close()
where the above will open the stream, run for 60 seconds before closing the stream.
If you want to run forever you can put the asyncio call in a continuous loop?
Im downloading the fields "TR.LNMandatedArrangerParent" and "TR.LNMandatedArrangerParentNation", concatenationg with the character "|". However, I get results in "mixed" order, I attached a picture below.