Download_positions() doesn't show Alpaca orders/account

No Alpaca Positions: from quantrocket.blotter import download_positions
Shows Alpaca Positions: from quantrocket.blotter import download_account_portfolio

PNL from Moonshot Strategy executed through Alpaca raised 2 different errors:



image

I made sure the v1 to v2 migration was fine as well:
image

Hard to respond, as there is a mix of things in this post and not a lot of details on any one of them.

For the sqlite error, the detailed logs should print a SQL error just before the full traceback. Checking that error would be a good first step.

The download_positions and download_account_portfolio endpoints are not necessarily meant to agree (if that's what you're expecting). download_account_portfolio returns your broker's view of your portfolio. download_positions returns only the positions placed through QuantRocket. Any broker activity originating from outside of your QuantRocket deployment will cause them to disagree.