diff --git a/piker/brokers/kraken/broker.py b/piker/brokers/kraken/broker.py index eb5963cd..bc84a230 100644 --- a/piker/brokers/kraken/broker.py +++ b/piker/brokers/kraken/broker.py @@ -175,9 +175,8 @@ async def handle_order_requests( case { 'account': 'kraken.spot' as account, - 'action': action, - } if action in {'buy', 'sell'}: - + 'action': 'buy'|'sell', + }: # validate order = BrokerdOrder(**msg) @@ -262,6 +261,12 @@ async def handle_order_requests( } | extra log.info(f'Submitting WS order request:\n{pformat(req)}') + + # NOTE HOWTO, debug order requests + # + # if 'XRP' in pair: + # await tractor.pause() + await ws.send_msg(req) # placehold for sanity checking in relay loop @@ -1085,6 +1090,8 @@ async def handle_order_updates( f'Failed to {action} order {reqid}:\n' f'{errmsg}' ) + # if tractor._state.debug_mode(): + # await tractor.pause() symbol: str = 'N/A' if chain := apiflows.get(reqid):