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

# Create Quote

> Obtains a held price quote for a cryptocurrency conversion, valid for a limited time (e.g., 30 seconds). This quote includes the exchange rate and applicable fees, serving as the basis for on-ramp and off-ramp operations.

Quotes are scoped to a customer: `customerId` is required, so [create the customer](/ramps-api/customers/create-customer) before requesting a quote.

For an on-ramp quote, `chain` must be one your account can withdraw `toCurrency` on. [Get Withdrawal Networks](/ramps-api/networks/get-withdrawal-networks) lists them; any other pair is rejected with `400` / `20103`.

The fees must leave a positive amount for the customer to receive. When they take the whole amount, or more (`finalToAmount` would be zero or negative), the quote is rejected with `400` / `20104`. This applies to on-ramp and off-ramp quotes alike.



## OpenAPI

````yaml ramps-api/openapi.json POST /api/v1/quotes/
openapi: 3.1.0
info:
  title: Ripio Ramp API
  version: v1
  description: >-
    API for Ripio ramp services, enabling partners to integrate On-Ramp,
    Off-Ramp, customer management, KYC processes, and other financial
    functionalities. This API is RESTful, uses JSON for requests and responses,
    and standard HTTP status codes. This document is based on the
    'onramp-api.pdf' provided and aims to be compliant with OpenAPI
    Specification v3.1.0. The PDF indicates that the API documentation is a
    draft and subject to change.
servers:
  - url: https://skala-sandbox.ripio.com
    description: Sandbox environment
  - url: https://skala.ripio.com
    description: Production environment
security:
  - BearerToken: []
tags:
  - name: Authentication
    description: Operations related to API authentication and authorization.
  - name: Support Tickets
    description: >-
      Operations for raising and tracking customer support tickets with Ripio's
      support team. This feature must be enabled for your account by the Ripio
      team.
  - name: Customers
    description: Operations related to customer management.
  - name: KYC
    description: Operations related to Know Your Customer processes.
  - name: Investor Profile
    description: >-
      Brazilian accounts only: the investor-profile (suitability) questionnaire
      required by Resolução BCB nº 520/2025.
  - name: Fiat Accounts
    description: Operations related to managing fiat accounts and their requirements.
  - name: Quotes
    description: Operations related to obtaining and managing conversion quotes.
  - name: On-Ramp
    description: Operations related to fiat-to-crypto (on-ramp) processes.
  - name: Off-Ramp
    description: Operations related to crypto-to-fiat (off-ramp) processes.
  - name: Refunds
    description: >-
      Operations for returning the money of an on-ramp or off-ramp operation
      that could not be completed. Each ramp must be enabled for your account by
      the Ripio team.
  - name: Transactions
    description: Operations related to listing and managing all transaction types.
  - name: Networks
    description: >-
      Operations related to retrieving available deposit and withdrawal
      networks.
  - name: Rates
    description: Operations related to retrieving market rates.
  - name: Transaction Limits
    description: >-
      Operations related to retrieving per-transaction limits by currency and
      ramp operation.
  - name: Sandbox
    description: Operations specific to the sandbox environment for testing purposes.
  - name: Webhooks
    description: Webhook event notifications from Ripio Ramp API.
  - name: Sell and Pay
    description: >-
      Endpoints for managing Sell and Pay transactions, which allow customers to
      convert cryptocurrency to fiat currency and pay merchants via QR codes
