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

# Get a fiat on-ramp quote (card -> USDC on Ethereum)

> Get an indicative quote for buying USDC on Ethereum with a card.

Returns the estimated USDC the user will receive for a given fiat amount,
the exchange rate, fee breakdown (`business_fees` is `0`), and the provider
min/max limits. The output is always **USDC on Ethereum** delivered to the
`destination_address` — this is a non-custodial on-ramp, so Compass never
holds the funds.

This quote is indicative and may expire (`expires_at`). To actually start a
payment, call `POST /v2/onramp/create`.



## OpenAPI

````yaml /v2/combined_spec.json post /v2/onramp/quote
openapi: 3.1.0
info:
  title: Compass API
  description: Compass Labs DeFi API
  version: 0.0.1
servers:
  - url: https://api.compasslabs.ai
    description: Production server
security:
  - ApiKeyAuth: []
paths:
  /v2/onramp/quote:
    post:
      tags:
        - Onramp
      summary: Get a fiat on-ramp quote (card -> USDC on Ethereum)
      description: >-
        Get an indicative quote for buying USDC on Ethereum with a card.


        Returns the estimated USDC the user will receive for a given fiat
        amount,

        the exchange rate, fee breakdown (`business_fees` is `0`), and the
        provider

        min/max limits. The output is always **USDC on Ethereum** delivered to
        the

        `destination_address` — this is a non-custodial on-ramp, so Compass
        never

        holds the funds.


        This quote is indicative and may expire (`expires_at`). To actually
        start a

        payment, call `POST /v2/onramp/create`.
      operationId: v2_onramp_quote
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/OnrampQuoteRequest'
        required: true
      responses:
        '200':
          description: Successful Response
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/OnrampQuote'
        '400':
          description: '`INVALID_ONRAMP_REQUEST` — bad fiat amount or unsupported currency.'
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/OnrampErrorResponse'
        '422':
          description: >-
            `UNSUPPORTED_ONRAMP_OUTPUT` — delivery is limited to USDC on
            Ethereum.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/OnrampErrorResponse'
        '502':
          description: '`HALLIDAY_API_UNAVAILABLE` — the on-ramp provider is unavailable.'
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/OnrampErrorResponse'
      x-codeSamples:
        - lang: python
          label: Python (SDK)
          source: |-
            from compass_api_sdk import CompassAPI


            with CompassAPI(
                api_key_auth="<YOUR_API_KEY_HERE>",
            ) as compass_api:

                res = compass_api.onramp.onramp_quote(fiat_amount="<value>", destination_address="<value>", fiat_currency="USD")

                # Handle response
                print(res)
        - lang: typescript
          label: Typescript (SDK)
          source: |-
            import { CompassApiSDK } from "@compass-labs/api-sdk";

            const compassApiSDK = new CompassApiSDK({
              apiKeyAuth: "<YOUR_API_KEY_HERE>",
            });

            async function run() {
              const result = await compassApiSDK.onramp.onrampQuote({
                fiatAmount: "<value>",
                fiatCurrency: "USD",
                destinationAddress: "<value>",
              });

              console.log(result);
            }

            run();
components:
  schemas:
    OnrampQuoteRequest:
      properties:
        fiat_amount:
          type: string
          title: Fiat Amount
          description: Amount of fiat to spend, as a decimal string (e.g. `100`).
          examples:
            - '100'
        fiat_currency:
          type: string
          title: Fiat Currency
          description: ISO-4217 fiat currency code. Defaults to `USD`.
          default: USD
          examples:
            - USD
        destination_address:
          type: string
          title: Destination Address
          description: >-
            The wallet that will receive the USDC on Ethereum. Funds are
            delivered here directly — Compass never holds them.
          examples:
            - '0x29F20a192328eF1aD35e1564aBFf4Be9C5ce5f7B'
      type: object
      required:
        - fiat_amount
        - destination_address
      title: OnrampQuoteRequest
      description: |-
        An indicative fiat -> USDC-on-Ethereum quote request.

        The output asset and chain are fixed to USDC on Ethereum and are not
        user-supplied — this product group delivers only USDC to the user's own
        wallet (non-custodial).
    OnrampQuote:
      properties:
        fiat_amount:
          type: string
          title: Fiat Amount
          description: Fiat amount to spend.
          examples:
            - '100'
        fiat_currency:
          type: string
          title: Fiat Currency
          description: ISO-4217 fiat currency code.
          examples:
            - USD
        output_amount:
          type: string
          title: Output Amount
          description: Estimated USDC delivered, human-readable (6-decimal token).
          examples:
            - '98.50'
        output_asset:
          type: string
          const: USDC
          title: Output Asset
          description: Delivered asset. Always USDC for this on-ramp.
          default: USDC
        output_chain:
          type: string
          const: ethereum
          title: Output Chain
          description: Delivery chain. Always Ethereum for this on-ramp.
          default: ethereum
        exchange_rate:
          type: string
          title: Exchange Rate
          description: USDC received per unit of fiat.
          examples:
            - '0.985'
        fees:
          $ref: '#/components/schemas/OnrampFees'
          description: Fee breakdown.
        min_amount:
          anyOf:
            - type: string
            - type: 'null'
          title: Min Amount
          description: Minimum fiat amount accepted, if advertised by the provider.
          examples:
            - '20'
        max_amount:
          anyOf:
            - type: string
            - type: 'null'
          title: Max Amount
          description: Maximum fiat amount accepted, if advertised by the provider.
          examples:
            - '10000'
        expires_at:
          anyOf:
            - type: string
            - type: 'null'
          title: Expires At
          description: ISO-8601 timestamp after which this quote is stale, if any.
      type: object
      required:
        - fiat_amount
        - fiat_currency
        - output_amount
        - exchange_rate
        - fees
      title: OnrampQuote
      description: An indicative fiat -> USDC-on-Ethereum quote.
    OnrampErrorResponse:
      properties:
        error:
          type: string
          title: Error
          description: >-
            Short human-readable error label (e.g. `Payment not found.`,
            `On-ramp provider unavailable`, `Identity verification required`).
        message:
          type: string
          title: Message
          description: Human-readable explanation.
      type: object
      required:
        - error
        - message
      title: OnrampErrorResponse
      description: >-
        Standard error envelope returned by every non-2xx on-ramp response.


        Surfaced in OpenAPI ``responses`` declarations so SDK consumers can
        decode

        failures uniformly without inspecting per-status-code shapes.
    OnrampFees:
      properties:
        provider_fee:
          type: string
          title: Provider Fee
          description: Fee charged by the on-ramp provider, in fiat.
          examples:
            - '2.99'
        network_fee:
          type: string
          title: Network Fee
          description: Estimated network/gas fee, in fiat.
          examples:
            - '0.50'
        business_fees:
          type: string
          title: Business Fees
          description: Compass business fee, in fiat. Always `0` for now.
          default: '0'
          examples:
            - '0'
      type: object
      required:
        - provider_fee
        - network_fee
      title: OnrampFees
      description: |-
        Fee breakdown for an on-ramp quote.

        ``business_fees`` is a fixed ``"0"`` for now — monetization is a single
        future lever and is intentionally not charged.
  securitySchemes:
    ApiKeyAuth:
      type: apiKey
      in: header
      name: x-api-key
      description: >-
        Your Compass API Key. Get your key
        [here](https://www.compasslabs.ai/dashboard).

````