POST Flat Place Order

Flattens any existing positions prior to placing an order.

Close position and place order

POST /v1/api/accounts/{account}/orders/flatplace

Unlike reverse positions, flat placing an order will close any existing position and continue on to place the order regardless of whether or not the position existed. This is useful to ensure you are always cleanly entering a new positions. The equivalent of a webhook signal with the flatten_first flag enabled.

Headers

NameValue

Content-Type

application/json

Authorization

Bearer <token>

Query Parameters

NameTypeRequiredDescription

account

string

Required

Name of account in NT8

Body

NameTypeRequiredDescription

instrument

string

Required

Name of underlying instrument (e.g., "ES 12-24")

action

string

Required

BUY, SELL

quantity

integer

Required

Contract quantity of new order

orderType

string

Required

MARKET, LIMIT, STOPMARKET, STOPLIMIT

timeInForce

string

Required

DAY, GTC

limitPrice

float

Optional

Limit price when submitting limit order type

stopPrice

float

Optional

Stop price when submitting stop order type

ocoId

string

Optional

Create or append to OCO order by ID

strategy

string

Optional

ATM strategy name if opening with ATM template

Code Examples (coming soon)

// Some code

Response

{
    "orderId": "1ede9d7ad8124fd48e3177399bf90a04",
    "success": true
}

Last updated