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

# Get a quote

> Build quotes for fiat->crypto transactions



## OpenAPI

````yaml POST /platform/v1/quotes/buy
openapi: 3.1.0
info:
  title: MoonPay
  version: 1.0.0
servers:
  - url: https://api.moonpay.com
    description: Production Environment
    variables: {}
  - url: https://api.moonpay.dev
    description: Sandbox Environment
    variables: {}
security: []
tags:
  - name: Assets
  - name: Quote
  - name: Customer
  - name: Identity
  - name: Transactions
paths:
  /platform/v1/quotes/buy:
    post:
      tags:
        - Quote
      summary: Build a buy quote
      description: >-
        Builds a quote for a fiat-to-crypto buy. Returns locked rate, fees, and
        signature for payment execution.
      operationId: QuoteController.getQuote
      parameters: []
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/GetQuoteBody'
      responses:
        '200':
          description: The request has succeeded.
          content:
            application/json:
              schema:
                type: object
                properties:
                  data:
                    $ref: '#/components/schemas/GetQuoteResponse'
                required:
                  - data
                unevaluatedProperties:
                  not: {}
        '400':
          description: The server could not understand the request due to invalid syntax.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/DevPlatformApiErrorResponse'
        '401':
          description: Access is unauthorized.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/UnauthorizedError'
        '403':
          description: Access is forbidden.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ForbiddenError'
      security:
        - AccessTokenAuth: []
