For a deeper look into our Eikon Data API, look into:
Overview | Quickstart | Documentation | Downloads | Tutorials | Articles
I have tried to use the code in the Streaming real time data tutorial, as follows:
But as you can see, it gives me an error message. Can someone help me solve the problem?
I have just upgraded to version 1.1.6.post2. The get_snapshot function works as expected...
Hi,
Your code is incorrect : a ')' left before streaming_prices.open()
Otherwise, I can run it on my side:
I assume that there is an hidden escape character that causes invalid syntax.
You can copy/paste from following block :
streaming_prices = ek.StreamingPrices( instruments = ['LCOc1', 'CLc1'], fields = ['CF_TIME', 'CF_BID', 'CF_ASK', 'OPEN_PRC', 'CF_HIGH', 'CF_LOW', 'CF_CLOSE'], on_refresh = lambda st, inst, fields : display_fields(st, inst, fields), on_update = lambda st, inst, fields : display_fields(st, inst, fields)) streaming_prices.open()
Thanks Pierre - you found the error... all working now. Incidentally, I copied the code from the tutorial, so the error is there...