I followed tutorial as below on Jupyter Notebook.
streaming_prices = ek.StreamingPrices(
instruments = ['GBP=','JPY=', 'CAD='],
fields = ['CF_BID','CF_ASK','OPEN_PRC', 'CF_HIGH','CF_LOW', 'CF_CLOSE'])
I got error when I run the code.
the error message is as below.
2021-04-21 17:01:47,086 P [WebSocket 0 15960] error from callback <bound method StreamConnection._ws_message of <StreamConnection(WebSocket 0, started daemon 15960)>>: the JSON object must be str, bytes or bytearray, not WebSocketApp
this code works in Pycharm but not in Jupyter Notebook.
could you let me know why does it happen.
Thank you in advance.
We did have issues with the RDP Library (which shares some code with the Eikon library) in terms of the Websocket versions.
If you refer to the above you will note that downgrading the Websocket version resolved the issue.
If all you are interested in for this script is real-time streaming or snapshot data, then you can also use the RDP Library with a Desktop Session to connect to your Eikon or Workspace.
You can also find several real-time data examples in the Jupyter Notebook form for the RDP library at
e.g. 2.3.2 - Content - StreamingPrices - As a cache