How to connect to poloniex.com websocket api using a python library

前端 未结 4 2141
被撕碎了的回忆
被撕碎了的回忆 2020-12-07 17:16

I am trying to connect to wss://api.poloniex.com and subscribe to ticker. I can\'t find any working example in python. I have tried to use autobahn/twisted and websocket-cli

4条回答
  •  旧时难觅i
    2020-12-07 17:42

    Currently, Twisted doesn't properly use the Windows trust store. So the verification of the TLS certificate will fail. To work around this until either Twisted or Autobahn includes a workaround, you can:

    • install certifi module (pip install certifi)
    • set SSL_CERT_FILE, like export SSL_CERT_FILE="$(python -m certifi)"

提交回复
热议问题