From 695ba5288d726366b2e9a8822f605dd045927a86 Mon Sep 17 00:00:00 2001 From: Tyler Goodlet Date: Thu, 23 Jun 2022 20:20:08 -0400 Subject: [PATCH] Comment-drop adhoc symbol (futes) matching in search --- piker/brokers/ib/feed.py | 25 +++++++++++++------------ 1 file changed, 13 insertions(+), 12 deletions(-) diff --git a/piker/brokers/ib/feed.py b/piker/brokers/ib/feed.py index bc3ec8d5..b22ddc1b 100644 --- a/piker/brokers/ib/feed.py +++ b/piker/brokers/ib/feed.py @@ -916,17 +916,17 @@ async def open_symbol_search( # trigger async request await trio.sleep(0) - # match against our ad-hoc set immediately - adhoc_matches = fuzzy.extractBests( - pattern, - list(_adhoc_futes_set), - score_cutoff=90, - ) - log.info(f'fuzzy matched adhocs: {adhoc_matches}') - adhoc_match_results = {} - if adhoc_matches: - # TODO: do we need to pull contract details? - adhoc_match_results = {i[0]: {} for i in adhoc_matches} + # # match against our ad-hoc set immediately + # adhoc_matches = fuzzy.extractBests( + # pattern, + # list(_adhoc_futes_set), + # score_cutoff=90, + # ) + # log.info(f'fuzzy matched adhocs: {adhoc_matches}') + # adhoc_match_results = {} + # if adhoc_matches: + # # TODO: do we need to pull contract details? + # adhoc_match_results = {i[0]: {} for i in adhoc_matches} log.debug(f'fuzzy matching stocks {stock_results}') stock_matches = fuzzy.extractBests( @@ -935,7 +935,8 @@ async def open_symbol_search( score_cutoff=50, ) - matches = adhoc_match_results | { + # matches = adhoc_match_results | { + matches = { item[0]: {} for item in stock_matches } # TODO: we used to deliver contract details