fix typo and get rid of pprint of ws stream

kraken_orders
Konstantine Tsafatinos 2022-03-01 15:38:20 -05:00
parent a3345dbba2
commit 617bf3e0da
1 changed files with 2 additions and 3 deletions

View File

@ -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