5ymph0en1x / SyDOM

Sophisticated Scalper Bot for BitMEX using orders imbalance analysis
GNU General Public License v3.0
90 stars 39 forks source link

utils.predictor - ERROR - 401 Unauthorized: {'error': {'message': 'Invalid API Key.', 'name': 'HTTPError'}} #5

Closed MrMoonCrypto closed 1 year ago

MrMoonCrypto commented 4 years ago

We keep running into the issue of the API key not being valid we changed to bitmex testnet in the base URL for the connection.

API_path_bmex = 'wss://testnet.bitmex.com/realtime'

2020-07-30 12:42:42,306 - utils.bitmex_websocket_com - INFO - Connecting to wss://testnet.bitmex.com/realtime?subscribe=execution:ETHUSD,instrument:ETHUSD,order:ETHUSD,orderBookL2_25:ETHUSD,position:ETHUSD,quote:ETHUSD,trade:ETHUSD,margin 2020-07-30 12:42:42,308 - utils.bitmex_websocket_com - INFO - Authenticating with API Key. 2020-07-30 12:42:46,335 - utils.bitmex_websocket_com - INFO - Connected to WS. 2020-07-30 12:42:47,645 - utils.bitmex_websocket_com - INFO - Got all market data. Starting. 2020-07-30 12:42:50,147 - __main__ - INFO - It began in Africa 2020-07-30 12:42:50,148 - utils.bollinger - INFO - Starting BB computation... 2020-07-30 12:42:50,273 - __main__ - INFO - Starting AutoTraining Module... Estimated computing time: 10 minutes 2020-07-30 12:42:50,361 - utils.rsi - INFO - Starting RSI computation... 2020-07-30 12:42:50,957 - utils.bollinger - ERROR - 401 Unauthorized: {'error': {'message': 'Invalid API Key.', 'name': 'HTTPError'}} 2020-07-30 12:42:52,241 - utils.predictor - INFO - Starting machine learning computation... 2020-07-30 12:42:52,562 - utils.predictor - ERROR - 401 Unauthorized: {'error': {'message': 'Invalid API Key.', 'name': 'HTTPError'}}

MrMoonCrypto commented 4 years ago

We are also using a testnet key for Bitmex

5ymph0en1x commented 4 years ago

Hello Signalize, You can try putting test=True at line 24 in utils/bollinger.py, this should work... Best regards

bgizdov commented 3 years ago

You may also have to change test=True in utils/predictor.py client = bitmex.bitmex(test=True, api_key=self.API_key_bmex, api_secret=self.API_secret_bmex)