From 089c79e905f252e2f036e6c707e5f18e34d09db1 Mon Sep 17 00:00:00 2001 From: Nelson Torres Date: Wed, 13 Nov 2024 10:40:05 -0300 Subject: [PATCH] now using exch_info in search_symbols --- piker/brokers/deribit/api.py | 10 +++------- 1 file changed, 3 insertions(+), 7 deletions(-) diff --git a/piker/brokers/deribit/api.py b/piker/brokers/deribit/api.py index bddac360..ae5e35a6 100644 --- a/piker/brokers/deribit/api.py +++ b/piker/brokers/deribit/api.py @@ -452,19 +452,15 @@ class Client: Fuzzy search symbology set for pairs matching `pattern`. ''' - pairs: dict[str, Pair] = await self.symbol_info() - matches: dict[str, Pair] = match_from_pairs( + pairs: dict[str, Pair] = await self.exch_info() + + return match_from_pairs( pairs=pairs, query=pattern.upper(), score_cutoff=35, limit=limit ) - # repack in name-keyed table - return { - pair.instrument_name.lower(): pair - for pair in matches.values() - } async def bars( self,