diff --git a/piker/brokers/deribit/feed.py b/piker/brokers/deribit/feed.py index 9cea38ee..5c85e09d 100644 --- a/piker/brokers/deribit/feed.py +++ b/piker/brokers/deribit/feed.py @@ -276,7 +276,16 @@ async def open_symbol_search( async with ctx.open_stream() as stream: + pattern: str async for pattern in stream: - # repack in dict form - await stream.send( - await client.search_symbols(pattern)) + # NOTE: pattern fuzzy-matching is done within + # the methd impl. + pairs: dict[str, Pair] = await client.search_symbols( + pattern, + ) + # repack in fqme-keyed table + byfqme: dict[str, Pair] = {} + for pair in pairs.values(): + byfqme[pair.bs_fqme] = pair + + await stream.send(byfqme)