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>",
  "destinationAddress": "<string>",
  "paymentAmount": "<string>",
  "paymentCurrency": "<string>",
  "paymentMethod": "UNSPECIFIED",
  "purchaseCurrency": "<string>",
  "purchaseNetwork": "<string>",
  "subdivision": "<string>"
}'
{
  "coinbase_fee": {
    "currency": "<string>",
    "value": "<string>"
  },
  "network_fee": {
    "currency": "<string>",
    "value": "<string>"
  },
  "onramp_url": "<string>",
  "payment_subtotal": {
    "currency": "<string>",
    "value": "<string>"
  },
  "payment_total": {
    "currency": "<string>",
    "value": "<string>"
  },
  "purchase_amount": {
    "currency": "<string>",
    "value": "<string>"
  },
  "quote_id": "<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

destinationAddress
string

Destination Wallet address. Optional for creating buy quote. Required for generating a ready-to-use one-click-buy URL

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

coinbase_fee
object

A monetary amount represented by a decimal value and currency symbol

network_fee
object

A monetary amount represented by a decimal value and currency symbol

onramp_url
string

Ready-to-use one-click-buy URL. Only returned when destination_address is provided in the request

payment_subtotal
object

A monetary amount represented by a decimal value and currency symbol

payment_total
object

A monetary amount represented by a decimal value and currency symbol

purchase_amount
object

A monetary amount represented by a decimal value and currency symbol

quote_id
string

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