POST Flatten Everything

Flattens all positions and orders in all accounts for all instruments.

Flatten all NT8 positions and orders

POST /v1/api/positions/flatten

Headers

NameValue

Content-Type

application/json

Authorization

Bearer <token>

Code Examples (coming soon)

// Some code

Response

{
    "orderIds": [
        "adb3868865de4b59b0e147b8300e4a29",
        "2141df9fc0254ba9b34c8a5e38722249",
        "16f6774e302748ce962f2d60b58b2eb1"
    ],
    "closedPositions": [
        {
            "type": "NinjaTrader.Cbi.Position",
            "account": "Sim101",
            "instrument": "ES 12-24",
            "instrumentType": "Future",
            "marketPosition": "Short",
            "quantity": 2,
            "averagePrice": 5780.125,
            "marketPrice": 5774.0,
            "unrealizedProfitLoss": 612.5
        }
    ],
    "success": true
}

Last updated