amor71/LiuAlgoTrader

Support multiple brokers

github-actions opened this issue · 1 comments

Support multiple brokers

# TODO: Support multiple brokers

    qm = QueueMapper(queue_list=queues)
    await run(queues=queues, qm=qm)

    # TODO: Support multiple brokers
    at = trader_factory(qm)
    trade_updates_task = await at.run()

    scanner_input_task = asyncio.create_task(
        scanner_input(scanner_queue, queues, num_consumer_processes),
        name="scanner_input",
    )

    tradeplan_scanner_task = asyncio.create_task(
        tradeplan_scanner(queues), name="tradeplan_scanner"
    )

    async_tasks_to_gather = [scanner_input_task, tradeplan_scanner_task]

    if inspect.iscoroutinefunction(trade_updates_task):
        async_tasks_to_gather.append(trade_updates_task)  # type: ignore

    await asyncio.gather(
        *async_tasks_to_gather,

2eeb786782783ff91d380f9defef610259e19a7d

Stale issue message