> ## Documentation Index
> Fetch the complete documentation index at: https://docs.finhost.io/llms.txt
> Use this file to discover all available pages before exploring further.

# Create order

> Asynchronous operation. The order may not be available in the orders list immediately after the response.



## OpenAPI

````yaml post /orders
openapi: 3.1.0
info:
  title: Crypto Exchange API
  description: Crypto Exchange API
  version: 1.0.0
servers:
  - url: https://api.sandbox1-dev.finhost.io/crypto-exchange
  - url: https://api.sandbox1-stage.finhost.io/crypto-exchange
security: []
tags:
  - name: default
  - name: orders
paths:
  /orders:
    post:
      tags:
        - orders
      summary: Create order
      description: >-
        Asynchronous operation. The order may not be available in the orders
        list immediately after the response.
      parameters:
        - description: Company ID
          name: companyId
          in: query
          required: false
          schema:
            type: string
            format: uuid
      requestBody:
        required: true
        content:
          application/json:
            schema:
              type: object
              additionalProperties: false
              required:
                - pair
                - side
                - volume
                - settings
              properties:
                pair:
                  description: Order pair
                  type: string
                  pattern: ^[a-zA-Z0-9]{1,16}\/[a-zA-Z0-9]{1,16}$
                  examples:
                    - USDT/EUR
                    - BTC/EUR
                    - 1INCH/USDT
                side:
                  description: Order side
                  type: string
                  enum:
                    - buy
                    - sell
                volume:
                  type: string
                  minLength: 1
                  maxLength: 36
                  examples:
                    - '42'
                    - '4.2'
                    - '4.20'
                  description: >-
                    Order volume. If BUYING, the volume is in QUOTE currency. If
                    SELLING, the volume is in BASE currency
                settings:
                  oneOf:
                    - description: >-
                        Market order (executes immediately at the current market
                        price)
                      type: object
                      additionalProperties: false
                      required:
                        - type
                        - desiredPrice
                      properties:
                        type:
                          type: string
                          enum:
                            - market
                        desiredPrice:
                          type: string
                          minLength: 1
                          maxLength: 36
                          examples:
                            - '42'
                            - '4.2'
                            - '4.20'
                          description: >-
                            Desired price (the price which user see in
                            application). Used only for slippage protection
                    - description: Limit order (executes when a specified price is reached)
                      type: object
                      additionalProperties: false
                      required:
                        - type
                        - limitPrice
                      properties:
                        type:
                          type: string
                          enum:
                            - limit
                        limitPrice:
                          type: string
                          minLength: 1
                          maxLength: 36
                          examples:
                            - '42'
                            - '4.2'
                            - '4.20'
                          description: Limit price
      responses:
        '200':
          description: OK
          content:
            application/json:
              schema:
                type: object
                additionalProperties: false
                required:
                  - order
                properties:
                  order:
                    type: object
                    additionalProperties: false
                    required:
                      - id
                    properties:
                      id:
                        description: Order ID (uuid version 7)
                        type: string
                        format: uuid
                        examples:
                          - 018e53c4-cd35-7863-be61-924932bfd862
        '400':
          description: Bad request
          content:
            application/json:
              schema:
                oneOf:
                  - description: Invalid data
                    type: object
                    additionalProperties: false
                    required:
                      - code
                      - criteria
                      - reason
                    properties:
                      code:
                        type: string
                        enum:
                          - INVALID_DATA
                      criteria:
                        type: string
                        enum:
                          - path_params
                          - query_params
                          - body
                          - headers
                      reason:
                        type:
                          - string
                          - 'null'
                        examples:
                          - null
                  - description: Profile contract not selected
                    type: object
                    additionalProperties: false
                    required:
                      - code
                    properties:
                      code:
                        type: string
                        enum:
                          - PROFILE_CONTRACT_NOT_SELECTED
                  - description: Profile contract not acceptable
                    type: object
                    additionalProperties: false
                    required:
                      - code
                    properties:
                      code:
                        type: string
                        enum:
                          - PROFILE_CONTRACT_NOT_ACCEPTABLE
                  - description: Profile ADM status not acceptable
                    type: object
                    additionalProperties: false
                    required:
                      - code
                    properties:
                      code:
                        type: string
                        enum:
                          - PROFILE_ADM_STATUS_NOT_ACCEPTABLE
                  - description: Profile KYC status not acceptable
                    type: object
                    additionalProperties: false
                    required:
                      - code
                    properties:
                      code:
                        type: string
                        enum:
                          - PROFILE_KYC_STATUS_NOT_ACCEPTABLE
                  - description: Profile KYB status not acceptable
                    type: object
                    additionalProperties: false
                    required:
                      - code
                    properties:
                      code:
                        type: string
                        enum:
                          - PROFILE_KYB_STATUS_NOT_ACCEPTABLE
                  - description: Account FROM status not acceptable
                    type: object
                    additionalProperties: false
                    required:
                      - code
                    properties:
                      code:
                        type: string
                        enum:
                          - ACCOUNT_FROM_STATUS_NOT_ACCEPTABLE
                  - description: Account TO status not acceptable
                    type: object
                    additionalProperties: false
                    required:
                      - code
                    properties:
                      code:
                        type: string
                        enum:
                          - ACCOUNT_TO_STATUS_NOT_ACCEPTABLE
                  - description: Account insufficient balance
                    type: object
                    additionalProperties: false
                    required:
                      - code
                    properties:
                      code:
                        type: string
                        enum:
                          - ACCOUNT_INSUFFICIENT_BALANCE
                  - description: Pair not found
                    type: object
                    additionalProperties: false
                    required:
                      - code
                    properties:
                      code:
                        type: string
                        enum:
                          - PAIR_NOT_FOUND
                examples:
                  - see Schema for possible responses
        '404':
          description: Not found
          content:
            application/json:
              schema:
                oneOf:
                  - description: Profile not found
                    type: object
                    additionalProperties: false
                    required:
                      - code
                    properties:
                      code:
                        type: string
                        enum:
                          - PROFILE_NOT_FOUND
                  - description: Account from not found
                    type: object
                    additionalProperties: false
                    required:
                      - code
                    properties:
                      code:
                        type: string
                        enum:
                          - ACCOUNT_FROM_NOT_FOUND
                  - description: Account to not found
                    type: object
                    additionalProperties: false
                    required:
                      - code
                    properties:
                      code:
                        type: string
                        enum:
                          - ACCOUNT_TO_NOT_FOUND
                examples:
                  - see Schema for possible responses
      security:
        - bearerAuth: []
components:
  securitySchemes:
    bearerAuth:
      type: http
      scheme: bearer
      bearerFormat: JWT

````