better call the 'key permissions' "-" instead: "read only"
drandreaskrueger opened this issue · comments
just following your readme ... error:
"""
Error : Handshake status 401 Unauthorized
pip freeze | grep bitm
bitmex-ws==0.4.0
python --version
Python 3.7.3
"""
from bitmex_websocket import BitMEXWebsocket # pip3 install bitmex-ws
api_key="-qU2g..."
api_secret="Kt3b..."
for ep in ("https://testnet.bitmex.com/api/v1",
"wss://testnet.bitmex.com/realtime/api/v1",
"ws://testnet.bitmex.com/realtime/api/v1", ):
try:
ws = BitMEXWebsocket(endpoint=ep, symbol="XBTUSD", api_key=api_key, api_secret=api_secret)
except Exception as e:
print(type(e), e, ep)
is resulting in:
Error : Handshake status 401 Unauthorized
What am I doing wrong? Or:
Where exactly is the typo in your README.md ?
Thanks a lot!
P.S.: I have tried all three types of (api_key, api_secret) on https://www.bitmex.com/app/apiKeys :
Order
Order Cancel
-
(actually, my suggestion is to not call the last permission "-" but "read only")
... --> SAME result:
Error : Handshake status 401 Unauthorized
found it.
Your instructions should show this:
BitMEXWebsocket(endpoint="https://www.bitmex.com/api/v1", ...
The readme does show the correct endpoint, just for Testnet. We don't like to encourage testing your software against the live exchange.