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`.
|
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,
|
||||||
|
|
Loading…
Reference in New Issue