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

# Get quote

> Retrieve a quote while it is valid.



## OpenAPI

````yaml /openapi.yaml get /v1/ramp/quote/{reference}
openapi: 3.1.0
info:
  title: Onstacks Backend API
  version: 0.1.0
  summary: >-
    Public API contract for workspace wallet, transfer, provider routing, API
    key, and webhook flows.
servers:
  - url: https://api.onstacks.io
security: []
tags:
  - name: Health
  - name: Workspace
  - name: Wallets
  - name: Transfers
  - name: Corridors
  - name: Providers
  - name: Quotes
  - name: Ramp
paths:
  /v1/ramp/quote/{reference}:
    get:
      tags:
        - Ramp
      summary: Get quote
      description: Retrieve a quote while it is valid.
      parameters:
        - $ref: '#/components/parameters/EnvironmentQuery'
        - in: path
          name: reference
          required: true
          description: Quote reference.
          schema:
            type: string
      responses:
        '200':
          description: Quote
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/RampQuoteResponse'
        '401':
          $ref: '#/components/responses/Unauthorized'
        '404':
          $ref: '#/components/responses/NotFound'
      security:
        - apiKeyBearer: []
components:
  parameters:
    EnvironmentQuery:
      in: query
      name: environment
      description: >-
        Environment scope for environment-partitioned resources. Defaults to
        `sandbox` when omitted.
      required: false
      schema:
        $ref: '#/components/schemas/EnvironmentScope'
  schemas:
    RampQuoteResponse:
      type: object
      required:
        - data
        - error
        - request_id
      properties:
        data:
          $ref: '#/components/schemas/RampQuote'
        error:
          type: 'null'
        request_id:
          type: string
    EnvironmentScope:
      type: string
      enum:
        - sandbox
        - live
      default: sandbox
    RampQuote:
      type: object
      properties:
        quote_reference:
          type: string
        direction:
          $ref: '#/components/schemas/RampDirection'
        rail:
          $ref: '#/components/schemas/RampRail'
        provider:
          type: string
          description: Provider code that will settle the fiat leg.
        source:
          $ref: '#/components/schemas/RampAmount'
        destination:
          $ref: '#/components/schemas/RampAmount'
        fee:
          $ref: '#/components/schemas/RampAmount'
        rate:
          type: string
        source_country:
          type: string
        destination_country:
          type: string
        expires_at:
          type: string
          format: date-time
        metadata:
          type: object
          additionalProperties: true
    ErrorEnvelope:
      type: object
      required:
        - data
        - error
        - request_id
      properties:
        data:
          type: 'null'
        error:
          $ref: '#/components/schemas/ApiError'
        request_id:
          type: string
    RampDirection:
      type: string
      enum:
        - on_ramp
        - off_ramp
    RampRail:
      type: string
      enum:
        - bank
        - mobile_money
        - wallet
        - ach
        - wire
        - sepa
        - faster_payments
        - interac
    RampAmount:
      type: object
      required:
        - amount
        - asset
      properties:
        amount:
          type: string
          description: Minor units for fiat, base units for crypto, as a decimal string.
          example: '1000000'
        asset:
          type: string
          example: USDC
        network:
          type: string
          description: Network code for crypto assets.
          example: base
    ApiError:
      type: object
      required:
        - code
        - message
      properties:
        code:
          type: string
        message:
          type: string
        details:
          type: object
          additionalProperties: true
  responses:
    Unauthorized:
      description: Caller is not authenticated
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/ErrorEnvelope'
    NotFound:
      description: Requested resource does not exist
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/ErrorEnvelope'
  securitySchemes:
    apiKeyBearer:
      type: http
      scheme: bearer
      bearerFormat: API key
      description: 'Workspace API key. Send it as `Authorization: Bearer <api_key>`.'

````

This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.