now using exch_info in search_symbols
parent
d848050b52
commit
089c79e905
|
@ -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,
|
||||
|
|
Loading…
Reference in New Issue