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

# Create FX trade

> Creates a cross-currency trade



## OpenAPI

````yaml openapi/cross-currency.yaml post /v1/exchange/trades
openapi: 3.0.2
info:
  version: ${version}
  title: Cross-Currency API
  description: >
    The Circle Cross-Currency API allows you to exchange fiat for USDC and
    exchange USDC for EURC.
servers:
  - url: https://api-sandbox.circle.com
  - url: https://api.circle.com
security: []
tags:
  - name: Trades
    description: Execute currency exchange trades.
  - name: Payments
    description: Payment endpoints.
  - name: Settlements
    description: Settlement endpoints
paths:
  /v1/exchange/trades:
    post:
      tags:
        - Trades
      summary: Create FX trade
      description: Creates a cross-currency trade
      operationId: createFxTrade
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/FxTradeRequest'
      responses:
        '200':
          description: Successfully created trade.
          headers:
            X-Request-Id:
              $ref: '#/components/headers/XRequestId'
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/CreateFxTradeResponse'
              examples:
                response:
                  value:
                    data:
                      id: b8627ae8-732b-4d25-b947-1df8f4007a29
                      from:
                        amount: '3.14'
                        currency: USDC
                      to:
                        amount: '3.14'
                        currency: USDC
                      status: pending
                      createDate: '2020-04-10T02:13:30.000Z'
                      updateDate: '2020-04-10T02:13:30.000Z'
                      quoteId: b8627ae8-732b-4d25-b947-1df8f4007a29
        '400':
          $ref: '#/components/responses/BadRequest'
        '401':
          $ref: '#/components/responses/NotAuthorized'
        '404':
          $ref: '#/components/responses/NotFound'
      security:
        - bearerAuth: []
components:
  schemas:
    FxTradeRequest:
      type: object
      required:
        - idempotencyKey
        - quoteId
      properties:
        idempotencyKey:
          $ref: '#/components/schemas/IdempotencyKey'
        quoteId:
          $ref: '#/components/schemas/Id'
    CreateFxTradeResponse:
      title: CreateFxTradeResponse
      properties:
        data:
          type: object
          properties:
            id:
              $ref: '#/components/schemas/Id'
            from:
              $ref: '#/components/schemas/FxMoney'
            to:
              $ref: '#/components/schemas/FxMoney'
            status:
              $ref: '#/components/schemas/TradeStatus'
            createDate:
              $ref: '#/components/schemas/UtcTimestamp'
            updateDate:
              $ref: '#/components/schemas/UtcTimestamp'
            quoteId:
              $ref: '#/components/schemas/Id'
    IdempotencyKey:
      type: string
      description: >-
        Universally unique identifier (UUID v4) idempotency key. This key is
        utilized to ensure exactly-once execution of mutating requests.
      format: uuid
      example: ba943ff1-ca16-49b2-ba55-1057e70ca5c7
    Id:
      type: string
      description: Unique system generated identifier for the entity.
      format: uuid
      example: b8627ae8-732b-4d25-b947-1df8f4007a29
    FxMoney:
      type: object
      required:
        - amount
        - currency
      properties:
        amount:
          description: Magnitude of the amount, in units of the currency, with a `.`.
          type: string
          example: '3.14'
        currency:
          $ref: '#/components/schemas/FxCurrency'
    TradeStatus:
      type: string
      description: Status of the trade.
      enum:
        - pending
        - confirmed
        - failed
        - complete
        - pending_settlement
    UtcTimestamp:
      type: string
      description: ISO-8601 UTC date/time format.
      example: '2020-04-10T02:13:30.000Z'
    FxCurrency:
      type: string
      enum:
        - USDC
        - EURC
        - MXN
        - BRL
  headers:
    XRequestId:
      description: >-
        Universally unique identifier (UUID v4) for the request. Helpful for
        identifying a request when communicating with Circle support.
      schema:
        type: string
        format: uuid
        example: 2adba88e-9d63-44bc-b975-9b6ae3440dde
  responses:
    BadRequest:
      description: The request cannot be processed due to a client error.
      headers:
        X-Request-Id:
          $ref: '#/components/headers/XRequestId'
      content:
        application/json:
          schema:
            type: object
            title: BadRequest
            required:
              - code
              - message
            properties:
              code:
                type: integer
                example: 400
              message:
                type: string
                example: Something went wrong.
            example:
              code: 400
              message: Bad request.
          examples:
            response:
              value:
                code: 400
                message: Bad request.
    NotAuthorized:
      description: >-
        The request has not been applied because it lacks valid authentication
        credentials.
      headers:
        X-Request-Id:
          $ref: '#/components/headers/XRequestId'
      content:
        application/json:
          schema:
            type: object
            title: NotAuthorized
            required:
              - code
              - message
            properties:
              code:
                type: integer
                example: 400
              message:
                type: string
                example: Something went wrong.
            example:
              code: 401
              message: Malformed authorization.
          examples:
            response:
              value:
                code: 401
                message: Malformed authorization.
    NotFound:
      description: The specified resource was not found.
      headers:
        X-Request-Id:
          $ref: '#/components/headers/XRequestId'
      content:
        application/json:
          schema:
            type: object
            title: NotFound
            required:
              - code
              - message
            properties:
              code:
                type: integer
                example: 400
              message:
                type: string
                example: Something went wrong.
            example:
              code: 404
              message: Not found.
          examples:
            response:
              value:
                code: 404
                message: Not found.
  securitySchemes:
    bearerAuth:
      type: http
      scheme: bearer

````