Add symbol search to broker api

bar_select
Tyler Goodlet 2020-06-24 14:13:00 -04:00
parent 2f1fdaf9e5
commit 99c18abfea
1 changed files with 12 additions and 0 deletions

View File

@ -108,3 +108,15 @@ async def symbol_info(
"""
async with brokermod.get_client() as client:
return await client.symbol_info(symbol, **kwargs)
async def symbol_search(
brokermod: ModuleType,
symbol: str,
**kwargs,
) -> Dict[str, Dict[str, Dict[str, Any]]]:
"""Return symbol info from broker.
"""
async with brokermod.get_client() as client:
# TODO: support multiple asset type concurrent searches.
return await client.search_stocks(symbol, **kwargs)