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

# Quote a card amount

> Return a price estimate for a card purchase.

Prices a card spend before the buyer commits. `trade_type` decides which side
`amount` pins: `EXACT_INPUT` fixes the fiat the buyer spends, `EXACT_OUTPUT`
fixes the crypto they receive, and the provider computes the other.
`payment_method` is a value from
[List card payment methods](/api/card/payment-methods).

The figures are for display only — the binding amounts are set at
[checkout](/api/card/checkout). Where the destination is reached by routing,
the quote prices the first leg alone, so read it as an upper bound on what
lands.


## OpenAPI

````yaml api/openapi.json POST /v1/card/quote
openapi: 3.1.0
info:
  description: Fiat-to-USDC onramp API. The URL prefix (`/v1`) is the version contract.
  license:
    identifier: LicenseRef-Proprietary
    name: Proprietary
  title: Calm API
  version: v1
servers:
  - description: Production
    url: https://api.calmtreasury.xyz
  - description: Sandbox
    url: https://api.sandbox.calmtreasury.xyz
security: []
paths:
  /v1/card/quote:
    post:
      summary: Quote a card amount
      description: >-
        Returns a price estimate for a card spend: the crypto the buyer receives
        and the all-in fiat charged.
      operationId: createCardQuote
      requestBody:
        content:
          application/json:
            schema:
              properties:
                amount:
                  pattern: ^\d{1,12}(\.\d{1,8})?$
                  type: string
                country:
                  pattern: ^[A-Z]{2}$
                  type: string
                currency:
                  enum:
                    - USD
                    - GBP
                    - EUR
                  type: string
                destination_chain:
                  enum:
                    - 1
                    - 8453
                    - 999
                    - 1337
                    - 4326
                    - 143
                    - 137
                    - 42161
                  type: number
                destination_token:
                  enum:
                    - USDC
                    - USDm
                    - AUSD
                    - USDC.e
                  type: string
                payment_method:
                  pattern: ^[a-z0-9-]{2,32}$
                  type: string
                trade_type:
                  default: EXACT_INPUT
                  enum:
                    - EXACT_INPUT
                    - EXACT_OUTPUT
                  type: string
              required:
                - destination_chain
                - destination_token
                - currency
                - amount
                - country
                - payment_method
              type: object
        required: true
      responses:
        '200':
          content:
            application/json:
              schema:
                properties:
                  currency:
                    type: string
                  destination_amount:
                    type: string
                  destination_chain:
                    description: >-
                      Chain id. Currently 1, 8453, 999, 1337, 4326, 143, 137,
                      42161 — additive; tolerate unknown values.
                    maximum: 9007199254740991
                    minimum: -9007199254740991
                    type: integer
                  destination_token:
                    type: string
                  payment_method:
                    type: string
                  source_amount:
                    type: string
                required:
                  - destination_amount
                  - destination_chain
                  - destination_token
                  - source_amount
                  - currency
                  - payment_method
                type: object
          description: The price estimate for the requested amount.
        '400':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
          description: >-
            Bad Request — `error.code` includes: amount_below_minimum,
            publishable_key_missing, validation_error.
        '401':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
          description: 'Unauthorized — `error.code` includes: invalid_publishable_key.'
        '403':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
          description: 'Forbidden — `error.code` includes: origin_not_allowed.'
        '429':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
          description: 'Too Many Requests — `error.code` includes: rate_limited.'
        '502':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
          description: 'Bad Gateway — `error.code` includes: quote_unavailable.'
      security:
        - publishableKey: []
components:
  schemas:
    Error:
      properties:
        error:
          properties:
            code:
              type: string
            message:
              type: string
          required:
            - code
            - message
          type: object
      required:
        - error
      type: object
  securitySchemes:
    publishableKey:
      description: Publishable key identifying the calling app.
      in: header
      name: x-calm-publishable-key
      type: apiKey

````