POST
/
v1
/
buy
/
quote
Create buy quote
curl --request POST \
  --url https://api.developer.coinbase.com/onramp/v1/buy/quote \
  --header 'Authorization: Bearer <token>' \
  --header 'Content-Type: application/json' \
  --data '{
  "country": "<string>",
  "paymentAmount": "<string>",
  "paymentCurrency": "<string>",
  "paymentMethod": "UNSPECIFIED",
  "purchaseCurrency": "<string>",
  "purchaseNetwork": "<string>",
  "subdivision": "<string>"
}'
{
  "coinbaseFee": {
    "currency": "<string>",
    "value": "<string>"
  },
  "networkFee": {
    "currency": "<string>",
    "value": "<string>"
  },
  "paymentSubtotal": {
    "currency": "<string>",
    "value": "<string>"
  },
  "paymentTotal": {
    "currency": "<string>",
    "value": "<string>"
  },
  "purchaseAmount": {
    "currency": "<string>",
    "value": "<string>"
  },
  "quoteId": "<string>"
}

Authorizations

Authorization
string
header
required

Enter your JSON Web Token (JWT) here. Refer to the Generate JWT section of our Authentication docs for information on how to generate your Bearer Token.

Body

application/json

Create Buy Quote API request parameters

country
string
required

The ISO 3166-1 two letter country code e.g. US

paymentAmount
string
required

Amount of fiat to be converted to purchase_currency e.g. 100.00

paymentCurrency
string
required

Fiat currency for payment_amount e.g. USD

paymentMethod
enum<string>
required

The type of payment method to be used to purchase

Available options:
UNSPECIFIED,
CARD,
ACH_BANK_ACCOUNT,
APPLE_PAY,
FIAT_WALLET,
CRYPTO_ACCOUNT,
GUEST_CHECKOUT_CARD,
PAYPAL,
RTP,
GUEST_CHECKOUT_APPLE_PAY
purchaseCurrency
string
required

The ticker (e.g. BTC, USDC) or the UUID (e.g. d85dce9b-5b73-5c3c-8978-522ce1d1c1b4) of crypto asset to be purchased

purchaseNetwork
string

Network name to receive crypto on e.g. ethereum, base

subdivision
string

The ISO 3166-2 two letter state code e.g. NY, only required for US

Response

OK

Create Buy Quote API response

coinbaseFee
object

A monetary amount represented by a decimal value and currency symbol

networkFee
object

A monetary amount represented by a decimal value and currency symbol

paymentSubtotal
object

A monetary amount represented by a decimal value and currency symbol

paymentTotal
object

A monetary amount represented by a decimal value and currency symbol

purchaseAmount
object

A monetary amount represented by a decimal value and currency symbol

quoteId
string

UUID that should be passed into the Onramp Widget URL as the quoteId query parameter