Skip to content

Get Rates

Returns live exchange rates from a base currency to a specific selection of quote currencies. Accepts any combination of fiat and crypto on either side.

The key difference from Convert Currency: this endpoint returns raw rates (how much of the quote you get per 1 unit of base), not a converted amount for a specific sum. Use this when you want to store or display rates, and apply the conversion math yourself.

Use this to:

  • Fetch only the pairs you need without processing a full rate table
  • Display live rates for a curated set of currency pairs
  • Build a rate ticker for a fixed set of symbols
  • Cache specific rates for use across multiple conversions

Base URL

https://fast-price-exchange-rates.p.rapidapi.com

Get selected rates

GET/api/v1/rates

Returns the exchange rate from base_currency to each currency listed in quote_currency.

Authentication

HeaderValue
X-RapidAPI-KeyYour RapidAPI secret key
X-RapidAPI-Hostfast-price-exchange-rates.p.rapidapi.com

Query parameters

ParameterTypeRequiredDescription
base_currencystringYesThe source currency. Accepts any fiat ISO code or crypto ticker (e.g. EUR, BTC, ETH).
quote_currencystringYesOne or more target currencies, comma-separated (e.g. USD, USD,BTC,ETH). Accepts fiat and crypto symbols.

Example requests

bash
curl "https://fast-price-exchange-rates.p.rapidapi.com/api/v1/rates?base_currency=EUR&quote_currency=USD" \
  -H "X-RapidAPI-Key: YOUR_RAPIDAPI_KEY" \
  -H "X-RapidAPI-Host: fast-price-exchange-rates.p.rapidapi.com"
bash
curl "https://fast-price-exchange-rates.p.rapidapi.com/api/v1/rates?base_currency=EUR&quote_currency=USD%2CBTC" \
  -H "X-RapidAPI-Key: YOUR_RAPIDAPI_KEY" \
  -H "X-RapidAPI-Host: fast-price-exchange-rates.p.rapidapi.com"
javascript
const params = new URLSearchParams({
  base_currency: 'EUR',
  quote_currency: 'USD,GBP,JPY,BTC,ETH',
})

const response = await fetch(
  `https://fast-price-exchange-rates.p.rapidapi.com/api/v1/rates?${params}`,
  {
    headers: {
      'X-RapidAPI-Key': process.env.RAPIDAPI_KEY,
      'X-RapidAPI-Host': 'fast-price-exchange-rates.p.rapidapi.com',
    },
  }
)

const data = await response.json()

// Display rates
console.log(`Rates from 1 ${data.from}:`)
for (const [currency, rate] of Object.entries(data.to)) {
  console.log(`  ${currency}: ${rate}`)
}

// Apply conversion manually
const amount = 500
const usdAmount = amount * data.to['USD']
console.log(`\n${amount} EUR = ${usdAmount.toFixed(2)} USD`)
javascript
// Fetch and refresh a set of rates every 60 seconds
const PAIRS = 'USD,GBP,CHF,JPY,BTC,ETH,SOL'

async function fetchRates(base = 'EUR') {
  const response = await fetch(
    `https://fast-price-exchange-rates.p.rapidapi.com/api/v1/rates?base_currency=${base}&quote_currency=${PAIRS}`,
    {
      headers: {
        'X-RapidAPI-Key': process.env.RAPIDAPI_KEY,
        'X-RapidAPI-Host': 'fast-price-exchange-rates.p.rapidapi.com',
      },
    }
  )
  const data = await response.json()
  return data.to
}

let rates = await fetchRates()
setInterval(async () => {
  rates = await fetchRates()
  console.log('Rates updated:', new Date().toISOString())
}, 60_000)
python
import os
import requests

response = requests.get(
    "https://fast-price-exchange-rates.p.rapidapi.com/api/v1/rates",
    params={
        "base_currency": "EUR",
        "quote_currency": "USD,GBP,JPY,CHF,BTC,ETH",
    },
    headers={
        "X-RapidAPI-Key": os.environ["RAPIDAPI_KEY"],
        "X-RapidAPI-Host": "fast-price-exchange-rates.p.rapidapi.com",
    },
)

response.raise_for_status()
data = response.json()

print(f"Rates from 1 {data['from']}:\n")
for currency, rate in data["to"].items():
    print(f"  {currency:<6} {rate}")
python
import os
import requests

def get_rates(base: str, *quotes: str) -> dict:
    """Return rates from base to each quote currency."""
    response = requests.get(
        "https://fast-price-exchange-rates.p.rapidapi.com/api/v1/rates",
        params={
            "base_currency": base,
            "quote_currency": ",".join(quotes),
        },
        headers={
            "X-RapidAPI-Key": os.environ["RAPIDAPI_KEY"],
            "X-RapidAPI-Host": "fast-price-exchange-rates.p.rapidapi.com",
        },
    )
    response.raise_for_status()
    return response.json()["to"]

rates = get_rates("USD", "EUR", "GBP", "BTC", "ETH")

# Convert 1000 USD using fetched rates
amount = 1000
for currency, rate in rates.items():
    print(f"{amount} USD = {amount * rate:.4f} {currency}")

Response

json
{
  "from": "EUR",
  "to": {
    "USD": 1.1781745474798904,
    "BTC": 0.00001633522494354177
  }
}

Response fields

FieldTypeDescription
fromstringThe base currency code (mirrors base_currency).
toobjectMap of each requested quote currency to its exchange rate. Each value represents how many units of the quote currency equal 1 unit of the base currency.

Get Rates vs Convert Currency

Both endpoints accept the same base_currency and quote_currency parameters, but serve different use cases:

Get RatesConvert Currency
ReturnsRaw rate per 1 unit of baseConverted amount for a specific input
Extra paramamount
Best forStoring/displaying ratesShowing an exact conversion result

Use Get Rates when you need the rate itself. Use Convert when you want amount × rate computed for you.


Error responses

StatusCodeDescription
400bad_requestMissing required parameter or unrecognized currency code
401unauthorizedX-RapidAPI-Key is missing or invalid
403forbiddenYour RapidAPI plan does not include access to this endpoint
429too_many_requestsRapidAPI rate limit exceeded
500internal_errorServer error — safe to retry after a short delay

EndpointDescription
Convert CurrencyConvert a specific amount across multiple targets
All From BaseRates from a base to all fiat and crypto in one call
Fiat SymbolsSupported fiat currency codes
Crypto SymbolsSupported crypto ticker symbols

Released under the MIT License.