paths:
  /api/v1/quotes/:
    post:
      tags:
        - Quotes
      summary: Create Quote
      description: >-
        Obtains a held price quote for a cryptocurrency conversion, valid for a
        limited time (e.g., 30 seconds). This quote includes the exchange rate
        and applicable fees, serving as the basis for on-ramp and off-ramp
        operations.


        Quotes are scoped to a customer: `customerId` is required, so [create
        the customer](/ramps-api/customers/create-customer) before requesting a
        quote.


        For an on-ramp quote, `chain` must be one your account can withdraw
        `toCurrency` on. [Get Withdrawal
        Networks](/ramps-api/networks/get-withdrawal-networks) lists them; any
        other pair is rejected with `400` / `20103`.


        The fees must leave a positive amount for the customer to receive. When
        they take the whole amount, or more (`finalToAmount` would be zero or
        negative), the quote is rejected with `400` / `20104`. This applies to
        on-ramp and off-ramp quotes alike.
      operationId: createQuote
      requestBody:
        required: true
        description: Details for the quote request.
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/QuoteCreationRequest'
      responses:
        '201':
          description: Quote created successfully.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/QuoteResponse'
        '400':
          description: >-
            Bad Request - e.g., missing `customerId`, a `customerId` that does
            not exist, invalid currency pair, a non-positive amount, (on-ramp) a
            `chain` your account cannot withdraw `toCurrency` on (`20103`), or
            fees that take the whole amount (`20104`).
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
              examples:
                customerIdMissing:
                  summary: customerId not sent
                  value:
                    code: 20000
                    type: ValidationError
                    detail:
                      customerId:
                        - message: This field is required.
                          code: required
                    status: 400
                customerNotFound:
                  summary: customerId does not match an active customer
                  value:
                    code: 20000
                    type: ValidationError
                    detail:
                      customerId:
                        - message: Customer does not exist.
                          code: invalid
                    status: 400
                withdrawalNetworkNotAvailable:
                  summary: >-
                    On-ramp: the crypto cannot be withdrawn over that chain for
                    your account
                  value:
                    code: 20103
                    type: WithdrawalNetworkNotAvailableException
                    detail:
                      message: >-
                        'USDT' cannot be withdrawn over the 'BASE' network for
                        this account. See GET /withdrawalNetworks/ for the
                        available ones.
                    status: 400
                netAmountNotPositive:
                  summary: >-
                    The fees take the whole amount: nothing would be left for
                    the customer
                  value:
                    code: 20104
                    type: QuoteNetAmountNotPositiveException
                    detail:
                      message: >-
                        The fees exceed the quoted amount: the net amount would
                        be zero or negative.
                    status: 400
        '401':
          description: Unauthorized - Invalid or missing access token.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
              example:
                code: 40001
                type: NotAuthenticated
                detail:
                  message: Authentication credentials were not provided.
                  code: not_authenticated
                status: 401
