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

# Get an on-ramp quote (fiat → stablecoin)

> Returns the live exchange rate from Bridge plus the developer_fee_percent applied to the conversion. Bridge's 0.75% commercial fee is BAKED INTO sell_rate (per Bridge docs); this endpoint surfaces the developer fee separately so it can be displayed transparently to the end user. Public — no auth required.



## OpenAPI

````yaml /api-reference/openapi.json post /payout/onramp/quote
openapi: 3.0.0
info:
  title: Relayer
  description: >-
    Relayer API — Kit-based crypto infrastructure for OTC exchange, wallet
    signing, payouts, and widget actions.
  version: '1.0'
  contact: {}
servers:
  - url: https://testnet.relayer.fi/v1
    description: Sandbox (testnet wallets, no real fiat)
  - url: https://api.relayer.fi/v1
    description: Production (mainnet wallets, regulated fiat rails)
security:
  - api-key: []
tags:
  - name: 'Action: Builders'
    description: Transaction metadata builders
  - name: 'Action: Directory'
    description: Widget directory
  - name: 'Action: Execute'
  - name: 'Action: Tokens'
    description: Token lists per chain/protocol
  - name: Addresses
  - name: Agents
  - name: App
    description: Application endpoints
  - name: 'Payout: Accounts'
    description: Payment execution
  - name: 'Payout: Off-ramp'
  - name: 'Payout: On-ramp'
  - name: 'Payout: Orders'
  - name: 'Payout: Recipients'
    description: Beneficiary management
  - name: Signing - Passkeys
  - name: Signing - Recovery
  - name: Signing Approvals
    description: Transaction signing approvals
  - name: Signing Policies
    description: Signing policy management
  - name: Transactions
    description: Transaction signing and broadcasting
  - name: Wallets
    description: Wallet and address management
paths:
  /payout/onramp/quote:
    post:
      tags:
        - 'Payout: On-ramp'
      summary: Get an on-ramp quote (fiat → stablecoin)
      description: >-
        Returns the live exchange rate from Bridge plus the
        developer_fee_percent applied to the conversion. Bridge's 0.75%
        commercial fee is BAKED INTO sell_rate (per Bridge docs); this endpoint
        surfaces the developer fee separately so it can be displayed
        transparently to the end user. Public — no auth required.
      operationId: OnrampQuoteController_quote
      parameters: []
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/OnrampQuoteDto'
      responses:
        '200':
          description: Live quote with rate + fee breakdown
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/OnrampQuoteResponseDto'
        '400':
          description: Validation failed (bad amount or unsupported currency)
      x-codeSamples:
        - lang: bash
          label: cURL
          source: |-
            curl -X POST https://api.relayer.fi/v1/payout/onramp/quote \
              -H "Authorization: ApiKey $RELAYER_API_KEY" \
              -H "Content-Type: application/json" \
              -d '{
                "from":   { "currency": "mxn",  "country": "MX" },
                "to":     { "currency": "usdc", "chain": "base" },
                "amount": "10000.00"
              }'
        - lang: TypeScript
          label: Node.js
          source: >-
            const response = await
            fetch("https://api.relayer.fi/v1/payout/onramp/quote", {
              method: "POST",
              headers: {
                Authorization: `ApiKey ${process.env.RELAYER_API_KEY}`,
                "Content-Type": "application/json",
              },
              body: JSON.stringify({
                from:   { currency: "mxn",  country: "MX" },
                to:     { currency: "usdc", chain: "base" },
                amount: "10000.00",
              }),
            });
components:
  schemas:
    OnrampQuoteDto:
      type: object
      properties:
        source_amount:
          type: string
          description: Amount in source fiat currency. Provide this OR destination_amount.
          example: '1000.00'
        destination_amount:
          type: string
          description: >-
            Desired amount in destination stablecoin. Provide this OR
            source_amount.
          example: '50.00'
        source_currency:
          type: string
          description: Source fiat currency code
          enum:
            - usd
            - eur
            - mxn
            - brl
            - gbp
          example: mxn
        destination_currency:
          type: string
          description: Destination stablecoin code
          enum:
            - usdc
            - usdt
          example: usdc
      required:
        - source_currency
        - destination_currency
    OnrampQuoteResponseDto:
      type: object
      properties:
        source_amount:
          type: string
          example: '1000.00'
        source_currency:
          type: string
          example: mxn
        destination_amount:
          type: string
          example: '49.45'
        destination_currency:
          type: string
          example: usdc
        midmarket_rate:
          type: string
          example: '0.0500'
        sell_rate:
          type: string
          example: '0.0497'
        display_rate:
          type: string
          example: 1 USD ≈ 20.10 MXN
        network_fee_percent:
          type: number
          example: 0.6
          description: Network conversion fee (Bridge spread).
        network_fee_amount:
          type: string
          example: '0.30'
        service_fee_percent:
          type: number
          example: 0.5
          description: Our service fee (Relayer margin).
        service_fee_amount:
          type: string
          example: '0.25'
        total_fee_percent:
          type: number
          example: 1.1
          description: All-in fee vs midmarket rate.
        total_fee_amount:
          type: string
          example: '0.55'
        developer_fee_percent:
          type: number
          example: 0.5
          deprecated: true
        developer_fee_amount:
          type: string
          example: '0.25'
          deprecated: true
        estimated_arrival:
          type: string
          example: ≈ 2 minutes after deposit
      required:
        - source_amount
        - source_currency
        - destination_amount
        - destination_currency
        - midmarket_rate
        - sell_rate
        - display_rate
        - network_fee_percent
        - network_fee_amount
        - service_fee_percent
        - service_fee_amount
        - total_fee_percent
        - total_fee_amount
        - developer_fee_percent
        - developer_fee_amount
        - estimated_arrival
  securitySchemes:
    api-key:
      type: apiKey
      in: header
      name: Authorization
      description: 'Use this format: `ApiKey <your_api_key>`'

````