fix typo and get rid of pprint of ws stream
parent
a3345dbba2
commit
617bf3e0da
|
@ -271,7 +271,7 @@ class Client:
|
|||
# for speed
|
||||
elif data['ofs'] == 50:
|
||||
trades = dict(trades, **resp['result']['trades'])
|
||||
# catch the of the trades
|
||||
# catch the end of the trades
|
||||
elif resp['result']['trades'] == {}:
|
||||
count = resp['result']['count']
|
||||
break
|
||||
|
@ -454,6 +454,7 @@ class Client:
|
|||
raise SymbolNotFound(json['error'][0] + f': {symbol}')
|
||||
|
||||
|
||||
|
||||
@asynccontextmanager
|
||||
async def get_client() -> Client:
|
||||
client = Client()
|
||||
|
@ -703,9 +704,7 @@ async def trades_dialogue(
|
|||
fixture=subscribe,
|
||||
token=token,
|
||||
) as ws:
|
||||
from pprint import pprint
|
||||
async for msg in process_trade_msgs(ws):
|
||||
pprint(msg)
|
||||
for trade in msg:
|
||||
# check the type of packaged message
|
||||
assert type(trade) == Trade
|
||||
|
|
Loading…
Reference in New Issue