From 121f90346376bb6e4901eee5e478ddca422acb02 Mon Sep 17 00:00:00 2001 From: Nelson Torres Date: Wed, 22 May 2024 00:08:47 -0300 Subject: [PATCH] Added note to exception when missing field in SpotPair class --- piker/brokers/binance/api.py | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/piker/brokers/binance/api.py b/piker/brokers/binance/api.py index 0055668d..55dd070f 100644 --- a/piker/brokers/binance/api.py +++ b/piker/brokers/binance/api.py @@ -433,7 +433,11 @@ class Client: item['filters'] = filters pair_type: Type = PAIRTYPES[venue] - pair: Pair = pair_type(**item) + try: + pair: Pair = pair_type(**item) + except Exception as e: + e.add_note(f'Don\'t panic, check out this https://binance-docs.github.io/apidocs/spot/en/#exchange-information') + raise pair_table[pair.symbol.upper()] = pair # update an additional top-level-cross-venue-table