now using exch_info in search_symbols

deribit_fix
Nelson Torres 2024-11-13 10:40:05 -03:00
parent d848050b52
commit 089c79e905
1 changed files with 3 additions and 7 deletions

View File

@ -452,19 +452,15 @@ class Client:
Fuzzy search symbology set for pairs matching `pattern`. Fuzzy search symbology set for pairs matching `pattern`.
''' '''
pairs: dict[str, Pair] = await self.symbol_info() pairs: dict[str, Pair] = await self.exch_info()
matches: dict[str, Pair] = match_from_pairs(
return match_from_pairs(
pairs=pairs, pairs=pairs,
query=pattern.upper(), query=pattern.upper(),
score_cutoff=35, score_cutoff=35,
limit=limit limit=limit
) )
# repack in name-keyed table
return {
pair.instrument_name.lower(): pair
for pair in matches.values()
}
async def bars( async def bars(
self, self,