components:
  schemas:
    QuoteCreationRequest:
      type: object
      description: >-
        Payload for creating a quote. Quotes are always tied to an existing
        customer, so you must create the customer before requesting a quote.
      properties:
        customerId:
          type: string
          format: uuid
          description: >-
            Unique identifier of the customer the quote is for. The customer
            must already exist and be active.
          example: 8142b065-79c4-4f48-9e33-11b17bc658d4
        fromCurrency:
          type: string
          description: The source currency for the conversion.
          example: ARS
        toCurrency:
          type: string
          description: The target currency for the conversion.
          example: USDC
        fromAmount:
          type: string
          description: The amount of the source currency to be converted.
          example: '1500'
        chain:
          type: string
          description: >-
            The blockchain network to be used for the conversion (applicable for
            certain cryptocurrencies).
          example: ETHEREUM_SEPOLIA
        paymentMethodType:
          type: string
          description: >-
            The desired payment method for the conversion (e.g.,
            `bank_transfer`, `breb`, `r2p_bancolombia`, `r2p_nequi`, `pix`).
            Note: `breb`, `r2p_bancolombia` and `r2p_nequi` are only available
            for Colombia; `pix` is only available for Brazil. Additionally,
            `r2p_bancolombia` and `r2p_nequi` are only available for on-ramp
            operations.
          example: bank_transfer
      required:
        - customerId
        - fromCurrency
        - toCurrency
        - fromAmount
        - chain
        - paymentMethodType
    QuoteResponse:
      type: object
      properties:
        quoteId:
          type: string
          format: uuid
          description: Unique identifier for the quote.
          example: 8142b065-79c4-4f48-9e33-11b17bc658d4
        fromCurrency:
          type: string
          description: The source currency for the conversion.
          example: ARS
        toCurrency:
          type: string
          description: The target currency for the conversion.
          example: USDC
        fromAmount:
          type: string
          description: The amount of the source currency to be converted.
          example: '1500.00000000'
        finalFromAmount:
          type: string
          description: The amount of the source currency after fees deduction.
          example: '1400.00000000'
        toAmount:
          type: string
          description: The amount of the target currency received after the conversion.
          example: '1.42857143'
        finalToAmount:
          type: string
          description: The amount of the target currency after fees deduction.
          example: '1.32857143'
        rate:
          type: string
          description: The exchange rate applied for the conversion.
          example: '1050.00000000'
        expiration:
          type: string
          format: date-time
          description: The date and time when the quote expires (UTC).
          example: '2024-04-10T18:17:07.702533Z'
        fees:
          type: array
          items:
            $ref: '#/components/schemas/Fee'
      required:
        - quoteId
        - fromCurrency
        - toCurrency
        - fromAmount
        - finalFromAmount
        - toAmount
        - finalToAmount
        - rate
        - expiration
        - fees
    ErrorResponse:
      type: object
      properties:
        code:
          type: integer
          description: Application-specific error code.
        type:
          type: string
          description: Type of error or exception.
        detail:
          type:
            - object
            - array
          description: >-
            Error details. The shape depends on the error:


            - Most business errors return an object with a `message` key.

            - Field validation errors return an object keyed by field name, each
            holding an array of `{ message, code }`.

            - Request-level validation errors (e.g. a missing query parameter)
            return a bare array of `{ message, code }`.
          properties:
            message:
              type: string
              description: Detailed error message.
          additionalProperties: true
        status:
          type: integer
          description: HTTP status code.
      required:
        - code
        - type
        - detail
        - status
    Fee:
      type: object
      properties:
        amount:
          type: string
          description: The amount of the fee.
          example: '0.37'
        amountInUSD:
          type: string
          nullable: true
          description: >-
            The fee amount converted to USD. Null when no conversion rate is
            available.
          example: '1.01'
        name:
          type: string
          description: The name of the fee. Same value as type.
          example: operational_fee
        type:
          type: string
          description: The type of fee (e.g., Network Fee).
          example: Gas Price
        currency:
          type: string
          description: The currency in which the fee amount is expressed.
          example: ARS
        appliesOnFromAmount:
          type: boolean
          description: >-
            Indicates whether it deducts the amount on the fromAmount or not.
            Always the negation of appliesOnToAmount.
        appliesOnToAmount:
          type: boolean
          description: >-
            Indicates whether it deducts the amount on the toAmount or not.
            Always the negation of appliesOnFromAmount.
        appliesOnFirstOrder:
          type: boolean
          description: >-
            Indicates whether this is a one-time charge applied only on the
            customer's first operation, as opposed to a fee charged on every
            operation. The breakdown is only returned when quoting: persist the
            quote's fees or fetch them again with GET /quotes/{quoteId}, because
            the order endpoints and the webhook return the net amount only.
      required:
        - amount
        - name
        - type
        - currency
        - appliesOnFromAmount
        - appliesOnToAmount
        - appliesOnFirstOrder
  securitySchemes:
    BearerToken:
      type: http
      scheme: bearer
      bearerFormat: JWT
      description: >-
        Access token obtained via
        [/oauth2/token/](/ramps-api/authentication/acquire-access-token). Use as
        `Authorization: Bearer <access_token>`.

````

## Related topics

- [On-Ramp integration](https://docs.ripio.com/ramps-api/guides/on-ramp-integration.md)
- [Ripio on/off-ramp for Privy wallets with 1:1 local stablecoins](https://docs.ripio.com/wfiat/recipes/privy-ramps.md)
- [Create Reusable Quote](https://docs.ripio.com/crypto-as-a-service/reusable-quotes/create-reusable-quote.md)
- [Create Swap Reusable Quotes](https://docs.ripio.com/crypto-as-a-service/swap-reusable-quotes/create-swap-reusable-quotes.md)
- [Execute Reusable Quote](https://docs.ripio.com/crypto-as-a-service/reusable-quote-execution/execute-reusable-quote.md)


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