Comment-drop adhoc symbol (futes) matching in search

lifo_pps_ib
Tyler Goodlet 2022-06-23 20:20:08 -04:00
parent d6c32bba86
commit 695ba5288d
1 changed files with 13 additions and 12 deletions

View File

@ -916,17 +916,17 @@ async def open_symbol_search(
# trigger async request # trigger async request
await trio.sleep(0) await trio.sleep(0)
# match against our ad-hoc set immediately # # match against our ad-hoc set immediately
adhoc_matches = fuzzy.extractBests( # adhoc_matches = fuzzy.extractBests(
pattern, # pattern,
list(_adhoc_futes_set), # list(_adhoc_futes_set),
score_cutoff=90, # score_cutoff=90,
) # )
log.info(f'fuzzy matched adhocs: {adhoc_matches}') # log.info(f'fuzzy matched adhocs: {adhoc_matches}')
adhoc_match_results = {} # adhoc_match_results = {}
if adhoc_matches: # if adhoc_matches:
# TODO: do we need to pull contract details? # # TODO: do we need to pull contract details?
adhoc_match_results = {i[0]: {} for i in adhoc_matches} # adhoc_match_results = {i[0]: {} for i in adhoc_matches}
log.debug(f'fuzzy matching stocks {stock_results}') log.debug(f'fuzzy matching stocks {stock_results}')
stock_matches = fuzzy.extractBests( stock_matches = fuzzy.extractBests(
@ -935,7 +935,8 @@ async def open_symbol_search(
score_cutoff=50, score_cutoff=50,
) )
matches = adhoc_match_results | { # matches = adhoc_match_results | {
matches = {
item[0]: {} for item in stock_matches item[0]: {} for item in stock_matches
} }
# TODO: we used to deliver contract details # TODO: we used to deliver contract details