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

# Get quote for conversion

> Retrieves a quote for converting between assets. Supports three quote types:
- **Onramp**: fiat to crypto (sourceAsset: fiat currency code, targetAsset: asset identifier)
- **Offramp**: crypto to fiat (sourceAsset: asset identifier, targetAsset: fiat currency code)
- **Swap**: crypto to crypto (sourceAsset: asset identifier, targetAsset: asset identifier)

**Finding supported assets:** Use the `/ramp/assets` endpoint to get a list of supported assets for quotes, ramps, and swaps. This returns a non-exhaustive list of common assets that a specific wallet would likely want to use, along with their `identifier` values.

Crypto assets must be specified using asset identifiers in the format `CODE:ISSUER` (e.g., `USDC:GA5ZSEJYB37JRC5AVCIA5MOP4RHTM335X2KGX3IHOJAPP5RE34K4KZVN`). Use the `identifier` field from the `/ramp/assets` response. Fiat currencies use standard currency codes (e.g., `MXN`).

The quote includes exchange rates, fees, and expiration information.




## OpenAPI

````yaml /openapi.yaml post /ramp/quote
openapi: 3.1.0
info:
  title: FX API
  version: 1.0.0
  description: >
    API for managing FX operations including onboarding, quotes, orders, and
    customer management.

    This API provides endpoints for managing customers, bank accounts, crypto
    wallets, orders, and webhooks.
servers:
  - url: https://api.etherfuse.com
    description: Production API
  - url: https://api.sand.etherfuse.com
    description: Sandbox API (for testing)
security: []
tags:
  - name: Lookup
    description: Public endpoints for looking up stablebond and exchange rate data
  - name: Assets
    description: Get available assets for ramping
  - name: Onboarding
    description: Customer onboarding and KYC
  - name: Bank Accounts
    description: Manage customer bank accounts
  - name: Agreements
    description: Handle customer agreements and consents
  - name: Quotes
    description: Get quotes for conversions
  - name: Orders
    description: Create and manage orders
  - name: Swaps
    description: Create and manage swaps
  - name: Customers
    description: Manage customers
  - name: Crypto Wallets
    description: Manage crypto wallets
  - name: Webhooks
    description: Manage webhook subscriptions
  - name: Organizations
    description: Manage organizations and child organizations
paths:
  /ramp/quote:
    post:
      tags:
        - Quotes
      summary: Get quote for conversion
      description: >
        Retrieves a quote for converting between assets. Supports three quote
        types:

        - **Onramp**: fiat to crypto (sourceAsset: fiat currency code,
        targetAsset: asset identifier)

        - **Offramp**: crypto to fiat (sourceAsset: asset identifier,
        targetAsset: fiat currency code)

        - **Swap**: crypto to crypto (sourceAsset: asset identifier,
        targetAsset: asset identifier)


        **Finding supported assets:** Use the `/ramp/assets` endpoint to get a
        list of supported assets for quotes, ramps, and swaps. This returns a
        non-exhaustive list of common assets that a specific wallet would likely
        want to use, along with their `identifier` values.


        Crypto assets must be specified using asset identifiers in the format
        `CODE:ISSUER` (e.g.,
        `USDC:GA5ZSEJYB37JRC5AVCIA5MOP4RHTM335X2KGX3IHOJAPP5RE34K4KZVN`). Use
        the `identifier` field from the `/ramp/assets` response. Fiat currencies
        use standard currency codes (e.g., `MXN`).


        The quote includes exchange rates, fees, and expiration information.
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/QuoteRequest'
      responses:
        '200':
          description: Quote retrieved successfully
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/QuoteResponse'
        '400':
          description: Invalid request parameters
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
      security:
        - ApiKeyAuth: []
