Flatten Positions

The FLATTEN positions command provides the option to either flatten all positions in an account, or optionally flatten all positions in an account for a specific instrument. The latter will have the same net effect as the CLOSEPOSITION command for an account + instrument combination.

Example Payload

The following alert will flatten all positions in the sim101 account:

key=your-secret-key;
command=FLATTEN;
account=sim101;

The following alert will flatten all positions in the sim101 account for instrument MES 12-24:

key=your-secret-key;
command=FLATTEN;
account=sim101;
instrument=MES 12-24;

Last updated