One Trading API
REST API
WebSocket API
REST API
WebSocket API
  1. Trading
  • Public
    • Currencies
      GET
    • Instruments
      GET
    • Candlesticks
      GET
    • Fee Groups
      GET
    • Order Book
      GET
    • Market Ticker
      GET
    • Market Ticker For Instrument
      GET
    • Time
      GET
  • Trading
    • Get Orders
      GET
    • Create Order
      POST
    • Get Order by Client ID
      GET
    • Get Order by Order ID
      GET
    • Balances
      GET
    • Subaccounts
      GET
    • Fees
      GET
    • Get Trades for Order
      GET
    • Get Trade by Trade ID
      GET
    • Get Trades
      GET
    • Cancel All Orders
      DELETE
    • Cancel Order by Order ID
      DELETE
    • Cancel Order by Client ID
      DELETE
    • Get Exotic Orders (TP/SL)
      GET
    • Create Exotic Order (TP/SL)
      POST
    • Update Exotic Order (TP/SL)
      PATCH
    • Cancel Exotic Order (TP/SL)
      DELETE
  • Futures
    • Introduction
    • Funding Rate Methodology
    • Funding Payments
      GET
    • Positions
      GET
    • Position Funding Payments
      GET
    • Funding Rate Settings
      GET
    • Get Futures Open Positions
      GET
    • Futures Portfolio Summary
      GET
    • Current Funding Rate
      GET
    • Funding Rate History
      GET
    • Funding Schedule
      GET
  • Funding
    • Transfer Subaccount Balance
      POST
    • Get Transactions
      GET
    • Get Deposit Addresses
      GET
    • Create Deposit Address
      POST
  1. Trading

Create Exotic Order (TP/SL)

POST
https://api.onetrading.com/fast/v2/account/exotic-orders

Create an Exotic Order (TP/SL)#

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).
Creates an exotic order: a take profit and/or stop loss (TP/SL) on an order you have already placed, or on an open position. To place a new order with a TP/SL attached, use Create Order instead.
The TP/SL is held in a separate service, not on the exchange itself, which watches its levels against the live price. When one is reached, a reduce-only limit order is placed on the exchange to close for you; a TP/SL with both levels is one order, so when one level fires the other goes with it.

Position mode (tpsl_mode: "position")#

Protects the whole position on instrument_code, futures only. Leave client_id out: the TP/SL is ACTIVE at once, and when a level is reached it closes the position as it is then. Without an open position the request is refused with POSITION_NOT_FOUND.
There is one position TP/SL per instrument. A second is refused with POSITION_TPSL_EXISTS unless tpsl_force is true, which replaces the existing one (it is cancelled with FORCE_REPLACED). To change the levels of the one you have, use Update Exotic Order (TP/SL).

Order mode (tpsl_mode: "order", the default)#

Protects one order: client_id is required and must be the client_id of an order on the account, otherwise the request is refused with ORDER_NOT_FOUND. The TP/SL is PENDING until that order fills, then closes its filled amount. If the order has already filled, send status: "ACTIVE" to arm it now. If the order is cancelled or rejected before it fills, the TP/SL is cancelled with it.
On a spot market a TP/SL is order mode only and protects a BUY: it sells what was bought.

Levels and close price#

At least one of take_profit or stop_loss.
For a long, the take profit must be above the current price and the stop loss below it; the other way round for a short. A TP/SL that arms at once with a level on the wrong side is refused with TPSL_OUTSIDE_PRICE_BAND. One that arms later is checked then, and cancelled with VALIDATION_FAILED_AT_ACTIVATION if a level has already been reached.
The close is a limit order at the level less slippage_bps when selling, or plus it when buying. It fills at the book's better prices up to that limit, and never worse. A stop loss the market gaps through by more than its slippage fills nothing and leaves the position open.
Every change of state is sent on the WebSocket ACCOUNT channel.

Request

Authorization
Provide your bearer token in the
Authorization
header when making requests to protected resources.
Example:
Authorization: Bearer ********************
Body Params application/jsonRequired

Examples

Responses

🟢201Created
application/json
Bodyapplication/json

🟠400Bad Request
🟠401Unauthorized
🟠403Forbidden
🟠404Not Found
🟠409Conflict
🟠429Too Many Requests
🔴500Server Error
🔴503Service Unavailable
Request Request Example
Shell
JavaScript
Java
Swift
cURL
curl --location 'https://api.onetrading.com/fast/v2/account/exotic-orders' \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '{
    "instrument_code": "BTC_USD_P",
    "tpsl_mode": "position",
    "stop_loss": {
        "value": "65000",
        "type": "MID"
    }
}'
Response Response Example
201 - Success Example
{
    "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": "65000",
            "type": "MID"
        },
        "slippage_bps": 500,
        "version": 1,
        "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
    }
}
Previous
Get Exotic Orders (TP/SL)
Next
Update Exotic Order (TP/SL)
Built with