components:
  schemas:
    GetQuoteBody:
      type: object
      required:
        - source
        - destination
      properties:
        source:
          type: object
          required:
            - asset
          properties:
            asset:
              allOf:
                - $ref: '#/components/schemas/AssetBase'
              description: The currency or token being spent
              examples:
                - code: USD
            amount:
              type: string
              description: A stringified amount, which can include decimals.
              examples:
                - '100.02'
                - '10.22'
                - '1.00'
                - '10'
                - '1'
          unevaluatedProperties:
            not: {}
          description: >-
            Source asset in fiat. Amount can be set in `source` or
            `destination`.
          examples:
            - amount: '100.02'
              asset:
                code: USD
        destination:
          type: object
          required:
            - asset
          properties:
            asset:
              $ref: '#/components/schemas/BuyQuoteDestinationAsset'
            amount:
              type: string
              description: The amount being received, if known
          unevaluatedProperties:
            not: {}
          description: >-
            Destination asset in crypto. Amount can be set in `destination` or
            `source`. For DeFi tokens, identify the asset by `caip19` and set
            the amount on `source` only (quoting by destination token amount is
            not supported).
        wallet:
          allOf:
            - $ref: '#/components/schemas/Wallet'
          description: >-
            Wallet address and optional tag where the crypto will be sent.
            Required for the quote to be executable.
        paymentMethod:
          allOf:
            - $ref: '#/components/schemas/QuotePaymentMethod'
          description: >-
            Payment method for the transaction. Required for the quote to be
            executable.
        feeBehavior:
          allOf:
            - $ref: '#/components/schemas/FeeBehavior'
          description: >-
            Whether MoonPay fees are included in `source.amount` (`inclusive`)
            or added on top of it (`exclusive`). Defaults to `inclusive`. Only
            applies when quoting by `source.amount`; ignored when
            `destination.amount` is provided.
          default: inclusive
      unevaluatedProperties:
        not: {}
      examples:
        - source:
            amount: '100'
            asset:
              code: USD
          destination:
            asset:
              caip19: >-
                solana:5eykt4UsFv8P8NJdTREpY1vzqKqZKvdp/token:2zMMhcVQEXDtdE6vsFS7S7D5oUodfJHE8vd1gnBouauv
          wallet:
            address: 9xQeWvG816bUx9EPjHmaT23yvVM2ZWbrrpZb9PusVFin
        - source:
            asset:
              code: USD
          destination:
            amount: '100'
            asset:
              code: USDC
          wallet:
            address: '0x1234567890123456789012345678901234567890'
          paymentMethod:
            type: card
            id: 00000000-0000-0000-0000-000000000000
        - source:
            amount: '100'
            asset:
              code: USD
          destination:
            asset:
              code: XLM
          wallet:
            address: GBKZP2H5572E3P4B6GTCU4Z6V6P77JL7IF7A6E3UWYJ2LXFMR43W
            tag: '1234567890'
          paymentMethod:
            type: paypal
        - source:
            amount: '100'
            asset:
              code: USD
          destination:
            asset:
              code: USDC
          wallet:
            address: '0x1234567890123456789012345678901234567890'
          paymentMethod:
            type: apple_pay
    GetQuoteResponse:
      type: object
      required:
        - source
        - destination
        - fees
        - wallet
        - paymentMethod
        - feeBehavior
        - limits
        - expiresAt
        - executable
        - exchangeRate
        - paymentDisclosures
        - signature
      properties:
        source:
          type: object
          required:
            - amount
            - asset
          properties:
            amount:
              type: string
              description: A stringified amount, which can include decimals.
              examples:
                - '100.02'
                - '10.22'
                - '1.00'
                - '10'
                - '1'
            asset:
              allOf:
                - $ref: '#/components/schemas/Asset'
              description: The currency or token being spent
              examples:
                - code: USD
          unevaluatedProperties:
            not: {}
          description: 'Source side of the quote: amount and asset (fiat currency) you send.'
        destination:
          type: object
          required:
            - amount
            - asset
          properties:
            amount:
              type: string
              description: A stringified amount, which can include decimals.
              examples:
                - '100.02'
                - '10.22'
                - '1.00'
                - '10'
                - '1'
            asset:
              $ref: '#/components/schemas/QuoteDestinationAsset'
          unevaluatedProperties:
            not: {}
          description: >-
            Destination side of the quote: amount and asset (cryptocurrency) the
            customer receives.
          examples:
            - amount: '100.02'
              asset:
                code: USDC
        fees:
          allOf:
            - $ref: '#/components/schemas/Fees'
          description: Breakdown of network, MoonPay, and ecosystem fees.
        wallet:
          anyOf:
            - $ref: '#/components/schemas/Wallet'
            - type: 'null'
          description: >-
            Wallet address and optional tag where the crypto will be sent. Null
            when not provided.
        paymentMethod:
          anyOf:
            - $ref: '#/components/schemas/QuotePaymentMethod'
            - type: 'null'
          description: The payment method used for the quote.
        feeBehavior:
          allOf:
            - $ref: '#/components/schemas/FeeBehavior'
          description: >-
            How MoonPay fees relate to `source.amount` in this quote. Echoes the
            requested `feeBehavior`; always `inclusive` when the quote was
            priced by `destination.amount`.
        limits:
          anyOf:
            - $ref: '#/components/schemas/QuoteLimits'
            - type: 'null'
        expiresAt:
          type: string
          format: date-time
          description: >-
            An [ISO 8601](https://en.wikipedia.org/wiki/ISO_8601) timestamp of
            when the quote expires.
        executable:
          type: boolean
          description: >-
            Whether the quote can be executed. Only `executable` quotes can be
            used to initiate payment frames.
        exchangeRate:
          type: string
          description: >-
            The rate used to convert fiat <-> crypto, expressed as the fiat
            value of one unit of crypto (e.g. `1 SOL = {exchangeRate} USD`).
          examples:
            - '1.001'
            - '87523.17'
        slippageBps:
          type: integer
          format: int32
          description: >-
            Slippage tolerance applied to the DeFi swap, in basis points (e.g.
            `50` = 0.5%). Only present when the destination is a DeFi token.
          examples:
            - 50
        paymentDisclosures:
          type: array
          items:
            $ref: '#/components/schemas/PaymentDisclosure'
          description: >-
            Disclosures the partner must render verbatim before the customer can
            complete the transaction. Empty when no disclosure is required for
            the customer's geography, payment method, and asset combination.
        signature:
          type: string
          description: An opaque token representing the quote to initiate payment frames.
          examples:
            - cXVvdGUuc2lnbmF0dXJl...
      description: >-
        Quote for a fiat-to-crypto buy. Contains locked rate, fees, expiry, and
        signature for payment execution.
      examples:
        - source:
            amount: '100.00'
            asset:
              code: USD
          destination:
            amount: '31250.0'
            asset:
              caip19: >-
                solana:5eykt4UsFv8P8NJdTREpY1vzqKqZKvdp/token:2zMMhcVQEXDtdE6vsFS7S7D5oUodfJHE8vd1gnBouauv
              code: PENGU
              name: Pudgy Penguins
              precision: 6
          fees:
            network:
              amount: '2.39'
              asset:
                code: USD
            moonpay:
              amount: '4.99'
              asset:
                code: USD
            ecosystem:
              amount: '1.00'
              asset:
                code: USD
            defi:
              amount: '1.00'
              asset:
                code: USD
          wallet:
            address: 9xQeWvG816bUx9EPjHmaT23yvVM2ZWbrrpZb9PusVFin
          paymentMethod: {}
          feeBehavior: inclusive
          limits: null
          expiresAt: '2026-03-27T12:30:00.000Z'
          executable: true
          exchangeRate: '0.0032'
          slippageBps: 50
          paymentDisclosures:
            - id: gateway-token
              version: '1'
          signature: cXVvdGUuc2lnbmF0dXJl...
        - source:
            amount: '100.00'
            asset:
              code: USD
          destination:
            amount: '0.00114'
            asset:
              code: BTC
          fees:
            network:
              amount: '2.39'
              asset:
                code: USD
            moonpay:
              amount: '4.99'
              asset:
                code: USD
            ecosystem:
              amount: '1.00'
              asset:
                code: USD
          wallet:
            address: '0x1234567890123456789012345678901234567890'
          paymentMethod: {}
          feeBehavior: inclusive
          limits: null
          expiresAt: '2026-03-27T12:30:00.000Z'
          executable: true
          exchangeRate: '87523.17'
          paymentDisclosures:
            - id: eea-crypto-asset-risk
              version: '1'
          signature: cXVvdGUuc2lnbmF0dXJl...
    DevPlatformApiErrorResponse:
      type: object
      required:
        - code
        - message
      properties:
        code:
          allOf:
            - $ref: '#/components/schemas/DevPlatformApiErrorCodes'
          description: Code identifying the error type.
          examples:
            - forbidden
            - unauthorized
            - invalid_request
        message:
          type: string
          description: Human-readable error message.
          examples:
            - Forbidden
            - Not authorized
            - One or more request parameters are invalid.
        errors:
          type: array
          items:
            $ref: '#/components/schemas/DevPlatformErrorDetail'
          description: Optional list of field-level error details.
          examples:
            - - field: source.amount
                message: >-
                  Source amount must be a numeric string. Example "100" or
                  "10.25".
      unevaluatedProperties:
        not: {}
      description: Response body returned when a request fails.
    UnauthorizedError:
      type: object
      required:
        - code
        - message
      properties:
        code:
          type: string
          enum:
            - unauthorized
        message:
          type: string
          enum:
            - Not authorized
      unevaluatedProperties:
        not: {}
      description: Missing or invalid credentials.
    ForbiddenError:
      type: object
      required:
        - code
        - message
      properties:
        code:
          type: string
          enum:
            - forbidden
        message:
          type: string
          enum:
            - Forbidden
      unevaluatedProperties:
        not: {}
      description: Insufficient permissions.
    AssetBase:
      type: object
      required:
        - code
      properties:
        code:
          type: string
          description: >-
            A fiat or crypto currency code.


            **Fiat**

            Fiat codes are represented as [ISO
            4217](https://en.wikipedia.org/wiki/ISO_4217) codes.


            Currently only `USD` is supported.


            **Crypto**

            For crypto currency codes, see [supported
            currencies](https://dev.moonpay.com/docs/list-of-supported-cryptocurrencies).


            Examples: `BTC` `SOL` `ETH` `USDC_BASE` `USDC_SOL`
      unevaluatedProperties:
        not: {}
    BuyQuoteDestinationAsset:
      type: object
      properties:
        code:
          type: string
          description: CeFi currency code, e.g. `BTC` or `ETH`. Use for centralised assets.
          examples:
            - ETH
        caip19:
          type: string
          description: >-
            CAIP-19 asset identifier from the assets listing. Required for DeFi
            tokens.
          examples:
            - >-
              solana:5eykt4UsFv8P8NJdTREpY1vzqKqZKvdp/token:2zMMhcVQEXDtdE6vsFS7S7D5oUodfJHE8vd1gnBouauv
      unevaluatedProperties:
        not: {}
      description: >-
        Destination crypto asset. Identify it by `code` for CeFi assets, or by
        `caip19` (the CAIP-19 identifier from the assets listing) for DeFi
        tokens, whose `code` is not unique. Provide exactly one; `caip19` takes
        precedence if both are sent.
    Wallet:
      type: object
      required:
        - address
      properties:
        address:
          type: string
          description: The wallet address used for the transaction.
          examples:
            - '0x1234567890123456789012345678901234567890'
        tag:
          type: string
          description: >-
            An optional memo or destination tag (used by some blockchains such
            as XRP or XLM).
      unevaluatedProperties:
        not: {}
      examples:
        - address: '0x1234567890123456789012345678901234567890'
    QuotePaymentMethod:
      type: object
      required:
        - type
      properties:
        type:
          $ref: '#/components/schemas/PaymentMethodType'
        id:
          type: string
          description: >-
            Unique identifier of the payment method. Used to identify the
            specific card when type is card.
      unevaluatedProperties:
        not: {}
    FeeBehavior:
      type: string
      enum:
        - inclusive
        - exclusive
      description: >-
        Controls how MoonPay fees relate to `source.amount`. `inclusive`: fees
        are taken out of `source.amount` (the customer pays exactly
        `source.amount`). `exclusive`: `source.amount` is the amount to convert
        and fees are added on top (the customer pays `source.amount` plus fees).
        Only affects quotes priced by `source.amount`; ignored when quoting by
        `destination.amount`.
    Asset:
      type: object
      required:
        - code
      properties:
        code:
          type: string
          description: >-
            A fiat or crypto currency code.


            **Fiat**

            Fiat codes are represented as [ISO
            4217](https://en.wikipedia.org/wiki/ISO_4217) codes.


            Currently only `USD` is supported.


            **Crypto**

            For crypto currency codes, see [supported
            currencies](https://dev.moonpay.com/docs/list-of-supported-cryptocurrencies).


            Examples: `BTC` `SOL` `ETH` `USDC_BASE` `USDC_SOL`
        name:
          type: string
          description: The human-readable name
        precision:
          type: integer
          format: int32
          description: The number of supported decimal places
      unevaluatedProperties:
        not: {}
      description: A fiat currency or crypto token
    QuoteDestinationAsset:
      type: object
      required:
        - code
      properties:
        code:
          type: string
          description: >-
            A fiat or crypto currency code.


            **Fiat**

            Fiat codes are represented as [ISO
            4217](https://en.wikipedia.org/wiki/ISO_4217) codes.


            Currently only `USD` is supported.


            **Crypto**

            For crypto currency codes, see [supported
            currencies](https://dev.moonpay.com/docs/list-of-supported-cryptocurrencies).


            Examples: `BTC` `SOL` `ETH` `USDC_BASE` `USDC_SOL`
        name:
          type: string
          description: The human-readable name
        precision:
          type: integer
          format: int32
          description: The number of supported decimal places
        caip19:
          type: string
          description: >-
            The CAIP-19 asset identifier (encodes chain and contract). Present
            for DeFi tokens.
      unevaluatedProperties:
        not: {}
      description: >-
        Destination crypto asset returned on the quote. Adds the resolved
        network and, for DeFi tokens, the CAIP-19 identifier on top of the base
        asset fields.
    Fees:
      type: object
      properties:
        network:
          allOf:
            - $ref: '#/components/schemas/MonetaryFeeAmount'
          description: Network fees (in fiat) for the transaction.
        moonpay:
          allOf:
            - $ref: '#/components/schemas/MonetaryFeeAmount'
          description: MoonPay fees (in fiat) for the transaction.
        ecosystem:
          allOf:
            - $ref: '#/components/schemas/MonetaryFeeAmount'
          description: Ecosystem fees (in fiat) for the transaction, if applicable.
        defi:
          allOf:
            - $ref: '#/components/schemas/MonetaryFeeAmount'
          description: >-
            DeFi swap fee (in fiat) for the transaction, converted to the
            quote's base currency like the other fees. Present only for DeFi
            swaps that carry an itemized swap fee; when the fee is taken
            on-chain it is reflected in `destination.amount` instead.
        partner:
          allOf:
            - $ref: '#/components/schemas/MonetaryFeeAmount'
          description: >-
            Partner fees (in fiat) for the transaction, if applicable.
            Deprecated: use `fees.ecosystem` instead. This field will be removed
            in a future release.
          deprecated: true
      unevaluatedProperties:
        not: {}
      examples:
        - network:
            amount: '2.39'
            asset:
              code: USD
          moonpay:
            amount: '4.99'
            asset:
              code: USD
          ecosystem:
            amount: '1.00'
            asset:
              code: USD
    QuoteLimits:
      type: object
      properties:
        daily:
          allOf:
            - $ref: '#/components/schemas/QuoteLimitEntry'
          description: The daily limit.
        monthly:
          allOf:
            - $ref: '#/components/schemas/QuoteLimitEntry'
          description: The monthly limit.
        yearly:
          allOf:
            - $ref: '#/components/schemas/QuoteLimitEntry'
          description: The yearly limit.
      unevaluatedProperties:
        not: {}
      description: Limits applicable to the quote.
    PaymentDisclosure:
      type: object
      required:
        - id
        - version
      properties:
        id:
          type: string
          description: >-
            Stable identifier of the disclosure. Each id maps to one specific
            piece of text. The full list of ids and their canonical text is
            published in the developer documentation.
        version:
          type: string
          description: >-
            Version of the disclosure text. Bumped whenever the canonical
            wording for this `id` changes. Partners that receive an unknown
            `(id, version)` pair should fall back to a conservative disclosure
            and alert their integration team.
      unevaluatedProperties:
        not: {}
      description: >-
        A payment disclosure that the partner must render verbatim before the
        customer can complete the transaction.
      examples:
        - id: eea-crypto-asset-risk
          version: '1'
    DevPlatformApiErrorCodes:
      type: string
      enum:
        - unknown_error
        - unauthorized
        - forbidden
        - not_found
        - invalid_request
        - not_implemented
        - too_many_requests
        - not_allowed
        - conflict
        - unprocessable_entity
        - sse_timeout
        - sse_error
        - service_unavailable
        - requirements_incomplete
        - requirement_not_pending
        - verification_rejected
        - country_mismatch
        - upload_expired
        - unsupported_country
        - verification_pending
        - kyc_not_approved
        - no_outstanding_requirements
        - terms_accepted_at_out_of_range
    DevPlatformErrorDetail:
      type: object
      required:
        - message
      properties:
        field:
          type: string
          description: Field that caused the error.
        message:
          type: string
          description: Human-readable error message for this field.
        details:
          type: object
          unevaluatedProperties: {}
          description: >-
            Extra data that describes the error in more detail, useful when
            debugging or logging. Keys vary by error and are not part of the API
            contract. For example, an amount-limit error includes the limit
            value as "maxBuyAmount" or "minBuyAmount".
      unevaluatedProperties:
        not: {}
    PaymentMethodType:
      type: string
      enum:
        - apple_pay
        - card
        - ach
        - fps
        - fps_open_banking
        - google_pay
        - sepa
        - sepa_open_banking
        - pix
        - paypal
        - venmo
        - revolut_pay
        - moonpay_balance
        - interac
    MonetaryFeeAmount:
      type: object
      required:
        - amount
        - asset
      properties:
        amount:
          type: string
          description: The amount of fees in fiat.
          examples:
            - '1'
            - '1.00'
            - '10.22'
            - '100.02'
        asset:
          allOf:
            - $ref: '#/components/schemas/AssetBase'
          description: The fiat currency used to pay the fees.
          examples:
            - code: USD
      unevaluatedProperties:
        not: {}
    QuoteLimitEntry:
      type: object
      required:
        - limit
        - remaining
      properties:
        limit:
          allOf:
            - $ref: '#/components/schemas/LimitWithAsset'
          description: The maximum amount.
        remaining:
          allOf:
            - $ref: '#/components/schemas/LimitWithAsset'
          description: The remaining amount.
      unevaluatedProperties:
        not: {}
    LimitWithAsset:
      type: object
      required:
        - amount
        - asset
      properties:
        amount:
          type: string
          description: A stringified amount, which can include decimals.
          examples:
            - '1'
            - '10.22'
            - '100.02'
        asset:
          allOf:
            - $ref: '#/components/schemas/AssetBase'
          examples:
            - code: USD
      unevaluatedProperties:
        not: {}
  securitySchemes:
    AccessTokenAuth:
      type: http
      scheme: bearer
      description: |-
        Bearer authentication header using an access token.

        Example: `Authorization: Bearer <accessToken>`

````