From d173d373cba3f57c333f1e306c73c3be3c3ca97e Mon Sep 17 00:00:00 2001 From: Tyler Goodlet Date: Mon, 12 Jun 2023 20:25:09 -0400 Subject: [PATCH] kraken: raise `SymbolNotFound` on symbology query errors --- piker/brokers/kraken/api.py | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/piker/brokers/kraken/api.py b/piker/brokers/kraken/api.py index de2be68c..e9a3f607 100644 --- a/piker/brokers/kraken/api.py +++ b/piker/brokers/kraken/api.py @@ -638,7 +638,10 @@ class Client: the 'AssetPairs' endpoint, see methods above. ''' - return cls._ntable[ticker].lower() + try: + return cls._ntable[ticker].lower() + except KeyError as ke: + raise SymbolNotFound(f'kraken has no {ke.args[0]}') @acm