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

Authorizations

Authorization
string
header
required

A Hyperprop session token, the partner session token returned by POST /trade/partner/session, or the personal API key session token returned by POST /trade/api-keys/session.

Body

application/json

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

Covers the full open position, however many 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 keep the existing stop-loss orders; omitting both legs clears both.

Example:

30050

take_profit
number<double> | null

New take-profit price for the entire position. Omit or send null to keep the existing take-profit orders; omitting both legs clears both. When several take-profit orders work at different prices and a stop-loss is sent too, a price one of them already holds keeps them all.

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

Working stop-loss orders after the call: the newly created one, or the existing orders when the stop-loss was left in place.

take_profit_orders
any[]
required

Working take-profit orders after the call: the newly created one, or the existing orders when the take-profit was left in place.