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

# Quote Swap

> Price a swap between two of your wallets without moving money

Returns the fee, the amount converted and the amount you'll receive. A quote doesn't reserve the rate or your balance. To run the swap, call [`POST /wallet/swap`](/fiat-api-reference/swap/create) with the same body.


## OpenAPI

````yaml openapi-fiat.yaml POST /wallet/swap/quote
openapi: 3.0.3
info:
  title: Yativo Fiat API
  description: >
    The Yativo Fiat API enables businesses to manage customers, run KYC/KYB,
    send and receive

    cross-border payments, issue virtual accounts and virtual cards, manage
    beneficiaries, and more.


    **Base URLs**

    | Environment | URL |

    |---|---|

    | Production | `https://api.yativo.com/api/v1` |

    | Sandbox | `https://smtp.yativo.com/api/v1` |


    **Authentication**

    Send `X-Api-Key` and `X-Api-Secret` on every request. Create keys in the
    dashboard under

    **Developers → API Keys**. Each key only works from the server IPs listed on
    it (enforced since

    14 October 2026). Keys don't expire and there's no login call or token
    refresh.


    Login tokens (`POST /auth/login` with an Account ID and App Secret, and
    `Authorization: Bearer`)

    have been discontinued and don't work for API requests.


    Endpoints that change how a person signs in (passkeys, two-factor
    authentication, PIN)

    or delete the account can't be called with an API key. Use the dashboard for
    those.

    API keys and IP whitelists can only be managed in the dashboard.


    **Rate limits**

    Per business account: 20 writes (`POST`, `PUT`, `PATCH`, `DELETE`) and 50
    reads (`GET`) a second.

    Some plans set their own limit. Enterprise plans have no general limit.


    **Idempotency**

    Send an `Idempotency-Key` header on every `POST`, `PUT`, `PATCH` and
    `DELETE` request. A retry with

    the same key and body within 60 minutes returns the original response
    without running again.

    Reusing a key with a different body returns `409`.


    **KYC endpoints** are hosted on a separate platform at
    `https://kyc.yativo.com`. They are

    documented here for completeness but use that base URL, not the main API
    base.
  version: 1.0.0
  contact:
    name: Yativo Support
    url: https://yativo.com
servers:
  - url: https://api.yativo.com/api/v1
    description: Production
  - url: https://smtp.yativo.com/api/v1
    description: Sandbox
security:
  - apiKey: []
    apiSecret: []
tags:
  - name: Customers
    description: Create and manage customer profiles.
  - name: KYC / KYB
    description: >
      Identity verification for individual customers (KYC) and business
      customers (KYB).

      Submission endpoints are on `https://kyc.yativo.com/api`.
  - name: KYC Lookups
    description: >
      Lists your KYC and KYB forms need: countries, subdivisions, postal code
      formats, ID types,

      occupations, industries and allowed values. Served from
      `https://kyc.yativo.com/api`.
  - name: Payments & Transfers
    description: Exchange rates, quotes, send money, payout methods, and wallet payouts.
  - name: Deposits
    description: Initiate and retrieve payin deposits.
  - name: Virtual Accounts
    description: Issue and manage virtual bank accounts for customers.
  - name: Wallets
    description: View balances, create wallets, and list wallet payouts.
  - name: Beneficiaries
    description: Manage saved recipients and their payment methods.
  - name: Transactions
    description: List, retrieve, track, and download receipts for all transaction types.
  - name: Virtual Cards
    description: Activate, issue, manage, and terminate prepaid virtual cards.
  - name: Payouts
    description: Single and batch payouts to beneficiaries.
  - name: Currency Swap
    description: Swap balance between your own currency wallets.
  - name: IP Whitelist
    description: Check whether your server's IP can use your API key.
  - name: Account Security
    description: Review sign-in activity on your account.
  - name: Corporate Card Links
    description: >-
      Each corporate card's employee-only page for card details and PIN,
      employee card sign-in, and branding.
  - name: Webhooks
    description: Register and manage webhook endpoints for real-time event notifications.
  - name: Developer
    description: Request logs and webhook event inspection.
