Appearance
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.comGet selected rates
GET/api/v1/rates
Returns the exchange rate from base_currency to each currency listed in quote_currency.
Authentication
| Header | Value |
|---|---|
X-RapidAPI-Key | Your RapidAPI secret key |
X-RapidAPI-Host | fast-price-exchange-rates.p.rapidapi.com |
Query parameters
| Parameter | Type | Required | Description |
|---|---|---|---|
| base_currency | string | Yes | The source currency. Accepts any fiat ISO code or crypto ticker (e.g. EUR, BTC, ETH). |
| quote_currency | string | Yes | One 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"e_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"e_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}"e_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
| Field | Type | Description |
|---|---|---|
| from | string | The base currency code (mirrors base_currency). |
| to | object | Map 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 Rates | Convert Currency | |
|---|---|---|
| Returns | Raw rate per 1 unit of base | Converted amount for a specific input |
| Extra param | — | amount |
| Best for | Storing/displaying rates | Showing 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
| Status | Code | Description |
|---|---|---|
| 400 | bad_request | Missing required parameter or unrecognized currency code |
| 401 | unauthorized | X-RapidAPI-Key is missing or invalid |
| 403 | forbidden | Your RapidAPI plan does not include access to this endpoint |
| 429 | too_many_requests | RapidAPI rate limit exceeded |
| 500 | internal_error | Server error — safe to retry after a short delay |
Related endpoints
| Endpoint | Description |
|---|---|
| Convert Currency | Convert a specific amount across multiple targets |
| All From Base | Rates from a base to all fiat and crypto in one call |
| Fiat Symbols | Supported fiat currency codes |
| Crypto Symbols | Supported crypto ticker symbols |