Closed abhi1010 closed 3 months ago
Hello! It looks to me like everything is running fine. But since you don't do anything after creating the two LivePrices
objects (by the way, you could definitely combine into one for better performance), the running tasks get killed as the program exits. Try doing this in your main
function:
live_apple = await LivePrices.create(session, 'AAPL', tasty_monthly)
live_amazon = await LivePrices.create(session, 'AMZN', tasty_monthly)
print(live_apple.greeks)
Thanks, I got what you mean.
I am getting
CancelledError
with this line of code:It goes away when I disable this line. I will provide my sample code below (retrieved from Advanced Usage.
Code: