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

# Preview quote

> Public endpoint — no API key required.

Returns:
  - rate: KES per token **after markup**
  - token_amount: tokens user would receive (OnRamp) / must send (OffRamp)
  - fiat_paid: echo of amount_fiat
  - symbol/decimals: metadata (no chain implied)

Public endpoint to preview a quote **without creating an order**.

**Parameters**

* `order_type`: OnRamp|OffRamp or 0|1
* `amount_fiat` (KES): positive number
* `token` (enum): USDC | USDT | WXM

**Response**

* `rate`: KES per token **after markup**
* `token_amount`: tokens the user would receive (OnRamp) or must send (OffRamp)
* `fiat_paid`: echo of input
* `decimals`, `symbol`

**Rate limits**
Soft-limited per caller. If you hit the limit, you'll get HTTP 429 with `Retry-After`.


## OpenAPI

````yaml api-reference/openapi.json get /quote
openapi: 3.1.0
info:
  title: Element Aggregator API for B2B
  description: >-
    The Element Aggregator acts as a bridge between fiat and blockchain smart
    contracts. It handles payment processing, event listening, and order
    management, ensuring seamless coordination between Web2 and Web3 ecosystems.
  version: 1.0.0
servers:
  - url: https://sandbox.elementpay.net
security: []
paths:
  /quote:
    get:
      tags:
        - Quote
      summary: Preview quote (no order created)
      description: |-
        Public endpoint — no API key required.

        Returns:
          - rate: KES per token **after markup**
          - token_amount: tokens user would receive (OnRamp) / must send (OffRamp)
          - fiat_paid: echo of amount_fiat
          - symbol/decimals: metadata (no chain implied)
      operationId: get_quote_quote_get
      parameters:
        - name: amount_fiat
          in: query
          required: true
          schema:
            type: number
            exclusiveMinimum: 0
            description: Fiat amount in KES
            title: Amount Fiat
          description: Fiat amount in KES
        - name: token
          in: query
          required: true
          schema:
            $ref: '#/components/schemas/TokenSymbol'
            description: Token symbol (USDC|USDT|WXM)
          description: Token symbol (USDC|USDT|WXM)
        - name: order_type
          in: query
          required: false
          schema:
            type: string
            description: 'Order type: OnRamp|OffRamp or 0|1'
            default: OnRamp
            title: Order Type
          description: 'Order type: OnRamp|OffRamp or 0|1'
      responses:
        '200':
          description: Quote computed successfully
          content:
            application/json:
              schema: {}
              example:
                status: success
                message: Quote computed
                data:
                  rate: 132.712345
                  token_amount: 0.753621
                  fiat_paid: 100
                  symbol: USDC
                  decimals: 6
        '400':
          description: Bad request (invalid order_type or unsupported token, etc.)
          content:
            application/json:
              examples:
                bad_order_type:
                  summary: Invalid order_type
                  value:
                    status: error
                    message: order_type must be 0|1 or OnRamp|OffRamp
                unknown_token:
                  summary: Unknown token symbol
                  value:
                    status: error
                    message: No USDC configured for env=live
        '422':
          description: Validation Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/HTTPValidationError'
        '429':
          description: Too many requests (rate limited)
          content:
            application/json:
              example:
                status: error
                message: Too many requests
        '500':
          description: Internal server error
          content:
            application/json:
              example:
                status: error
                message: Internal error occurred
        '502':
          description: Upstream price provider error
          content:
            application/json:
              example:
                status: error
                message: Failed to fetch price
components:
  schemas:
    TokenSymbol:
      type: string
      enum:
        - USDC
        - USDT
        - WXM
      title: TokenSymbol
    HTTPValidationError:
      properties:
        detail:
          items:
            $ref: '#/components/schemas/ValidationError'
          type: array
          title: Detail
      type: object
      title: HTTPValidationError
    ValidationError:
      properties:
        loc:
          items:
            anyOf:
              - type: string
              - type: integer
          type: array
          title: Location
        msg:
          type: string
          title: Message
        type:
          type: string
          title: Error Type
      type: object
      required:
        - loc
        - msg
        - type
      title: ValidationError

````