I want to filter all live accounts using more than $2k margin, but this returns paper as well.
0 16 * * mon-fri quantrocket account balance --latest --fields "Account" "TotalCashValue" "Paper" --below TotalCashValue:-2000 | quantrocket flightlog log --name quantrocket.account-MARGIN-Used --level CRITICAL
Trying to add
--below Paper:1
returns a non-valid filtering error. Any other fields inside "*"
doesn't seem to be paper specific.
Ultimately, the goal is to cash out any live account using X% of Margin/ShortValue.
The Python API would allow this (filtering on paper, % margin, etc...). Is the best way to build unit tests and use the methods inside from quantrocket.blotter import *
to place orders, or is there a more streamlined approach?
0 16 * * mon-fri quantrocket satellite exec 'pytest /codeload/unit_tests/tests/ -s'