From 617bf3e0dae206a6788ee93d168baa492f123fd6 Mon Sep 17 00:00:00 2001 From: Konstantine Tsafatinos Date: Tue, 1 Mar 2022 15:38:20 -0500 Subject: [PATCH] fix typo and get rid of pprint of ws stream --- piker/brokers/kraken.py | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/piker/brokers/kraken.py b/piker/brokers/kraken.py index 74119e88..6e9e55b3 100644 --- a/piker/brokers/kraken.py +++ b/piker/brokers/kraken.py @@ -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