Pass through test file to monitor

questrade_candles
Tyler Goodlet 2020-05-23 16:02:15 -04:00
parent f798d13038
commit 057086efdb
1 changed files with 7 additions and 4 deletions

View File

@ -163,20 +163,23 @@ async def stream_symbol_selection():
async def _async_main( async def _async_main(
name: str, name: str,
portal: tractor._portal.Portal, portal: tractor._portal.Portal,
tickers: List[str], symbols: List[str],
brokermod: ModuleType, brokermod: ModuleType,
loglevel: str = 'info', loglevel: str = 'info',
rate: int = 3, rate: int = 3,
test: bool = False test: str = '',
) -> None: ) -> None:
'''Launch kivy app + all other related tasks. '''Launch kivy app + all other related tasks.
This is started with cli cmd `piker monitor`. This is started with cli cmd `piker monitor`.
''' '''
feed = DataFeed(portal, brokermod) feed = DataFeed(portal, brokermod)
quote_gen, quotes = await feed.open_stream( quote_gen, quotes = await feed.open_stream(
tickers, 'stock', rate=rate) symbols,
'stock',
rate=rate,
test=test,
)
first_quotes, _ = feed.format_quotes(quotes) first_quotes, _ = feed.format_quotes(quotes)