latestOpenAPI 3.0.32026-08-106722.8 KB

7579ec027be7

Quote

Get buy quote

Returns a real-time buy quote for a currency pair. Supply quoteCurrencyCode, baseCurrencyCode, and quoteCurrencyAmount (fiat amount) to get a detailed buy quote including fees and the amount of crypto the user will receive.

get/v1/quote/buy

Query parameters

quoteCurrencyCodestring required

The fiat currency to buy with.

baseCurrencyCodestring required

The crypto currency to buy.

quoteCurrencyAmountnumber required

The fiat amount the customer wants to spend. Must be a positive decimal with precision no higher than the currency precision.

paymentMethod'CARD' | 'APPLE_PAY' | 'GOOGLE_PAY' | 'BANK_TRANSFER_NIP'

Payment method to be used for the order.

Example:CARD

Payment method to be used for the order. If omitted, the quote will not factor in payment method fees.

countryCodestring

ISO 3166-1 alpha-2 country code, e.g. US.

usStateCodestring

US state code, e.g. AL. Ignored if countryCode is not US.

walletAddressstring

The wallet address where the user wants to receive the crypto.

Response

Buy quote with price, fees, and resulting crypto amount.

quoteCurrencyAmountstring required

The fiat amount the user pays for the transaction.

quoteCurrencyCodestring required

The fiat currency being spent.

baseCurrencyAmountstring required

The amount of crypto converted from quoteCurrencyAmount at price, before fees. See totalAmount for the net amount after fees.

baseCurrencyCodestring required

The crypto currency being purchased.

pricestring required

The buy-side price of the base currency denominated in the quote currency.

processingFeeAmountstring required

Blockchain.com processing fee denominated in the quote (fiat) currency.

partnerFeeAmountstring required

Partner fee denominated in the quote (fiat) currency.

networkFeeAmountstring required

Network (blockchain transaction) fee denominated in the quote (fiat) currency.

totalAmountstring required

Net amount of crypto the user receives after all fees.

paymentMethod'CARD' | 'APPLE_PAY' | 'GOOGLE_PAY' | 'BANK_TRANSFER_NIP'

Payment method to be used for the order.

Example response

{
  "quoteCurrencyAmount": "63.00",
  "quoteCurrencyCode": "USD",
  "quoteCurrency": {
    "type": "FIAT",
    "name": "US Dollar",
    "code": "USD",
    "precision": 2,
    "minBuyAmount": "20.00",
    "maxBuyAmount": "1200.00",
    "network": "BTC",
    "allowedUSStates": [
      "AL",
      "CT"
    ]
  },
  "baseCurrencyAmount": "0.001",
  "baseCurrencyCode": "BTC",
  "baseCurrency": {
    "type": "FIAT",
    "name": "US Dollar",
    "code": "USD",
    "precision": 2,
    "minBuyAmount": "20.00",
    "maxBuyAmount": "1200.00",
    "network": "BTC",
    "allowedUSStates": [
      "AL",
      "CT"
    ]
  },
  "price": "62451.29",
  "processingFeeAmount": "1.00",
  "partnerFeeAmount": "1.00",
  "networkFeeAmount": "1.00",
  "totalAmount": "0.0009",
  "paymentMethod": "CARD"
}