RuntimeError Traceback (most recent call last)
Cell In[8], line 83
79 print(json.dumps(data_dict))
82 # Execute the function to fetch market data
—> 83 asyncio.run(fetch_market_data())
File ~\AppData\Local\Programs\Python\Python312\Lib\asyncio\runners.py:190, in run(main, debug, loop_factory)
161 “”“Execute the coroutine and return the result.
162
163 This function runs the passed coroutine, taking care of
(…)
186 asyncio.run(main())
187 “””
188 if events._get_running_loop() is not None:
189 # fail fast with short traceback
→ 190 raise RuntimeError(
191 “asyncio.run() cannot be called from a running event loop”)
193 with Runner(debug=debug, loop_factory=loop_factory) as runner:
194 return runner.run(main)
RuntimeError: asyncio.run() cannot be called from a running event loop