Skip to content

Commit

Permalink
fix(ws): minor usability update
Browse files Browse the repository at this point in the history
  • Loading branch information
STRML committed May 18, 2021
1 parent e4bfe80 commit 4ecd372
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion market_maker/ws/ws_thread.py
Original file line number Diff line number Diff line change
Expand Up @@ -65,6 +65,7 @@ def connect(self, endpoint="", symbol="XBTN15", shouldAuth=True):

# Connected. Wait for partials
self.__wait_for_symbol(symbol)
logger.info("%s received. Waiting for account...", symbol)
if self.shouldAuth:
self.__wait_for_account()
logger.info('Got all market data. Starting.')
Expand Down Expand Up @@ -199,7 +200,7 @@ def __wait_for_account(self):

def __wait_for_symbol(self, symbol):
'''On subscribe, this data will come down. Wait for it.'''
while not {'instrument', 'trade', 'quote'} <= set(self.data):
while not {'instrument', 'quote'} <= set(self.data):
sleep(0.1)

def __send_command(self, command, args):
Expand Down

2 comments on commit 4ecd372

@kryptohandler
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

SHOW!

@STRML
Copy link
Author

@STRML STRML commented on 4ecd372 Jun 11, 2021

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

?

Please sign in to comment.