Hi Team I am new to Alpaca I am trying to stream stocks bars information
I am on mac machine and I have following contents in my pipfile
[[source]]
url = “Simple index”
verify_ssl = true
name = “pypi”
[packages]
spyder-kernels = “==2.3”
alpaca-py = “*”
[dev-packages]
[requires]
python_version = “3.9”
python_full_version = “3.9.2”
when I run below code from example
stock_stream = StockDataStream(config.ALPACA_KEY, config.ALPACA_SECRET_KEY)
stock_stream.subscribe_quotes(bars_data_handler, “JEPI”)
stock_stream.run()
I am seeing following error
n_transport(
File “/Library/Frameworks/Python.framework/Versions/3.9/lib/python3.9/asyncio/base_events.py”, line 1111, in _create_connection_transport
await waiter
File “/Library/Frameworks/Python.framework/Versions/3.9/lib/python3.9/asyncio/sslproto.py”, line 528, in data_received
ssldata, appdata = self._sslpipe.feed_ssldata(data)
File “/Library/Frameworks/Python.framework/Versions/3.9/lib/python3.9/asyncio/sslproto.py”, line 188, in feed_ssldata
self._sslobj.do_handshake()
File “/Library/Frameworks/Python.framework/Versions/3.9/lib/python3.9/ssl.py”, line 944, in do_handshake
self._sslobj.do_handshake()
ssl.SSLCertVerificationError: [SSL: CERTIFICATE_VERIFY_FAILED] certificate verify failed: unable to get local issuer certificate (_ssl.c:1123)
error during websocket communication: [SSL: CERTIFICATE_VERIFY_FAILED] certificate verify failed: unable to get local issuer certificate (_ssl.c:1123)
Traceback (most recent call last):
File “/Users/snehaloffice/.local/share/virtualenvs/pythonProject-xe_gl1j7/lib/python3.9/site-packages/alpaca/common/websocket.py”, line 314, in _run_forever
await self._start_ws()
File “/Users/snehaloffice/.local/share/virtualenvs/pythonProject-xe_gl1j7/lib/python3.9/site-packages/alpaca/common/websocket.py”, line 117, in _start_ws
await self._connect()
File “/Users/snehaloffice/.local/share/virtualenvs/pythonProject-xe_gl1j7/lib/python3.9/site-packages/alpaca/common/websocket.py”, line 81, in _connect
self._ws = await websockets.connect(
File “/Users/snehaloffice/.local/share/virtualenvs/pythonProject-xe_gl1j7/lib/python3.9/site-packages/websockets/legacy/client.py”, line 659, in await_impl_timeout
return await asyncio.wait_for(self.await_impl(), self.open_timeout)
File “/Library/Frameworks/Python.framework/Versions/3.9/lib/python3.9/asyncio/tasks.py”, line 481, in wait_for
return fut.result()
File “/Users/snehaloffice/.local/share/virtualenvs/pythonProject-xe_gl1j7/lib/python3.9/site-packages/websockets/legacy/client.py”, line 663, in await_impl
_transport, _protocol = await self._create_connection()
File “/Library/Frameworks/Python.framework/Versions/3.9/lib/python3.9/asyncio/base_events.py”, line 1081, in create_connection
transport, protocol = await self._create_connection_transport(
File “/Library/Frameworks/Python.framework/Versions/3.9/lib/python3.9/asyncio/base_events.py”, line 1111, in _create_connection_transport
await waiter