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

# Create public quote

> Return a real-time quote between two supported assets using the current TRM.

<Note>
  This endpoint is public and does not require authentication.
</Note>

<Warning>
  Quotes expire 30 seconds after they are created. Request a new quote immediately before processing a transaction.
</Warning>

Use this endpoint for pricing widgets, calculators, and checkout previews.


## OpenAPI

````yaml api-reference/openapi.json POST /api/v1/exchanges/quote/public
openapi: 3.1.0
info:
  title: QASH API
  description: >-
    QASH endpoints for exchange rates, cards, and partner-facing financial
    workflows.
  version: 1.0.0
servers:
  - url: https://api.qash.ai
    description: Partner API (Production)
  - url: https://staging.qash.ai
    description: Staging
  - url: https://app.qash.ai
    description: Production
security: []
tags:
  - name: Exchange rates
    description: Public endpoints for supported assets and TRM-based quotes.
  - name: Cards
    description: >-
      Authenticated partner endpoints for card state, controls, limits, and
      balances.
  - name: Users
    description: Admin endpoints for user provisioning and account management.
paths:
  /api/v1/exchanges/quote/public:
    post:
      tags:
        - Exchange rates
      summary: Create public quote
      description: >-
        Returns the current exchange quote between two supported assets. This
        endpoint uses the live TRM and is intended for public pricing widgets,
        calculators, and checkout experiences.


        The quote expires 30 seconds after it is created.
      operationId: createPublicExchangeQuote
      requestBody:
        description: Quote request payload.
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/PublicQuoteRequest'
            examples:
              usdToCop:
                summary: USD to COP
                value:
                  fromAsset: USD
                  toAsset: COP
                  fromAmount: 100
        required: true
      responses:
        '200':
          description: Quote returned successfully.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/PublicQuoteResponse'
              examples:
                usdToCop:
                  summary: USD to COP
                  value:
                    success: true
                    data:
                      fromAsset: USD
                      toAsset: COP
                      fromAmount: 100
                      toAmount: 425000
                      rate: 4250
                      expiresAt: '2026-04-16T15:30:30.000Z'
        '400':
          description: Missing fields or invalid fromAmount.
        '500':
          description: Internal service error.
        '503':
          description: >-
            TRM unavailable because the upstream source is down and the cache
            has expired.
      security: []
components:
  schemas:
    PublicQuoteRequest:
      type: object
      properties:
        fromAsset:
          type: string
          description: Source asset code.
          enum:
            - USD
            - COP
        toAsset:
          type: string
          description: Destination asset code.
          enum:
            - USD
            - COP
        fromAmount:
          type: number
          description: Amount to convert.
          exclusiveMinimum: 0
      required:
        - fromAsset
        - toAsset
        - fromAmount
    PublicQuoteResponse:
      type: object
      properties:
        success:
          type: boolean
          example: true
        data:
          $ref: '#/components/schemas/PublicQuote'
      required:
        - success
        - data
    PublicQuote:
      type: object
      properties:
        fromAsset:
          type: string
        toAsset:
          type: string
        fromAmount:
          type: number
        toAmount:
          type: number
          description: Converted amount after spread is applied.
        rate:
          type: number
          description: Effective exchange rate returned by QASH.
        expiresAt:
          type: string
          format: date-time
          description: Quote expiration timestamp in ISO 8601 format.
      required:
        - fromAsset
        - toAsset
        - fromAmount
        - toAmount
        - rate
        - expiresAt

````