# Get Exotic Orders (TP/SL)

## OpenAPI Specification

```yaml
openapi: 3.0.1
info:
  title: ''
  description: ''
  version: 1.0.0
paths:
  /v2/account/exotic-orders:
    get:
      summary: Get Exotic Orders (TP/SL)
      deprecated: false
      description: >-
        ## Get Exotic Orders (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`).


        Returns the account's exotic orders, its take profit / stop loss orders
        (TP/SLs), that are still live: `PENDING`, `ACTIVE` or `TRIGGERED`. This
        is where a TP/SL attached with [Create
        Order](https://docs.onetrading.com/rest/trading/create-order.md) is read
        back: it is held in a separate service, not on the exchange itself,
        until a level is reached, so it never appears in Get Orders.


        - With no parameters, every live TP/SL of the account, a page at a time:
        pass the `cursor` of one page to get the next.

        - `instrument_code` and `status` narrow the list. A narrowed list is
        returned in one page, and its `cursor` is `null`.

        - `client_id` returns that one TP/SL in `orders`, whatever its status,
        finished ones included. The other parameters are ignored.


        Each TP/SL carries a `version`, which Update Exotic Order (TP/SL) needs.
      tags:
        - One Trading Public REST API/Trading
      parameters:
        - name: client_id
          in: query
          description: >-
            Return this one TP/SL, in any status. For a TP/SL attached to an
            order, the order's `client_id`.
          required: false
          schema:
            type: string
            format: uuid
        - name: instrument_code
          in: query
          description: Only TP/SLs on this instrument.
          required: false
          example: BTC_USD_P
          schema:
            type: string
        - name: status
          in: query
          description: Only TP/SLs in this status.
          required: false
          schema:
            type: string
            enum:
              - PENDING
              - ACTIVE
              - TRIGGERED
        - name: limit
          in: query
          description: The most TP/SLs to return, from 1 to 100.
          required: false
          schema:
            type: integer
            minimum: 1
            maximum: 100
        - name: cursor
          in: query
          description: The `cursor` of the previous page.
          required: false
          schema:
            type: string
      responses:
        '200':
          x-apidog-name: Success
          description: ''
          content:
            application/json:
              schema:
                type: object
                properties:
                  orders:
                    type: array
                    items:
                      type: object
                      description: A take profit / stop loss.
                      properties:
                        client_id:
                          type: string
                          format: uuid
                          description: >-
                            Identifier of the TP/SL: use it to read, update or
                            cancel it. For a TP/SL attached to an order, it is
                            that order's `client_id`.
                        instrument_code:
                          type: string
                          description: The instrument, e.g. `BTC_USD_P`.
                        order_kind:
                          type: string
                          enum:
                            - TPSL
                          description: Always `TPSL`.
                        tpsl_mode:
                          type: string
                          enum:
                            - order
                            - position
                          description: >-
                            `order`: closes the filled amount of the order it
                            protects. `position`: closes the whole position on
                            the instrument, as it is when a level is reached.
                        status:
                          type: string
                          enum:
                            - PENDING
                            - ACTIVE
                            - TRIGGERED
                            - COMPLETE
                            - CANCELLED
                          description: >-
                            Status of the TP/SL.

                            - `PENDING`: waiting for the order it is attached to
                            to fill.

                            - `ACTIVE`: armed, its levels are watched against
                            the live price.

                            - `TRIGGERED`: a level was reached and its close is
                            being placed. It cannot be updated or cancelled.

                            - `COMPLETE`: its close finished.

                            - `CANCELLED`: finished without closing. The
                            `EXOTIC_ORDER_CANCELLED` WebSocket message carries
                            the reason.
                        take_profit:
                          type: object
                          description: Take profit level, `null` when the TP/SL has none.
                          properties:
                            value:
                              type: string
                              description: The level, as a positive decimal string.
                              examples:
                                - '78000'
                            type:
                              type: string
                              enum:
                                - MID
                                - BBO
                              description: >-
                                The price the level is watched against. `MID`:
                                the midpoint of the best bid and the best ask.
                                `BBO`: the side of the book the close hits, the
                                best bid for a long, the best ask for a short.
                          required:
                            - value
                            - type
                          x-apidog-orders:
                            - value
                            - type
                          nullable: true
                        stop_loss:
                          type: object
                          description: Stop loss level, `null` when the TP/SL has none.
                          properties:
                            value:
                              type: string
                              description: The level, as a positive decimal string.
                              examples:
                                - '78000'
                            type:
                              type: string
                              enum:
                                - MID
                                - BBO
                              description: >-
                                The price the level is watched against. `MID`:
                                the midpoint of the best bid and the best ask.
                                `BBO`: the side of the book the close hits, the
                                best bid for a long, the best ask for a short.
                          required:
                            - value
                            - type
                          x-apidog-orders:
                            - value
                            - type
                          nullable: true
                        slippage_bps:
                          type: integer
                          description: >-
                            How far from its level the close may trade, in basis
                            points. Set when the TP/SL is created; it cannot be
                            changed.
                          nullable: true
                        version:
                          type: integer
                          description: >-
                            Changes each time the TP/SL changes. Send the value
                            you last read when you update it.
                        side:
                          type: string
                          enum:
                            - BUY
                            - SELL
                            - UNKNOWN
                          description: >-
                            Side of the order or position the TP/SL protects
                            (`BUY`: long, `SELL`: short). `UNKNOWN` while it is
                            `PENDING`.
                          nullable: true
                        market_type:
                          type: string
                          enum:
                            - SPOT
                            - FUTURES
                          description: The kind of market the instrument is.
                          nullable: true
                        position_id:
                          type: string
                          description: >-
                            The futures position an `ACTIVE` TP/SL protects.
                            `null` while it is `PENDING`, and on spot.
                          nullable: true
                        order_id:
                          type: string
                          description: >-
                            Exchange `order_id` of the order the TP/SL protects,
                            when known.
                          nullable: true
                        type:
                          type: string
                          enum:
                            - MARKET
                            - LIMIT
                          description: >-
                            Informational. `LIMIT` when the TP/SL armed from an
                            order that had already filled, otherwise `MARKET`. A
                            close is always sent as a limit order.
                          nullable: true
                        price:
                          type: string
                          description: >-
                            Price of the order the TP/SL protects, when it armed
                            from one. `null` otherwise.
                          nullable: true
                        filled_amount:
                          type: string
                          description: >-
                            Order mode: the filled amount of the protected
                            order, which is what the TP/SL closes. Position
                            mode: the size of the position when the TP/SL armed;
                            it closes the position as it is when a level is
                            reached. `"0"` while `PENDING`.
                        tp_client_id:
                          type: string
                          description: >-
                            `client_id` of the close order placed when the take
                            profit fires on a spot market. The orders of a
                            futures close have their own ids, listed in
                            `EXOTIC_ORDER_TRIGGERED`.
                          nullable: true
                        sl_client_id:
                          type: string
                          description: As `tp_client_id`, for the stop loss.
                          nullable: true
                        created_at:
                          type: string
                          format: date-time
                          description: When the TP/SL was created.
                        filled_at:
                          type: string
                          format: date-time
                          description: When it became `ACTIVE`.
                          nullable: true
                        completed_at:
                          type: string
                          format: date-time
                          description: When it became `COMPLETE`.
                          nullable: true
                        cancelled_at:
                          type: string
                          format: date-time
                          description: When it was cancelled.
                          nullable: true
                      x-apidog-orders:
                        - client_id
                        - instrument_code
                        - order_kind
                        - tpsl_mode
                        - status
                        - take_profit
                        - stop_loss
                        - slippage_bps
                        - version
                        - side
                        - market_type
                        - position_id
                        - order_id
                        - type
                        - price
                        - filled_amount
                        - tp_client_id
                        - sl_client_id
                        - created_at
                        - filled_at
                        - completed_at
                        - cancelled_at
                      required:
                        - client_id
                        - instrument_code
                        - order_kind
                        - tpsl_mode
                        - status
                        - take_profit
                        - stop_loss
                        - slippage_bps
                        - version
                        - side
                        - market_type
                        - position_id
                        - order_id
                        - type
                        - price
                        - filled_amount
                        - tp_client_id
                        - sl_client_id
                        - created_at
                        - filled_at
                        - completed_at
                        - cancelled_at
                    description: The TP/SLs. Empty when there are none.
                  cursor:
                    type: string
                    description: >-
                      Pass it as `cursor` to get the next page. `null` on the
                      last page, and on a list narrowed by `instrument_code`,
                      `status` or `client_id`.
                    nullable: true
                required:
                  - orders
                  - cursor
                x-apidog-orders:
                  - orders
                  - cursor
              example:
                orders:
                  - 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: 2
                    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
                cursor: null
          headers: {}
        '400':
          x-apidog-name: Bad Request
          description: >-
            A query parameter is invalid. An unknown parameter is refused with
            `INVALID_PARAMETERS`.
          content:
            application/json:
              schema:
                type: object
                properties:
                  error:
                    type: string
                    description: Error code.
                  error_message:
                    type: string
                    description: Human-readable detail.
                required:
                  - error
                  - error_message
                x-apidog-orders:
                  - error
                  - error_message
              examples:
                '1':
                  summary: Invalid client ID
                  value:
                    error: INVALID_CLIENT_ID
                    error_message: client_id must be a UUID
                '2':
                  summary: Invalid status
                  value:
                    error: INVALID_STATUS_FILTER
                    error_message: status must be one of PENDING, ACTIVE, TRIGGERED
                '3':
                  summary: Invalid limit
                  value:
                    error: INVALID_LIMIT
                    error_message: >-
                      The limit parameter must be a positive integer and not
                      exceed the maximum allowed value
                '4':
                  summary: Invalid cursor
                  value:
                    error: INVALID_CURSOR
                    error_message: The cursor parameter is invalid or malformed
                '5':
                  summary: Unknown parameter
                  value:
                    error: INVALID_PARAMETERS
                    error_message: One or more parameters are invalid
          headers: {}
        '401':
          x-apidog-name: Unauthorized
          description: >-
            The token was rejected: `UNAUTHORIZED`, or
            `INVALID_REQUEST_SIGNATURE` when the API key requires signed
            requests and the signature is missing or invalid.
          content:
            application/json:
              schema:
                type: object
                properties:
                  error:
                    type: string
                    description: Error code.
                  error_message:
                    type: string
                    description: Human-readable detail.
                required:
                  - error
                  - error_message
                x-apidog-orders:
                  - error
                  - error_message
              examples:
                '1':
                  summary: Unauthorized
                  value:
                    error: UNAUTHORIZED
                    error_message: Unauthorized access
                '2':
                  summary: Invalid signature
                  value:
                    error: INVALID_REQUEST_SIGNATURE
                    error_message: The request signature is missing or invalid
          headers: {}
        '403':
          x-apidog-name: Forbidden
          description: >-
            Either the gateway rejected the token (`{"message":"Forbidden"}`),
            the API key lacks the `TRADE` scope or the account is not active
            (`PERMISSION_DENIED`), or the account has no exchange account
            (`EXCHANGE_ACCOUNT_NOT_PROVISIONED`).
          content:
            application/json:
              schema:
                oneOf:
                  - type: object
                    properties:
                      error:
                        type: string
                        description: Error code.
                      error_message:
                        type: string
                        description: Human-readable detail.
                    required:
                      - error
                      - error_message
                    x-apidog-orders:
                      - error
                      - error_message
                  - type: object
                    properties:
                      message:
                        type: string
                    required:
                      - message
                    x-apidog-orders:
                      - message
              examples:
                '1':
                  summary: Gateway
                  value:
                    message: Forbidden
                '2':
                  summary: Missing scope, or account not active
                  value:
                    error: PERMISSION_DENIED
                    error_message: Permission denied
                '3':
                  summary: Not provisioned
                  value:
                    error: EXCHANGE_ACCOUNT_NOT_PROVISIONED
                    error_message: >-
                      The account is authenticated but has no exchange account
                      yet
          headers: {}
        '404':
          x-apidog-name: Not Found
          description: No TP/SL has this `client_id`.
          content:
            application/json:
              schema:
                type: object
                properties:
                  error:
                    type: string
                    description: Error code.
                  error_message:
                    type: string
                    description: Human-readable detail.
                required:
                  - error
                  - error_message
                x-apidog-orders:
                  - error
                  - error_message
              examples:
                '1':
                  summary: Not found
                  value:
                    error: ORDER_NOT_FOUND
                    error_message: The requested order was not found
          headers: {}
        '429':
          x-apidog-name: Too Many Requests
          description: >-
            Rate limit exceeded. Limits are per account holder per minute: 600
            (retail), 2,000 (institutional), 10,000 (market maker).
          content:
            application/json:
              schema:
                type: object
                properties:
                  error:
                    type: string
                    description: Error code.
                  error_message:
                    type: string
                    description: Human-readable detail.
                required:
                  - error
                  - error_message
                x-apidog-orders:
                  - error
                  - error_message
              examples:
                '1':
                  summary: Too many requests
                  value:
                    error: TOO_MANY_REQUESTS
                    error_message: Too many requests
          headers: {}
        '500':
          x-apidog-name: Server Error
          description: >-
            The request could not be completed. It is safe to read the TP/SL
            again before retrying.
          content:
            application/json:
              schema:
                type: object
                properties:
                  error:
                    type: string
                    description: Error code.
                  error_message:
                    type: string
                    description: Human-readable detail.
                required:
                  - error
                  - error_message
                x-apidog-orders:
                  - error
                  - error_message
              examples:
                '1':
                  summary: Server error
                  value:
                    error: SERVER_ERROR
                    error_message: An internal server error occurred
          headers: {}
      security: []
      x-apidog-folder: One Trading Public REST API/Trading
      x-apidog-status: released
      x-run-in-apidog: https://app.eu.apidog.com/web/project/349694/apis/api-4589055-run
components:
  schemas: {}
  securitySchemes:
    bearerAuth:
      type: bearer
      scheme: bearer
      description: >-
        API key issued to the account holder, sent as `Authorization: Bearer
        <token>`. The key must hold the `SUBACCOUNT_TRANSFER` scope.
    bearer:
      type: bearer
      scheme: bearer
servers:
  - url: https://api.onetrading.com/fast
    description: Production Env
security: []

```