> ## Documentation Index
> Fetch the complete documentation index at: https://readme.amana-dev.com/llms.txt
> Use this file to discover all available pages before exploring further.

# Update stop loss and/or take profit on an open position

> Updates the stop loss and/or take profit levels of an open position. At least one of sl or tp must be provided.



## OpenAPI

````yaml /openapi-readme.json put /trading/positions/{id}
openapi: 3.1.0
info:
  title: Amana API
  version: 1.0.0
  description: API documentation for Amana platform
servers:
  - url: https://gateway.amana.io
    description: Amana app
security: []
tags:
  - name: onboarding
    description: Endpoints related to user onboarding, KYC processes, and account setup.
  - name: auth
    description: Endpoints for user authentication, token management, and session handling.
  - name: trading
    description: >-
      Endpoints related to trading operations, account management, and market
      data retrieval.
  - name: charting
    description: >-
      Endpoints for retrieving historical price data, technical indicators, and
      other charting-related information.
  - name: uaepass
    description: Endpoints for UAE Pass authentication and identity verification.
  - name: alerts
  - name: cms
  - name: dw
  - name: events
  - name: geo-location
  - name: high-leverage
  - name: kyc
  - name: mt
  - name: nafath
  - name: payments
  - name: promo-codes
  - name: smart-money
  - name: support
  - name: symbols
  - name: trading-accounts
  - name: transactions
  - name: user
  - name: watchlists
paths:
  /trading/positions/{id}:
    put:
      tags:
        - trading
      summary: Update stop loss and/or take profit on an open position
      description: >-
        Updates the stop loss and/or take profit levels of an open position. At
        least one of sl or tp must be provided.
      operationId: modifyPosition
      parameters:
        - schema:
            type: string
          in: path
          name: id
          required: true
          description: Unique identifier of the position or order to act on.
      requestBody:
        required: true
        content:
          application/json:
            schema:
              type: object
              properties:
                sl:
                  type: number
                  minimum: 0
                  description: >-
                    Optional stop loss price. The position will automatically
                    close if the market reaches this level.
                tp:
                  type: number
                  minimum: 0
                  description: >-
                    Optional take profit price. The position will automatically
                    close in profit if the market reaches this level.
                slAmount:
                  type: number
                  minimum: 0
                  description: >-
                    Optional (c2c only) stop loss amount. The position will
                    automatically close if pnl reach that much
                tpAmount:
                  type: number
                  minimum: 0
                  description: >-
                    Optional (c2c only) take profit amount. The position will
                    automatically close if pnl reach that much
              additionalProperties: false
      responses:
        '200':
          description: Default Response
      security:
        - bearerAuth: []
components:
  securitySchemes:
    bearerAuth:
      type: http
      scheme: bearer
      bearerFormat: JWT
      description: JWT token obtained from authentication endpoints

````

This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.