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.