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

# Create an order

> 
 Creates a new order for an internal currency exchange and/or for an outbound payment,
 using an [existing quote](https://docs.equalsmoney.com/openapi/em-budgets/operation/quoteOrders/#tag/Payments/operation/quoteOrders).
    



## OpenAPI

````yaml /autogenerated/openapi/budgets.openapi.json post /orders/trade
openapi: 3.1.0
info:
  title: Budgets API
  version: 2.0.0
  description: Version 2
  license:
    name: UNLICENSED
    url: https://docs.equalsmoney.com
servers:
  - url: https://api.equalsmoney.com/v2
    description: Production
  - url: https://api-sandbox.equalsmoney.com/v2
    description: Sandbox
security: []
paths:
  /orders/trade:
    post:
      tags:
        - Payments
      summary: Create an order
      description: |2-

         Creates a new order for an internal currency exchange and/or for an outbound payment,
         using an [existing quote](https://docs.equalsmoney.com/openapi/em-budgets/operation/quoteOrders/#tag/Payments/operation/quoteOrders).
            
      operationId: tradeOrders
      parameters:
        - name: accountId
          in: query
          schema:
            description: The ID of the account to work with.
            type:
              - string
            example: F50091
          required: true
      requestBody:
        description: Body
        content:
          application/json:
            schema:
              oneOf:
                - type:
                    - object
                  properties:
                    orderId:
                      type:
                        - string
                      description: >-
                        The ```orderId``` that was returned in the currency
                        quote.
                    quoteRequestId:
                      type:
                        - string
                      description: >-
                        The ```quoteRequestId``` that was returned in the
                        currency quote.
                    payments:
                      type:
                        - object
                      properties:
                        amount:
                          type:
                            - number
                          description: The amount that the recipient will receive.
                        currency:
                          type:
                            - object
                          properties:
                            budgetId:
                              type:
                                - string
                              format: uuid
                              maxLength: 36
                              description: The ID of the budget to work with.
                              example: 775596ae-2624-40af-a9dc-9756110a4a03
                            currencyCode:
                              description: The currency code, in ISO-4217 format.
                              type:
                                - string
                              pattern: ^[A-Z]{3}$
                              example: USD
                          required:
                            - budgetId
                            - currencyCode
                          description: Details about the currency.
                        recipientId:
                          type:
                            - string
                          description: >-
                            The ID of the recipient that you're sending the
                            payment to.
                        internalReference:
                          type:
                            - string
                          maxLength: 256
                          description: The payment reference that you see.
                        externalReference:
                          type:
                            - string
                          maxLength: 256
                          description: The payment reference that the recipient sees.
                      required:
                        - amount
                        - currency
                        - recipientId
                  required:
                    - orderId
                    - quoteRequestId
                    - payments
                - type:
                    - object
                  properties:
                    orderId:
                      type:
                        - string
                      description: >-
                        The ```orderId``` that was returned in the currency
                        quote.
                    quoteRequestId:
                      type:
                        - string
                      description: >-
                        The ```quoteRequestId``` that was returned in the
                        currency quote.
                    moveMoneyRequestId:
                      type:
                        - string
                      format: uuid
                      description: The ID of the move money request.
                  required:
                    - orderId
                    - quoteRequestId
            examples:
              Variant1:
                value:
                  orderId: string
                  quoteRequestId: string
                  payments:
                    amount: 0
                    currency:
                      budgetId: 775596ae-2624-40af-a9dc-9756110a4a03
                      currencyCode: USD
                    recipientId: string
                    internalReference: string
                    externalReference: string
              Variant2:
                value:
                  orderId: string
                  quoteRequestId: string
                  moveMoneyRequestId: 3e76949a-6212-4461-a828-33657c69bca9
      responses:
        '200':
          description: OK
          content:
            application/json:
              schema:
                type:
                  - object
                properties:
                  orderId:
                    type:
                      - string
                    description: The ID of the order.
                    example: EABCDE6FGHI0
                  bank:
                    type:
                      - string
                    description: The bank.
                    example: BANK
                  settlement:
                    type:
                      - object
                    properties:
                      date:
                        type:
                          - string
                        pattern: ^20[0-9]{2}[0-2][0-9][0-3][0-9]$
                        description: ' The settlement date.'
                        example: '20221027'
                      price:
                        type:
                          - object
                        properties:
                          amount:
                            type:
                              - number
                            example: 5
                          currency:
                            type:
                              - string
                            example: USD
                        description: Details about the price.
                      charges:
                        type:
                          - object
                        properties:
                          fee:
                            type:
                              - number
                            description: The fee.
                            example: 0
                          margin:
                            type:
                              - number
                            description: The margin.
                            example: 0
                          other:
                            type:
                              - number
                            description: The additional charges.
                            example: 0
                        description: Details about the charges.
                    description: Details about the settlement.
                  trade:
                    type:
                      - object
                    properties:
                      rate:
                        type:
                          - number
                        description: The rate.
                        example: 1
                      inverseRate:
                        type:
                          - number
                        description: The inverse rate.
                        example: 1
                      from:
                        type:
                          - object
                        properties:
                          amount:
                            type:
                              - number
                            example: 5
                          currency:
                            description: The currency code, in ISO-4217 format.
                            type:
                              - string
                            pattern: ^[A-Z]{3}$
                            example: USD
                        description: Details about the source currency.
                      to:
                        type:
                          - object
                        properties:
                          amount:
                            type:
                              - number
                            example: 5
                          currency:
                            description: The currency code, in ISO-4217 format.
                            type:
                              - string
                            pattern: ^[A-Z]{3}$
                            example: USD
                        description: Details about the target currency.
                    description: Details about the quote.
                required:
                  - trade
                example:
                  orderId: EABCDE6FGHI0
                  bank: BANK
                  settlement:
                    date: '20221027'
                    price:
                      amount: 5
                      currency: USD
                    charges:
                      fee: 0
                      margin: 0
                      other: 0
                  trade:
                    rate: 1
                    inverseRate: 1
                    from:
                      amount: 5
                      currency: USD
                    to:
                      amount: 5
                      currency: USD
      security:
        - CommonAuth:
            - orders:create:any
      x-codeSamples:
        - lang: Shell
          label: cURL
          source: |-
            curl --request POST \
              --url 'https://api.equalsmoney.com/v2/orders/trade?accountId={{accountId}}' \
              --header 'Authorization: <api-key>'
components:
  securitySchemes:
    CommonAuth:
      type: apiKey
      in: header
      name: Authorization

````