Skip to Content
Trading

Update Exotic Order (TP/SL)

PATCH
/v2/account/exotic-orders

Update an Exotic Order (TP/SL)

Warning: Ensure your API key has the TRADE scope. You can generate an API key through the One Trading UI.

This endpoint is rate-limited per account holder (see 429).

Changes the levels of a TP/SL without placing an order.

  • Identify it by client_id, or by instrument_code for the position TP/SL on that instrument. Send exactly one of the two.
  • Send version as you last read it from Get Exotic Orders (TP/SL) (or from the response that created it). If the TP/SL has changed since, because it fired or another update got there first, the request is refused with VERSION_CONFLICT: read it again and retry.
  • Send take_profit, stop_loss or both. A level you leave out stays as it is, and null removes it. Removing the last level cancels the TP/SL (TP_SL_REMOVED): the response then carries cancelled: true.
  • A new level on the wrong side of the live price is refused with TPSL_OUTSIDE_PRICE_BAND.
  • slippage_bps and tpsl_mode cannot be changed: cancel the TP/SL and create it again, or for a position TP/SL create a new one with tpsl_force.
  • A TP/SL that is TRIGGERED is placing its close and cannot be updated.

If a replacement position TP/SL is still PENDING next to the ACTIVE one (see Create Order), instrument_code may pick either: use client_id.

EXOTIC_ORDER_UPDATED follows on the WebSocket ACCOUNT channel.

Authorization

bearerAuth
headerAuthorizationBearer <token>

API key created in the One Trading UI, sent as Authorization: Bearer <token>. Each endpoint lists the key permission it needs.

Request Body

application/json
  1. body
client_id?string

The TP/SL to update. Send this or instrument_code, not both.

Formatuuid
instrument_code?string

Update the position TP/SL on this instrument. Send this or client_id, not both.

version*integer

The version you last read. The update applies only if the TP/SL has not changed since.

Range0 <= value
take_profit?|

Take profit level. null removes the take profit. Leave the field out to keep it as it is.

stop_loss?|

Stop loss level. null removes the stop loss. Leave the field out to keep it as it is.

Response Body

OK

application/json
  1. response
order*

A take profit / stop loss.

cancelled?boolean

Present, as true, only when the update removed the last level and so cancelled the TP/SL.

curl -X PATCH 'https://api.onetrading.com/fast/v2/account/exotic-orders' \  -H 'Content-Type: application/json' \  -d '{  "instrument_code": "BTC_USD_P",  "version": 2,  "stop_loss": {    "value": "66500",    "type": "MID"  }}'
Example Response
{  "order": {    "client_id": "0d0b1f0c-7f0e-4f55-9a53-6f6f3c1c2a10",    "instrument_code": "BTC_USD_P",    "order_kind": "TPSL",    "tpsl_mode": "position",    "status": "ACTIVE",    "take_profit": null,    "stop_loss": {      "value": "66500",      "type": "MID"    },    "slippage_bps": 500,    "version": 3,    "side": "BUY",    "market_type": "FUTURES",    "position_id": "1b0f6f5e-2a59-4f0a-9d0e-5f7f3f0f6a11",    "order_id": null,    "type": "MARKET",    "price": null,    "filled_amount": "1.5",    "tp_client_id": "c2a7a1de-6d0b-11f0-8de9-0242ac120002",    "sl_client_id": "1f06d0b6-a7a1-6e20-8de9-0242ac120002",    "created_at": "2026-11-16T10:15:00.000Z",    "filled_at": "2026-11-16T10:15:00.000Z",    "completed_at": null,    "cancelled_at": null  }}