refactor redundant code

deribit_fix
Nelson Torres 2024-11-15 14:26:16 -03:00
parent a117177759
commit 2bdbe0f20e
1 changed files with 3 additions and 9 deletions

View File

@ -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