Skip to main content
POST
Set TP/SL at the position level for one (account, contract) pair.

Body

application/json

Set TP/SL at the position level for a given (account, contract).

The trade engine models brackets per-parent-order, but a trader thinks in terms of the open position. This endpoint covers the full position regardless of how many parent fills built it up.

  • take_profit: Some(price) replaces any existing TP children for this position with fresh ones at price.
  • take_profit: None clears all existing TP children for this position.
  • Same for stop_loss.
  • Both None clears all bracket children for this position.
account_id
string<uuid>
required

UUID of the trading account

Example:

"550e8400-e29b-41d4-a716-446655440000"

contract
string
required

Full contract symbol (e.g., "MNQM6", "ESH6")

Example:

"MNQM6"

stop_loss
number<double> | null

New stop-loss price for the entire position. Omit or send null to clear any existing SL children.

Example:

30050

take_profit
number<double> | null

New take-profit price for the entire position. Omit or send null to clear any existing TP children.

Example:

30150

Response

Position bracket set

cancelled_orders
any[]
required

Bracket child orders that were cancelled because they were replaced or cleared.

stop_loss_orders
any[]
required

Newly-created stop-loss child orders (one per parent entry). All share the requested SL price; total quantity == position quantity.

take_profit_orders
any[]
required

Newly-created take-profit child orders (one per parent entry). All share the requested TP price; total quantity == position quantity.