v1

latestOpenAPI 3.1.0Apache 2.02026-07-2265186296.2 KB
Retail Ramp

Create a crypto quote

Use this endpoint to request the current exchange rate of the selected fiat currency-cryptocurrency pair, and the required fees. Enter a fiat currency as the sourceCurrencyCode to buy crypto and enter a crypto currency in that field to sell crypto.

post/payments/crypto/quote

Query parameters

includeSwapstring

If true, include both direct ramp/offramp quotes and stitched ramp+swap/offramp+swap quotes (CRYPTO_PURCHASE_SWAP / CRYPTO_SELL_SWAP) in the response. When false, swap is only used as a fallback when no direct ramp or offramp providers return quotes. Swap quotes are gated by the per-account onrampSwapEnabled / offrampSwapEnabled preferences regardless of this flag.

Request body

countryCodestring required

Two-letter country code (ISO 3166-1 alpha-2)

customerIdstring

Meld generated unique identifier for your customer. This should be used to track customer activity.

destinationCurrencyCodestring required

Enter a cryptocurrency symbol here if purchasing crypto or a fiat currency 3 letter code if selling crypto.

externalCustomerIdstring

Your unique identifier for your customer. If maintaining your own customer management system this can also be used for tracking customer activity.

paymentMethodTypestring

Payment Method Type or SubType

The paymentMethodType and paymentMethodSubType included here are a sample set. Review the Supported Payment Methods section to view the complete list.

serviceProvidersstring[]

An optional list of Strings representing the Service Providers for this Quote.

Reference Crypto supported service providers for a full list of supported service providers

If this field is null or an empty list, Meld will get quotes from all the service providers linked to the API key used on the request.

sourceAmountnumber required

The source amount for this transaction.

sourceCurrencyCodestring required

Enter a fiat currency 3 letter code here if purchasing crypto or a cryptocurrency symbol if selling crypto.

subdivisionstring

subdivision is a optional parameter Only applicable if the country code is US or CA.

walletAddressstring

Your customer's wallet address

Example request

{
  "countryCode": "US",
  "destinationCurrencyCode": "USD or BTC",
  "sourceAmount": 50,
  "sourceCurrencyCode": "BTC or USD",
  "subdivision": "US-CA"
}

Response

OK