Closed limx0 closed 1 year ago
Now improved from 373fa29d23ed50b6f3be9db85d7703a3d7b52e69.
The TradingNode
exposes the following methods:
run()
run_async()
stop()
stop_async()
So the coroutine versions make the node easier to call within an async
context.
Bug Report
We currently don't have a clean, working solution for running nautilus inside an
async main
function (likeexamples/live/betfair.py
). Ideally users should be able to do this because they may need to make some async things (such as requests to get instruments before defining strategies) before starting a TradingNode.Expected Behavior
TradingNode should exit cleanly when used within an async function.
Actual Behavior
TradingNode either exits before full cleanup has occurred or hangs indefinitely.
Steps to Reproduce the Problem
examples/live/betfair.py