From 5314cb79d4d965014755861f440d7d2055f02290 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..616be6b3 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'\nDon\'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