From 2bdbe0f20ee69893987d35bb8beae75e777effb2 Mon Sep 17 00:00:00 2001 From: Nelson Torres Date: Fri, 15 Nov 2024 14:26:16 -0300 Subject: [PATCH] refactor redundant code --- piker/brokers/deribit/api.py | 12 +++--------- 1 file changed, 3 insertions(+), 9 deletions(-) diff --git a/piker/brokers/deribit/api.py b/piker/brokers/deribit/api.py index b8c20b23..f998954a 100644 --- a/piker/brokers/deribit/api.py +++ b/piker/brokers/deribit/api.py @@ -449,15 +449,9 @@ class Client: for instrument in mkt_pairs: pair_type: Type = PAIRTYPES[venue] - try: - pair: Pair = pair_type(**mkt_pairs[instrument].to_dict()) - except Exception as e: - e.add_note( - "\nDon't panic, prolly stupid binance changed their symbology schema again..\n" - 'Check out their API docs here:\n\n' - 'https://binance-docs.github.io/apidocs/spot/en/#exchange-information' - ) - raise + + pair: Pair = pair_type(**mkt_pairs[instrument].to_dict()) + pair_table[pair.symbol.upper()] = pair # update an additional top-level-cross-venue-table