Skip to main content
GET
https://api.stablepay.global
/
v2
/
quotes
Get Quote
curl --request GET \
  --url https://api.stablepay.global/v2/quotes \
  --header 'Authorization: Bearer <token>'

Get Quote

Returns the current exchange rate without creating a transaction. Rates are fetched live from multiple exchange rate providers with automatic failover.
amount
string
required
Amount in USD
asset
string
required
USDC or USDT
network
string
required
Blockchain network

Request

curl "https://api.stablepay.global/v2/quotes?amount=100&asset=USDC&network=polygon" \
  -H "Authorization: Bearer YOUR_API_KEY"

Response

{
  "success": true,
  "data": {
    "rate": 90.22,
    "rateSource": "frankfurter",
    "rateCached": true,
    "feePercent": 0.005,
    "grossInr": "9022.00",
    "feeInr": "45.11",
    "netInr": "8976.89",
    "validFor": 86400,
    "asset": "USDC",
    "network": "polygon"
  }
}

Response Fields

FieldTypeDescription
ratenumberCurrent USD/INR exchange rate
rateSourcestringExchange rate provider (frankfurter, exchangerate-api, fallback)
rateCachedbooleanWhether rate was served from cache
feePercentnumberPlatform fee as decimal (0.005 = 0.5%)
grossInrstringTotal INR before fees
feeInrstringFee amount in INR
netInrstringFinal INR amount after fees
validFornumberQuote validity in seconds (24 hours)

Get Current Rate

To check the current exchange rate without calculating a quote:
curl "https://api.stablepay.global/v2/quotes/rate" \
  -H "Authorization: Bearer YOUR_API_KEY"
{
  "success": true,
  "data": {
    "rate": 90.22,
    "source": "frankfurter",
    "cached": true,
    "cacheAgeSeconds": 120,
    "cacheExpiresInSeconds": 780
  }
}
Exchange rates are cached for 15 minutes to reduce API calls. The cacheExpiresInSeconds field indicates when a fresh rate will be fetched.