> ## 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.

# Open a market position or place a pending order

> Opens a market position or places a pending limit/stop order. If `price` is omitted, the order executes at market price immediately. If `price` is set, a pending order is created that triggers when the market reaches that price.



## OpenAPI

````yaml /openapi-readme.json post /trading/positions
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:
    post:
      tags:
        - trading
      summary: Open a market position or place a pending order
      description: >-
        Opens a market position or places a pending limit/stop order. If `price`
        is omitted, the order executes at market price immediately. If `price`
        is set, a pending order is created that triggers when the market reaches
        that price.
      operationId: placeOrder
      requestBody:
        required: true
        content:
          application/json:
            schema:
              type: object
              properties:
                symbol:
                  type: string
                  description: Trading symbol, for example XAUUSD, EURUSD, or AAPL.
                side:
                  type: string
                  enum:
                    - buy
                    - sell
                  description: Trade direction. Use 'buy' to go long, 'sell' to go short.
                type:
                  type: string
                  enum:
                    - unit
                    - amount
                  description: >-
                    Unit of the `amount` field. Use 'unit' when amount is
                    expressed in instrument units (e.g. 0.1 lots). Use 'amount'
                    when expressed in money (e.g. 1000 USD).
                amount:
                  type: number
                  minimum: 0
                  description: Size of the trade in the units specified by `type`.
                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.
                price:
                  type: number
                  minimum: 0
                  description: >-
                    Optional limit/stop order trigger price. Omit for a market
                    order.
                slAmount:
                  type: number
                  description: Stop Loss amount (for amount type)
                tpAmount:
                  type: number
                  description: Take Profit amount (for amount type)
                comment:
                  type: string
                  description: Optional comment or note for the order.
              required:
                - symbol
                - side
                - type
                - amount
              additionalProperties: false
      responses:
        '200':
          description: Default Response
          content:
            application/json:
              schema:
                type: object
                properties:
                  success:
                    type: boolean
                  orderId:
                    type: string
                  err:
                    type: string
                  message:
                    type: string
                required:
                  - success
                additionalProperties: false
        '400':
          description: Default Response
          content:
            application/json:
              schema:
                type: object
                properties:
                  success:
                    type: boolean
                  orderId:
                    type: string
                  err:
                    type: string
                  message:
                    type: string
                required:
                  - success
                additionalProperties: false
        '500':
          description: Default Response
          content:
            application/json:
              schema:
                type: object
                additionalProperties: true
      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.