The quotes endpoint provides real-time pricing information for cryptocurrency purchases, including exchange rates, fees, and the final amount users will receive.

POST /v1/quotes

Retrieve current exchange rates and fees for a cryptocurrency purchase.
Important Testnet Limitation: The testnet environment currently supports only USDC, USDT, MATIC on Polygon network. Do not attempt to initiate transactions with other tokens or on other blockchain networks as they will fail. Always use:
  • tokenAddress: USDC, USDT, MATIC
  • chainId: polygon or 80002 (Polygon Amoy testnet)

Request Headers

Content-Type: application/json
X-API-Key: your_api_key_here

Request Body

{
    "side": "BUY",
    "fiatCurrency": "USD",
    "amount": "10",
    "tokenAddress": "USDC",
    "chainId": "polygon",
    "countryCode": "PL"
}

Request Parameters

ParameterTypeRequiredDescription
sidestringYesTransaction type - only “BUY” supported
fiatCurrencystringYesFiat currency code (USD, EUR)
amountstringYes*Amount in fiat currency
convertedAmountstringYes*Amount in crytocurrency
tokenAddressstringYesToken symbol or contract address
chainIdstring/numberYesBlockchain network identifier
countryCodestringNoISO 3166-1 alpha-2 country code
paymentMethodstringNoPayment method**
* Conversion Type:
  • use amount if you want to know conversion rate into cryptocurrency
  • use convertedAmount if you want to know conversion rate into fiat currency.
Providing both will result in an error.
** Payment Methods: There are several payment methods are available.
Payment methodTestnetProduction
cardYesYes
bank_transferYesYes
apple_payNoYes
google_payNoYes

Token Input Formats

The tokenAddress parameter accepts multiple formats:
  • Symbol: "USDC", "MATIC", "DAI"
  • Contract address: "0x2791bca1f2de4661ed88a30c99a7a9449aa84174"

Chain Input Formats

The chainId parameter accepts multiple formats:
  • Network name: "polygon", "ethereum", "arbitrum"
  • Chain ID number: 137, 1, 42161

Response

Returns an array of quote objects:
[
  {
    "estimateID": "01987ad3-0520-784e-807e-75f97fb2b312",
    "quoteID": "01987ad3-0520-7857-b8e9-b72eb5c61c34",
    "conversionPrice": "1",
    "marketConversionPrice": "1.00",
    "fiatCurrency": "USD",
    "cryptoCurrency": "USDC",
    "paymentMethod": "bank_transfer",
    "fiatAmount": "10.00",
    "cryptoAmount": "9.12",
    "isBuyOrSell": "BUY",
    "network": "polygon",
    "fees": {
      "USD": {
        "totalFee": "0.85",
        "partnerFee": "0.13",
        "networkFee": "0.009",
        "transactionFee": "0.84",
        "partnerFixedFee": ""
      }
    },
    "cryptoLiquidityProvider": "Kryptonim",
    "notes": null,
    "tokenAddress": "0x2791bca1f2de4661ed88a30c99a7a9449aa84174",
    "chainId": 80002
  }
]

Response Fields

FieldTypeDescription
estimateIDstringUnique identifier for this estimate
quoteIDstringUnique identifier for this quote
conversionPricestringExchange rate including fees
marketConversionPricestringMarket exchange rate without fees
fiatCurrencystringInput fiat currency
cryptoCurrencystringOutput cryptocurrency
paymentMethodstringSelected payment method
fiatAmountstringInput amount in fiat
cryptoAmountstringOutput amount in crypto
isBuyOrSellstringTransaction type (always “BUY”)
networkstringBlockchain network name
feesobjectFee breakdown by currency
fees.{{currency}}.totalFeestringTotal fee amount
fees.{{currency}}.partnerFeestringPartner fee amount
fees.{{currency}}.networkFeestringNetwork fee amount
fees.{{currency}}.transactionFeestringTransaction fee amount
cryptoLiquidityProviderstringLiquidity provider name
notesnull/arrayAdditional notes or warnings
tokenAddressstringToken contract address
chainIdnumberNumeric chain ID

Integration Examples

requestExample.js
const axios = require('axios');

const response = await axios.post('{{baseURL}}/v1/quotes', {
  side: 'BUY',
  fiatCurrency: 'USD',
  amount: '10',
  tokenAddress: '0x2791bca1f2de4661ed88a30c99a7a9449aa84174',
  chainId: 80002,
  countryCode: 'PL',
  paymentMethod: 'bank_transfer'
}, {
  headers: {
    'Content-Type': 'application/json',
    'X-API-Key': 'your_api_key_here'
  }
});

console.log(response.data);

Error Responses

Invalid Token Address

{
    "error": "Invalid request format",
    "code": "INVALID_REQUEST"
}

Network not found

{
    "code": "NOT_FOUND",
    "message": "network token not found"
}

Invalid currency or blockchain combination

{
    "code": "INVALID_REQUEST",
    "message": "Invalid currency or blockchain combination"
}

Best Practices

Quotes are valid for a limited time. Create a widget session promptly after receiving a quote to ensure the quoted rates remain available.
  1. Always validate the quote response before displaying to users
  2. Show fee breakdown to ensure transparency
  3. Handle edge cases like minimum/maximum amounts
  4. Cache quotes carefully - they expire quickly due to market volatility
Exchange rates can change rapidly. Always fetch fresh quotes when users are ready to proceed with a transaction.