Skip to content
This repository has been archived by the owner on Oct 13, 2023. It is now read-only.

use api_key from credentials to prevent reconnect error #14

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 3 additions & 3 deletions bittrex_websocket/websocket_client.py
Original file line number Diff line number Diff line change
Expand Up @@ -100,8 +100,8 @@ def _handle_subscribe(self, invoke, payload):
self.connection.corehub.server.invoke(invoke, ticker)
logger.info('Successfully subscribed to [{}] for [{}].'.format(invoke, ticker))
elif invoke == BittrexMethods.GET_AUTH_CONTENT:
self.connection.corehub.server.invoke(invoke, payload[0])
self.invokes.append({'invoke': invoke, 'ticker': payload[0]})
self.connection.corehub.server.invoke(invoke, self.credentials['api_key'])
self.invokes.append({'invoke': invoke, 'ticker': None})
logger.info('Retrieving authentication challenge.')
elif invoke == BittrexMethods.AUTHENTICATE:
self.connection.corehub.server.invoke(invoke, payload[0], payload[1])
Expand Down Expand Up @@ -163,7 +163,7 @@ def query_exchange_state(self, tickers):

def authenticate(self, api_key, api_secret):
self.credentials = {'api_key': api_key, 'api_secret': api_secret}
event = SubscribeEvent(BittrexMethods.GET_AUTH_CONTENT, api_key)
event = SubscribeEvent(BittrexMethods.GET_AUTH_CONTENT)
self.control_queue.put(event)

def disconnect(self):
Expand Down