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

> ## Agent Instructions
> If you are an AI assistant operating Infinite for a user, read the skill first: https://docs.infinite.dev/agent-skill.md (setup per host, tool reference, rules for moving money, journeys).
> When operating Infinite for a user, use the MCP server. Sign in at https://bot.api.infinite.dev/mcp (production, acts as the user) or send `Authorization: Bearer <key>` to https://bot.api.infinite.dev/mcp/sse. Prefer its tools over raw HTTP; use REST only for steps no tool covers, and check `get_endpoint_schema` before guessing a request shape.
> Net-new Infinite Connect (org_connect) is operator-assisted: do not grant end users shared org_connect Auth Kit membership or the shared platform org API key — those credentials are org-wide on /v1. BYO org keys onboard under that customer's org id. Operator sessions should show org_connect in get_organization_info.
> The key decides the tools. Every organization key (`sk_sandbox_…` / `sk_live_…`) gets docs, onboarding, `get_account_balance`, and request logs for your own organization. BYO organizations add payees an agent will pay with `create_payee` (payable once ACTIVE). Platform Connect sessions instead get bound-customer payment lookups (`get_quote`, `get_transfer`, `list_transfers`, `list_account_balances`), payee drafts (`create_payee_draft` / `get_payee_draft`; screening only, never payable), and transfer drafts that wait for Infinite approval (`create_transfer_draft` / `get_transfer_draft`; never POST /v1/transfers). Where offered, platform `create_transfer` files a real transfer that Infinite holds in review before funding; it cannot be submitted from DRAFT.
> An agent key (`sk_sandbox_agent_…` / `sk_live_agent_…`) moves money within that agent's limits: `create_transfer` → `submit_transfer` → `wait_for_transfer`.
> On sandbox organization-key sessions, `sandbox_approve_customer` (makes the capabilities you pass READY, and related ones may turn READY too; `request_capabilities` is not needed), `sandbox_fund_account`, and `sandbox_complete_transfer` stand in for verification, funding, and settlement, so a whole flow runs from MCP. BYO keys can pass `customerId` on each call without binding; platform sessions must bind a customer first (`create_business_customer` auto-binds, or send `X-Infinite-On-Behalf-Of`).
> When searching documentation without a key, use the docs MCP at https://docs.infinite.dev/mcp.
> Start in sandbox (https://sandbox.api.infinite.dev). Do not use production unless the user explicitly asks.
> Confirm amount, currency, and payee with the user before any payment is submitted. Pass the invoice number as `reference` on `create_transfer`; the summary says what the payee will see.
> REST amounts are integer minor units (`"4000"` = 40.00 USD). MCP payment tools take exact decimal strings (`"40.00"`). Never mix them.
> Agent denials return `403 { denial: { code, message, window, limit, used, remaining, attemptedAmount, currency }, hint }` with decimal amounts; per-transfer denials omit `used` and `remaining`. Report them to the user; do not work around them.

# Accept a firm FX quote and create a trade



## OpenAPI

````yaml post /v1/fx/trades
openapi: 3.0.0
info:
  title: Infinite API
  description: API for Infinite
  version: '1.0'
  contact: {}
servers:
  - url: https://sandbox.api.infinite.dev
    description: Sandbox
  - url: https://api.infinite.dev
    description: Production
security: []
tags:
  - name: Accounts
    description: Virtual and external account management
  - name: Customers
    description: Customer identity management
  - name: Documents
    description: Document upload and management
  - name: Fixed Routes
    description: Fixed route management
  - name: External Bank Accounts
    description: External bank account management
  - name: External Wallets
    description: External wallet management
  - name: Infinite Wallets
    description: Infinite Wallet management
  - name: Organizations
    description: Organization management
  - name: Quotes
    description: Quote creation and management
  - name: Transfers
    description: Money movement and transaction tracking
  - name: Verification
    description: Identity verification workflows
  - name: Terms of Service
    description: Terms of Service acceptance
  - name: Health
    description: System health and monitoring
  - name: Sandbox
    description: Sandbox utilities
paths:
  /v1/fx/trades:
    post:
      tags:
        - FX
      summary: Accept a firm FX quote and create a trade
      operationId: FxTradeController_accept_v1
      parameters:
        - name: X-API-Key
          in: header
          description: API key
          required: false
          schema:
            type: string
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/CreateFxTradeDto'
      responses:
        '201':
          description: Trade created. Deposit funds within `depositDeadline`.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/FxTradeResponseDto'
        '401':
          description: Unauthorized - Invalid or missing authentication credentials
        '409':
          description: >-
            Another active FX trade already exists for this (customer, source
            asset, source network).
        '410':
          description: Quote expired or no longer pending.
      security:
        - bearer: []
        - bearer: []
      x-codeSamples:
        - lang: bash
          label: CLI
          source: >-
            # Requires: npm i -g @infinite_dev/cli && export
            INFINITE_API_KEY=sk_sandbox_...

            # Escape hatch for any endpoint: infinite api <METHOD> <path>

            infinite api POST /v1/fx/trades \
              --body '<request-json>'
        - lang: text
          label: MCP
          source: >-
            Accept a firm FX quote and create a trade.


            # Infinite MCP is read-only for this endpoint — use a dedicated MCP
            tool when one exists, otherwise run the CLI tab.
components:
  schemas:
    CreateFxTradeDto:
      type: object
      properties:
        quoteId:
          type: string
          description: ID of a PENDING firm quote returned by `POST /v1/fx/quotes`.
          example: quote_abc123
        payoutDestination:
          $ref: '#/components/schemas/FxPayoutDestinationDto'
      required:
        - quoteId
        - payoutDestination
    FxTradeResponseDto:
      type: object
      properties:
        tradeId:
          type: string
          example: tfr_abc123
        referenceRate:
          type: string
          description: >-
            Independent reference rate used to price this trade, expressed as
            destination major units per source major unit. Present for
            benchmark-priced trades.
          example: '1.158691536019208779'
        referenceRateAsOf:
          type: string
          description: >-
            Timestamp of the independent reference rate used to price this trade
            (ISO 8601).
          example: '2026-09-02T18:30:04.000Z'
        referenceProvider:
          type: string
          description: >-
            Independent market that published `referenceRate`. Present when
            `referenceRate` is present.
          enum:
            - XE
          example: XE
        status:
          type: string
          description: >-
            Lifecycle status. `PENDING_WALLET_APPROVAL` means accept succeeded
            but the source wallet is still being verified —
            `depositInstructions` is omitted until verification clears and the
            trade transitions to `AWAITING_DEPOSIT` (delivered via the
            `fx_trade.deposit_instructions_ready` webhook).
          enum:
            - PENDING_WALLET_APPROVAL
            - AWAITING_DEPOSIT
            - PROCESSING
            - COMPLETED
            - FAILED
            - CANCELLED
            - AUTO_CANCELLED
            - REFUNDED
          example: AWAITING_DEPOSIT
        depositInstructions:
          description: >-
            On-chain deposit instructions for crypto-source trades. Present once
            the trade reaches `AWAITING_DEPOSIT`. Omitted while
            `status=PENDING_WALLET_APPROVAL` and for fiat-source trades (which
            return `fundingInstructions` instead).
          allOf:
            - $ref: '#/components/schemas/FxTradeDepositInstructionsDto'
        fundingInstructions:
          description: >-
            Bank funding instructions for fiat-source trades. Present once the
            trade reaches `AWAITING_DEPOSIT` on fiat-source pairs (USD / EUR /
            GBP source) — the customer wires from their bank to the account in
            this object using `reference` as the wire memo. Mutually exclusive
            with `depositInstructions`.
          allOf:
            - $ref: '#/components/schemas/FxTradeFundingInstructionsDto'
        depositDeadline:
          type: string
          description: >-
            Customer-facing deposit deadline (ISO 8601). Present when either
            `depositInstructions` or `fundingInstructions` is present.
          example: '2026-05-26T19:54:00.000Z'
        screeningDeadline:
          type: string
          description: >-
            Deadline by which source-wallet verification must complete (ISO
            8601). Present only when `status=PENDING_WALLET_APPROVAL`. If
            verification has not cleared by this point the trade transitions to
            `FAILED`.
          example: '2026-05-26T19:47:00.000Z'
      required:
        - tradeId
        - status
    FxPayoutDestinationDto:
      type: object
      properties:
        type:
          type: string
          enum:
            - EXTERNAL_WALLET
            - FIAT_BANK_ACCOUNT
          description: >-
            Destination type. `EXTERNAL_WALLET` for crypto payouts,
            `FIAT_BANK_ACCOUNT` for fiat payouts.
          example: EXTERNAL_WALLET
        address:
          type: string
          description: Recipient wallet address. Required when `type=EXTERNAL_WALLET`.
          example: 0xabc123...
        network:
          type: string
          description: >-
            Network the recipient address lives on. Required when
            `type=EXTERNAL_WALLET`.
          example: BASE
        bankAccountId:
          type: string
          description: >-
            Public ID (`eba_…` for bank rails, `epa_…` for proxy rails like PIX)
            of an existing external account belonging to the receiving customer.
            Required when `type=FIAT_BANK_ACCOUNT`. The payment rail and
            beneficiary fields are resolved from the persisted account; create
            the account first via `POST /v1/external-bank-accounts` (bank
            details or `aliasType`/`aliasValue`) and pass back its `id` here.
          example: eba_abc123
        payoutReference:
          type: string
          description: >-
            Reference forwarded to the bank as the payout memo. Optional, fiat
            only. Must be 1-20 characters using only uppercase letters A-Z and
            digits 0-9 (matches the underlying SWIFT/SEPA memo field
            constraints).
          example: INV20260417
      required:
        - type
    FxTradeDepositInstructionsDto:
      type: object
      properties:
        address:
          type: string
          description: >-
            Address the customer must send `grossSource` to within the deposit
            window.
          example: 0xCustomerInfiniteTxWallet...
        network:
          type: string
          example: BASE
        amount:
          type: string
          description: Amount the customer must deposit, in source-currency minor units.
          example: '10000000'
        expiresAt:
          type: string
          description: >-
            Customer-facing deposit deadline (ISO 8601). Late deposits are not
            honored.
          example: '2026-05-26T19:54:00.000Z'
      required:
        - address
        - network
        - amount
        - expiresAt
    FxTradeFundingInstructionsDto:
      type: object
      properties:
        reference:
          type: string
          description: >-
            Reference the customer must include on their outbound wire so the
            funds can be attributed to this trade. Customer-visible; renders
            verbatim in their banking app.
          example: CDX-7K2A9V
        currency:
          type: string
          description: ISO 4217.
          example: EUR
        amount:
          type: string
          description: Amount the customer must wire, in source-currency minor units.
          example: '10000'
        supportedRails:
          description: >-
            Rails accepted for the inbound wire — the customer picks one in
            their banking app and matches it to the account variant in
            `accounts` carrying the right identifiers for that rail.
          example:
            - SEPA
          type: array
          items:
            type: string
        bank:
          $ref: '#/components/schemas/FxTradeFundingInstructionsBankDto'
        accounts:
          description: >-
            One entry per rail-variant receiving account. Pick the entry
            matching the rail used to initiate the wire.
          type: array
          items:
            $ref: '#/components/schemas/FxTradeFundingInstructionsAccountDto'
        swiftRoutingBanks:
          description: >-
            Correspondent / intermediary banks required when routing via SWIFT.
            Omitted when the route has no SWIFT correspondents.
          type: array
          items:
            $ref: '#/components/schemas/FxTradeFundingInstructionsSwiftBankDto'
        expiresAt:
          type: string
          description: Wire-by deadline (ISO 8601).
          example: '2026-05-26T19:54:00.000Z'
      required:
        - reference
        - currency
        - amount
        - supportedRails
        - bank
        - accounts
        - expiresAt
    FxTradeFundingInstructionsBankDto:
      type: object
      properties:
        name:
          type: string
          example: Commerzbank AG
        address:
          type: string
          example: Mainzer Landstraße 153, 60327 Frankfurt
        country:
          type: string
          description: ISO 3166-2.
          example: DE
    FxTradeFundingInstructionsAccountDto:
      type: object
      properties:
        supportedRails:
          description: >-
            Rails this account accepts inbound wires on. Pick the account whose
            rails include the one used to initiate the wire.
          example:
            - SEPA
          type: array
          items:
            type: string
        accountHolderName:
          type: string
          example: Acme Onramp Ltd
        accountNumber:
          type: string
          example: '12345678'
        iban:
          type: string
          example: DE89370400440532013000
        bic:
          type: string
          example: COBADEFFXXX
        sortCode:
          type: string
          example: 12-34-56
        routingNumber:
          type: string
          description: ABA routing number (US ACH / Fedwire).
          example: '021000021'
      required:
        - supportedRails
    FxTradeFundingInstructionsSwiftBankDto:
      type: object
      properties:
        role:
          type: string
          enum:
            - INTERMEDIARY
            - CORRESPONDENT
        bankName:
          type: string
          example: Citibank N.A.
        bic:
          type: string
          example: CITIUS33XXX
        abaRoutingNumber:
          type: string
          example: '021000089'
      required:
        - role
        - bankName
        - bic
  securitySchemes:
    bearer:
      scheme: bearer
      bearerFormat: API Key
      type: http
      description: API Key in Bearer format (e.g., Bearer sk_test_...)

````

## Related topics

- [Create a firm FX quote](/api-reference/fx/create-a-firm-fx-quote.md)
- [Agents](/concepts/agents.md)
- [Read an FX trade](/api-reference/fx/read-an-fx-trade.md)
- [Get an indicative FX rate for a pair](/api-reference/fx/get-an-indicative-fx-rate-for-a-pair.md)
- [List FX pairs enabled for the organization](/api-reference/fx/list-fx-pairs-enabled-for-the-organization.md)
