Skip to content
Last updated

Get a Quote

For the complete documentation index, see llms.txt. Append .md to any page URL for its markdown version.

Retrieve current pricing for a crypto transaction before creating an order. Always call this endpoint immediately before displaying a price to the customer — do not cache responses.


Endpoint

GET /{partnerRef}/v2/quotes/{orderType}
Path parameterDescription
orderTypebuy or sell. If omitted, a buy quote is returned.

Query parameters

ParameterRequiredDescription
fiatYesFiat currency code (e.g., AUD, USD, EUR). Must be a value from GET /v2/fiats/{orderType}.
cryptoYesCryptocurrency code (e.g., ETH, BTC, USDT). Must be a value from GET /v2/crypto/{orderType}.
blockchainNoBlockchain network (e.g., ETH, BNB). If omitted, the default blockchain for the crypto is used. Pass it for multi-chain assets.
paymentMethodIdYesPayment method identifier. For sell quotes, the payout method. See supported values below.
fiatAmountConditionalFiat amount. Buy: the amount the customer spends. Sell: the amount the customer receives. Either fiatAmount or cryptoAmount must be provided.
cryptoAmountConditionalCrypto amount. Buy: the amount the customer receives. Sell: the amount the customer sells. Either fiatAmount or cryptoAmount must be provided. If both are sent, cryptoAmount is used.
externalCustomerIdNoYour stable customer identifier. Used to return more accurate pricing based on order history.
ipAddressNoCustomer's IP address. Used to determine regional availability and pricing.
discountCodeNoDiscount code to apply to the quote.

Payment method IDs

Buy: debit-credit-card · apple-pay · sepa-bank-transfer · gbp-bank-transfer · payid-bank-transfer · upi · paypal

Sell: payid-bank-transfer (NPP Direct Entry, AUD) · sepa-bank-transfer (EUR) · interac-bank-transfer (CAD) · ach-bank-transfer (USD) · gbp-bank-transfer (GBP) · debit-credit-card (card payout, EUR)

→ See Supported Payment Methods for the full list.


Example request

curl -X GET "https://api.banxa-sandbox.com/{partnerRef}/v2/quotes/buy" \
  -H "x-api-key: YOUR_API_KEY" \
  -G \
  --data-urlencode "fiat=AUD" \
  --data-urlencode "crypto=ETH" \
  --data-urlencode "blockchain=ETH" \
  --data-urlencode "paymentMethodId=debit-credit-card" \
  --data-urlencode "fiatAmount=200"

Response

A successful response returns pricing for the requested combination.

{
  "paymentMethodId": "debit-credit-card",
  "cryptoAmount": "0.03564700",
  "fiatAmount": "200.00",
  "processingFee": "0.92",
  "networkFee": "1.67",
  "partnerFee": "0"
}
FieldDescription
paymentMethodIdPayment method the quote applies to
cryptoAmountBuy: crypto amount the customer will receive. Sell: crypto amount the customer sends.
fiatAmountBuy: fiat amount the customer will spend. Sell: fiat amount the customer will receive.
processingFeeBanxa processing fee in fiat
networkFeeBlockchain network fee in fiat
partnerFeeYour partner fee in fiat

Response with discount code

When a discountCode is provided, the response is an array. Each item includes a discount object with the original (pre-discount) quote values alongside the discounted result:

[
  {
    "paymentMethodId": "debit-credit-card",
    "cryptoAmount": "0.03564700",
    "fiatAmount": "200.00",
    "processingFee": "0.92",
    "networkFee": "1.67",
    "partnerFee": "0",
    "discount": {
      "originalQuote": {
        "originalCryptoAmount": "0.235214",
        "orginalNetworkFee": "0.00",
        "originalProcessingFee": "0.00",
        "originalFiatAmount": "500.00"
      },
      "discountCode": "XMAS"
    }
  }
]

Sell quotes

Call the same endpoint with sell as the orderType, and pass the payout method as paymentMethodId. The response has the same fields.

curl -X GET "https://api.banxa-sandbox.com/{partnerRef}/v2/quotes/sell" \
  -H "x-api-key: YOUR_API_KEY" \
  -G \
  --data-urlencode "fiat=EUR" \
  --data-urlencode "crypto=ETH" \
  --data-urlencode "blockchain=ETH" \
  --data-urlencode "paymentMethodId=sepa-bank-transfer" \
  --data-urlencode "cryptoAmount=0.5"
{
  "paymentMethodId": "sepa-bank-transfer",
  "cryptoAmount": "0.5",
  "fiatAmount": "1180.42",
  "processingFee": "1.18",
  "networkFee": "0.95",
  "partnerFee": "0"
}

Here cryptoAmount is what the customer sells and fiatAmount is what they receive. To create the order, see Create Sell Order.


Usage notes

  • Call this endpoint for every order — pricing changes frequently.
  • If cryptoAmount is provided, the response will include the equivalent fiatAmount and vice versa.
  • Use the returned values to populate your quote UI before creating an order.
  • The quote is not a guarantee of price. The final price is confirmed at checkout.
  • Quotes are display-only: the response contains no quote ID and there is no fixed validity window. There is nothing to pass into order creation; re-quote whenever the customer changes amount, currency, or payment method.
  • The Banxa spread is embedded in the exchange rate. For some payment methods processingFee can be 0 while the spread is applied via the rate. To calculate the effective all-in rate, divide fiatAmount by cryptoAmount.
  • Sandbox pricing is not refreshed at production frequency; validate flow in sandbox, pricing in production.
  • Amounts must be within the minimum and maximum for the payment method; otherwise the request fails validation with 422. Get the limits from GET /v2/fiats/{orderType}, which lists them per payment method. For sell, call GET /v2/fiats/sell for the payout method limits.