components:
  schemas:
    QuoteRequest:
      type: object
      properties:
        quoteId:
          type: string
          format: uuid
          description: Unique identifier for the quote
        customerId:
          type: string
          format: uuid
          description: ID of the customer requesting the quote
        blockchain:
          type: string
          enum:
            - stellar
            - solana
            - base
            - polygon
            - monad
          description: Blockchain for the quote
        quoteAssets:
          oneOf:
            - type: object
              title: Onramp
              properties:
                type:
                  type: string
                  enum:
                    - onramp
                  description: Type of quote (onramp - fiat to crypto)
                sourceAsset:
                  type: string
                  enum:
                    - MXN
                  description: Source asset code (fiat currency)
                targetAsset:
                  type: string
                  description: >-
                    Target asset identifier with issuer (e.g.,
                    USDC:GA5ZSEJYB37JRC5AVCIA5MOP4RHTM335X2KGX3IHOJAPP5RE34K4KZVN)
              required:
                - type
                - sourceAsset
                - targetAsset
            - type: object
              title: Offramp
              properties:
                type:
                  type: string
                  enum:
                    - offramp
                  description: Type of quote (offramp - crypto to fiat)
                sourceAsset:
                  type: string
                  description: >-
                    Source asset identifier with issuer (e.g.,
                    USDC:GA5ZSEJYB37JRC5AVCIA5MOP4RHTM335X2KGX3IHOJAPP5RE34K4KZVN)
                targetAsset:
                  type: string
                  enum:
                    - MXN
                  description: Target asset code (fiat currency)
              required:
                - type
                - sourceAsset
                - targetAsset
            - type: object
              title: Swap
              properties:
                type:
                  type: string
                  enum:
                    - swap
                  description: Type of quote (swap - crypto to crypto)
                sourceAsset:
                  type: string
                  description: >-
                    Source asset identifier with issuer (e.g.,
                    USDC:GA5ZSEJYB37JRC5AVCIA5MOP4RHTM335X2KGX3IHOJAPP5RE34K4KZVN)
                targetAsset:
                  type: string
                  description: >-
                    Target asset identifier with issuer (e.g.,
                    CETES:GCRYUGD5NVARGXT56XEZI5CIFCQETYHAPQQTHO203IQZTHDHH4LATMYWC)
              required:
                - type
                - sourceAsset
                - targetAsset
          discriminator:
            propertyName: type
          description: Quote assets configuration based on quote type
        sourceAmount:
          type: string
          description: Amount of the source asset
        walletAddress:
          type: string
          nullable: true
          description: >
            Public key of the destination wallet. Optional but recommended for
            Stellar onramps.

            When provided for Stellar onramp quotes, the system checks whether
            the wallet has an

            on-chain account and trustline. If setup is needed (new account or
            missing trustline),

            the fee will include a one-time onboarding cost to fund the wallet.
            Without this field,

            the quote assumes the wallet is already set up.
        partnerFeeBps:
          type: integer
          minimum: 0
          maximum: 500
          description: >
            Optional partner fee override in basis points (0–500). If provided,
            this value is used

            as the partner fee for this quote instead of the organization's
            default. Only applies

            when the organization has partner fees enabled.
      required:
        - quoteId
        - customerId
        - blockchain
        - quoteAssets
        - sourceAmount
      examples:
        onramp_mxn_to_usdc:
          summary: Onramp MXN to USDC
          value:
            quoteId: 844393ca-be57-4817-a58a-5b60e2792c10
            customerId: 34fcc67a-2454-4578-8435-e2bf03b4dc30
            blockchain: stellar
            quoteAssets:
              type: onramp
              sourceAsset: MXN
              targetAsset: USDC:GA5ZSEJYB37JRC5AVCIA5MOP4RHTM335X2KGX3IHOJAPP5RE34K4KZVN
            sourceAmount: '1000'
        onramp_stellar_new_wallet:
          summary: Onramp MXN to USDC (new Stellar wallet)
          value:
            quoteId: d44393ca-be57-4817-a58a-5b60e2792c15
            customerId: 34fcc67a-2454-4578-8435-e2bf03b4dc30
            blockchain: stellar
            quoteAssets:
              type: onramp
              sourceAsset: MXN
              targetAsset: USDC:GA5ZSEJYB37JRC5AVCIA5MOP4RHTM335X2KGX3IHOJAPP5RE34K4KZVN
            sourceAmount: '1000'
            walletAddress: GDUKMGUGD3V6VXTU2RLAUM7A2FABLMHCPWTMDHKP7HHJ6FCZKEY4PVWL
        onramp_mxn_to_cetes:
          summary: Onramp MXN to CETES
          value:
            quoteId: 944393ca-be57-4817-a58a-5b60e2792c11
            customerId: 34fcc67a-2454-4578-8435-e2bf03b4dc30
            blockchain: stellar
            quoteAssets:
              type: onramp
              sourceAsset: MXN
              targetAsset: CETES:GCRYUGD5NVARGXT56XEZI5CIFCQETYHAPQQTHO203IQZTHDHH4LATMYWC
            sourceAmount: '1000'
        offramp_usdc_to_mxn:
          summary: Offramp USDC to MXN
          value:
            quoteId: a44393ca-be57-4817-a58a-5b60e2792c12
            customerId: 34fcc67a-2454-4578-8435-e2bf03b4dc30
            blockchain: stellar
            quoteAssets:
              type: offramp
              sourceAsset: USDC:GA5ZSEJYB37JRC5AVCIA5MOP4RHTM335X2KGX3IHOJAPP5RE34K4KZVN
              targetAsset: MXN
            sourceAmount: '50'
        offramp_cetes_to_mxn:
          summary: Offramp CETES to MXN
          value:
            quoteId: b44393ca-be57-4817-a58a-5b60e2792c13
            customerId: 34fcc67a-2454-4578-8435-e2bf03b4dc30
            blockchain: stellar
            quoteAssets:
              type: offramp
              sourceAsset: CETES:GCRYUGD5NVARGXT56XEZI5CIFCQETYHAPQQTHO203IQZTHDHH4LATMYWC
              targetAsset: MXN
            sourceAmount: '100'
        swap_usdc_to_cetes:
          summary: Swap USDC to CETES
          value:
            quoteId: c44393ca-be57-4817-a58a-5b60e2792c14
            customerId: 34fcc67a-2454-4578-8435-e2bf03b4dc30
            blockchain: stellar
            quoteAssets:
              type: swap
              sourceAsset: USDC:GA5ZSEJYB37JRC5AVCIA5MOP4RHTM335X2KGX3IHOJAPP5RE34K4KZVN
              targetAsset: CETES:GCRYUGD5NVARGXT56XEZI5CIFCQETYHAPQQTHO203IQZTHDHH4LATMYWC
            sourceAmount: '100'
    QuoteResponse:
      type: object
      properties:
        quoteId:
          type: string
          format: uuid
          description: Unique identifier for the quote
        blockchain:
          type: string
          enum:
            - stellar
            - solana
            - base
            - polygon
            - monad
          description: Blockchain for the quote
        quoteAssets:
          oneOf:
            - type: object
              title: Onramp
              properties:
                type:
                  type: string
                  enum:
                    - onramp
                  description: Type of quote (onramp - fiat to crypto)
                sourceAsset:
                  type: string
                  enum:
                    - MXN
                  description: Source asset code (fiat currency)
                targetAsset:
                  type: string
                  description: >-
                    Target asset identifier with issuer (e.g.,
                    USDC:GA5ZSEJYB37JRC5AVCIA5MOP4RHTM335X2KGX3IHOJAPP5RE34K4KZVN)
              required:
                - type
                - sourceAsset
                - targetAsset
            - type: object
              title: Offramp
              properties:
                type:
                  type: string
                  enum:
                    - offramp
                  description: Type of quote (offramp - crypto to fiat)
                sourceAsset:
                  type: string
                  description: >-
                    Source asset identifier with issuer (e.g.,
                    USDC:GA5ZSEJYB37JRC5AVCIA5MOP4RHTM335X2KGX3IHOJAPP5RE34K4KZVN)
                targetAsset:
                  type: string
                  enum:
                    - MXN
                  description: Target asset code (fiat currency)
              required:
                - type
                - sourceAsset
                - targetAsset
            - type: object
              title: Swap
              properties:
                type:
                  type: string
                  enum:
                    - swap
                  description: Type of quote (swap - crypto to crypto)
                sourceAsset:
                  type: string
                  description: >-
                    Source asset identifier with issuer (e.g.,
                    USDC:GA5ZSEJYB37JRC5AVCIA5MOP4RHTM335X2KGX3IHOJAPP5RE34K4KZVN)
                targetAsset:
                  type: string
                  description: >-
                    Target asset identifier with issuer (e.g.,
                    CETES:GCRYUGD5NVARGXT56XEZI5CIFCQETYHAPQQTHO203IQZTHDHH4LATMYWC)
              required:
                - type
                - sourceAsset
                - targetAsset
          discriminator:
            propertyName: type
        sourceAmount:
          type: string
          description: Amount of the source asset
        destinationAmount:
          type: string
          description: Amount of the destination asset after conversion
        createdAt:
          type: string
          format: date-time
          description: Timestamp when the quote was created
        updatedAt:
          type: string
          format: date-time
          description: Timestamp when the quote was last updated
        expiresAt:
          type: string
          format: date-time
          description: Timestamp when the quote expires
        exchangeRate:
          type: string
          description: >-
            Fee-inclusive exchange rate between source and destination assets.
            This is the rate the user will actually receive — fees are already
            reflected in this rate. Multiply by sourceAmount to get
            destinationAmount.
        etherfuseMidMarketRate:
          type: string
          nullable: true
          description: >-
            Raw mid-market rate before fees. For stablebond ramps, this is the
            bond price. For FX ramps, this is the forex mid-market rate between
            the underlying fiat currencies.
        feeBps:
          type: string
          nullable: true
          description: Fee in basis points (e.g., "20" = 0.20%)
        feeAmount:
          type: string
          nullable: true
          description: Fee amount in source asset currency
        destinationAmountAfterFee:
          type: string
          nullable: true
          description: Amount the user actually receives after fees are deducted
        partnerFeeBps:
          type: integer
          nullable: true
          description: >-
            Partner fee in basis points applied to this quote (e.g., 100 =
            1.00%). Only present when a partner fee is configured for the
            requesting organization.
        partnerFeeAmount:
          type: string
          nullable: true
          description: >-
            Partner fee amount in source asset currency. Only present when a
            partner fee is configured.
      required:
        - quoteId
        - blockchain
        - quoteAssets
        - sourceAmount
        - destinationAmount
        - createdAt
        - updatedAt
        - expiresAt
        - exchangeRate
      examples:
        onramp_mxn_to_usdc:
          summary: Onramp MXN to USDC
          value:
            quoteId: 844393ca-be57-4817-a58a-5b60e2792c10
            blockchain: stellar
            quoteAssets:
              type: onramp
              sourceAsset: MXN
              targetAsset: USDC:GA5ZSEJYB37JRC5AVCIA5MOP4RHTM335X2KGX3IHOJAPP5RE34K4KZVN
            sourceAmount: '1000'
            destinationAmount: '49.50'
            destinationAmountAfterFee: '49.40'
            feeBps: '20'
            feeAmount: '2.00'
            createdAt: '2025-12-17T18:29:46.190163520Z'
            updatedAt: '2025-12-17T18:29:46.190163520Z'
            expiresAt: '2025-12-17T18:31:46.195307961Z'
            exchangeRate: '0.0495'
            etherfuseMidMarketRate: '0.0497'
        onramp_mxn_to_cetes:
          summary: Onramp MXN to CETES
          value:
            quoteId: 944393ca-be57-4817-a58a-5b60e2792c11
            blockchain: stellar
            quoteAssets:
              type: onramp
              sourceAsset: MXN
              targetAsset: CETES:GCRYUGD5NVARGXT56XEZI5CIFCQETYHAPQQTHO203IQZTHDHH4LATMYWC
            sourceAmount: '1000'
            destinationAmount: '999.00'
            destinationAmountAfterFee: '997.00'
            feeBps: '20'
            feeAmount: '2.00'
            createdAt: '2025-12-17T18:29:46.190163520Z'
            updatedAt: '2025-12-17T18:29:46.190163520Z'
            expiresAt: '2025-12-17T18:31:46.195307961Z'
            exchangeRate: '0.997'
            etherfuseMidMarketRate: '0.999'
        offramp_usdc_to_mxn:
          summary: Offramp USDC to MXN
          value:
            quoteId: a44393ca-be57-4817-a58a-5b60e2792c12
            blockchain: stellar
            quoteAssets:
              type: offramp
              sourceAsset: USDC:GA5ZSEJYB37JRC5AVCIA5MOP4RHTM335X2KGX3IHOJAPP5RE34K4KZVN
              targetAsset: MXN
            sourceAmount: '50'
            destinationAmount: '1000.00'
            destinationAmountAfterFee: '998.00'
            feeBps: '20'
            feeAmount: '1.00'
            createdAt: '2025-12-17T18:29:46.190163520Z'
            updatedAt: '2025-12-17T18:29:46.190163520Z'
            expiresAt: '2025-12-17T18:31:46.195307961Z'
            exchangeRate: '19.96'
            etherfuseMidMarketRate: '20.00'
        offramp_cetes_to_mxn:
          summary: Offramp CETES to MXN
          value:
            quoteId: b44393ca-be57-4817-a58a-5b60e2792c13
            blockchain: stellar
            quoteAssets:
              type: offramp
              sourceAsset: CETES:GCRYUGD5NVARGXT56XEZI5CIFCQETYHAPQQTHO203IQZTHDHH4LATMYWC
              targetAsset: MXN
            sourceAmount: '100'
            destinationAmount: '100.10'
            destinationAmountAfterFee: '99.90'
            feeBps: '20'
            feeAmount: '0.20'
            createdAt: '2025-12-17T18:29:46.190163520Z'
            updatedAt: '2025-12-17T18:29:46.190163520Z'
            expiresAt: '2025-12-17T18:31:46.195307961Z'
            exchangeRate: '0.999'
            etherfuseMidMarketRate: '1.001'
        swap_usdc_to_cetes:
          summary: Swap USDC to CETES
          value:
            quoteId: c44393ca-be57-4817-a58a-5b60e2792c14
            blockchain: stellar
            quoteAssets:
              type: swap
              sourceAsset: USDC:GA5ZSEJYB37JRC5AVCIA5MOP4RHTM335X2KGX3IHOJAPP5RE34K4KZVN
              targetAsset: CETES:GCRYUGD5NVARGXT56XEZI5CIFCQETYHAPQQTHO203IQZTHDHH4LATMYWC
            sourceAmount: '100'
            destinationAmount: '1580.50'
            destinationAmountAfterFee: '1577.34'
            feeBps: '20'
            feeAmount: '0.20'
            createdAt: '2025-12-17T18:29:46.190163520Z'
            updatedAt: '2025-12-17T18:29:46.190163520Z'
            expiresAt: '2025-12-17T18:31:46.195307961Z'
            exchangeRate: '15.7734'
            etherfuseMidMarketRate: '15.8050614'
    Error:
      type: object
      properties:
        error:
          type: string
          description: Error message
      example:
        error: Invalid request parameters
  securitySchemes:
    ApiKeyAuth:
      type: apiKey
      in: header
      name: Authorization
      description: >-
        API key for authentication. Pass the key directly (e.g., `Authorization:
        your-api-key`). Do not use a `Bearer` prefix.

````