paths:
  /wallet/swap/quote:
    post:
      tags:
        - Currency Swap
      summary: Quote Swap
      description: >
        Price a swap without moving money. The fee is charged in `from_currency`
        and deducted before conversion:

        `to_amount = (amount − fee) × rate`, rounded down to the destination
        currency's decimal places.


        A quote doesn't reserve the rate or your balance.


        Team members need the **Wallets → view** permission.
      parameters:
        - $ref: '#/components/parameters/IdempotencyKey'
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/WalletSwapRequest'
      responses:
        '200':
          description: Swap quote
          content:
            application/json:
              schema:
                type: object
                properties:
                  status:
                    type: string
                    example: success
                  status_code:
                    type: integer
                    example: 200
                  message:
                    type: string
                    example: Request successful
                  data:
                    type: object
                    properties:
                      from_currency:
                        type: string
                        example: USD
                      to_currency:
                        type: string
                        example: USDC
                      from_amount:
                        type: number
                        description: >-
                          Amount debited from the source wallet, including the
                          fee.
                        example: 1000
                      fee:
                        type: number
                        description: Fee in `from_currency`.
                        example: 5
                      net_amount:
                        type: number
                        description: '`from_amount` minus `fee`. The amount converted.'
                        example: 995
                      rate:
                        type: number
                        example: 1
                      to_amount:
                        type: number
                        description: Amount credited to the destination wallet.
                        example: 995
                      available_balance:
                        type: number
                        description: Your current balance in the source wallet.
                        example: 2500
        '422':
          description: >-
            Validation error, pair not available, amount outside the pair's
            limits, or no source wallet
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
components:
  parameters:
    IdempotencyKey:
      name: Idempotency-Key
      in: header
      required: true
      schema:
        type: string
      description: A unique string per request to ensure idempotent processing.
  schemas:
    WalletSwapRequest:
      type: object
      required:
        - from_currency
        - to_currency
        - amount
      properties:
        from_currency:
          type: string
          description: Currency of the wallet to debit.
          example: USD
        to_currency:
          type: string
          description: Currency of the wallet to credit. Must differ from `from_currency`.
          example: USDC
        amount:
          type: number
          description: >-
            Amount to swap in `from_currency`, including the fee. Must be
            greater than 0.
          example: 1000
        idempotency_key:
          type: string
          maxLength: 100
          description: >-
            `POST /wallet/swap` only. Alternative to the `Idempotency-Key`
            header.
    ErrorResponse:
      type: object
      properties:
        status:
          type: string
          example: failed
        status_code:
          type: integer
        message:
          type: string
          example: Request failed.
        data:
          type: object
          nullable: true
          properties:
            error:
              type: string
        error_details:
          $ref: '#/components/schemas/ErrorDetails'
    ErrorDetails:
      type: object
      description: >-
        Included on every failed response, with the same shape for every
        endpoint.
      properties:
        code:
          type: string
          enum:
            - bad_request
            - unauthenticated
            - payment_required
            - forbidden
            - not_found
            - method_not_allowed
            - conflict
            - validation_error
            - rate_limited
            - server_error
            - not_implemented
            - upstream_error
            - service_unavailable
            - upstream_timeout
          example: validation_error
        message:
          type: string
          example: The amount field is required.
        http_status:
          type: integer
          example: 422
        fields:
          type: object
          description: >-
            Messages per field. When the error isn't about a field, the message
            is under `error`.
          additionalProperties:
            type: array
            items:
              type: string
        retryable:
          type: boolean
          description: '`true` for 409, 429, 500, 502, 503 and 504.'
          example: false
        retry_after:
          type: integer
          nullable: true
          description: Seconds to wait before retrying, from the `Retry-After` header.
  securitySchemes:
    apiKey:
      type: apiKey
      in: header
      name: X-Api-Key
      description: >-
        Your API key (`yativo_pk_...`) from Developers → API Keys. Send together
        with X-Api-Secret.
    apiSecret:
      type: apiKey
      in: header
      name: X-Api-Secret
      description: Your API secret (`yativo_sk_...`), shown once when the key is created.

````

This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.