Skip to content

Retrieve quotes

Request

Allows you to retrieve a detailed quote for a user order. This endpoint should only be called when a user requests a quote by providing the cryptocurrency, fiat, amounts and payment method. This endpoint is for dynamic quotations and not to retrieve a list of static prices that can be cached. For all partners, the rate limit is capped at 500/minute for all endpoints combined which is tied to a single IP.

Path
partnerstringrequired

This is the partner code provided to you during onboarding. e.g. metamask.

orderTypestringrequired

Whether to return availability for buy or sell orders.

Default:"buy"
Enum:"buy""sell"
Query
paymentMethodIdstringrequired

The payment method chosen by the user.

Example:paymentMethodId=debit-credit-card
cryptostringrequired

This is the crypto type the customer wants to buy or sell.

Example:crypto=ETH
blockchainstringrequired

The blockchain that the crypto token is associated with.

Example:blockchain=ETH
fiatstringrequired

This is the fiat type the customer wants to buy or sell.

Example:fiat=AUD
cryptoAmountstring

The amount of cryptocurrency the user wants to buy or sell. Either fiatAmount OR cryptoAmount must be provided. If both are provided, then cryptoAmount will be used.

Example:cryptoAmount=0.05
fiatAmountstring

The amount of fiat the user wants to buy or sell. Either fiatAmount OR cryptoAmount must be provided. If both are provided, then cryptoAmount will be used.

Example:fiatAmount=200
externalCustomerIdstring

The customer ID that you define. By passing this value, we will be able to provide the customer the most accurate pricing based on their customer details.

Example:externalCustomerId=user_12345
ipAddressstring

User’s IP address. Used to validate whether the user is in a location that is supported by Banxa. If invalid IP address or IP address associated to a country that is not supported, then an error will be returned.

Example:ipAddress=203.0.113.10
discountCodestring

Allows you to configure the discount to your commission rate per quote. This can be a promotion code such as XMAS or a way to differentiate between your customers.

Example:discountCode=XMAS
Headers
Acceptstring
Default:"application/json"
x-api-keystring

This is the API Key that has been provided to you during onboarding.

Example:YOUR_API_KEY
curl -i -X GET \
  'https://docs.banxa.com/_mock/products/hosted-checkout/openapi/{partner}/v2/quotes/{orderType}?paymentMethodId=debit-credit-card&crypto=ETH&blockchain=ETH&fiat=AUD&cryptoAmount=0.05&fiatAmount=200&externalCustomerId=user_12345&ipAddress=203.0.113.10&discountCode=XMAS' \
  -H 'Accept: application/json' \
  -H 'x-api-key: YOUR_API_KEY'

Responses

Quote for the requested amount. Returned as an array when discountCode is provided.

Bodyapplication/json
One of:
paymentMethodIdstring
Example:"debit-credit-card"
cryptoAmountstring
Example:"0.03564700"
fiatAmountstring
Example:"100.00"
processingFeestring

Payment gateway fee.

Example:"0.92"
networkFeestring
Example:"1.67"
Response
{ "paymentMethodId": "debit-credit-card", "cryptoAmount": "0.03564700", "fiatAmount": "100.00", "processingFee": "0.92", "networkFee": "1.67" }