Skip to content

Convert Currency

Converts a specific amount from a base currency to one or more quote currencies. Accepts any fiat or crypto symbol on either side, and supports multiple targets in a single request.

Use this to:

  • Show a user exactly how much they'd receive when converting a specific amount
  • Display a converted price in several currencies at checkout
  • Build a spot-rate converter widget
  • Get targeted conversions without processing a full rate table

Base URL

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

Convert an amount

GET/api/v1/convert

Returns the converted value of amount units of base_currency expressed in each of the requested quote_currency targets.

Authentication

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

Query parameters

ParameterTypeRequiredDefaultDescription
base_currencystringYesThe source currency to convert from. Accepts any fiat ISO code or crypto ticker (e.g. EUR, BTC, ETH).
quote_currencystringYesOne or more target currencies to convert into, comma-separated (e.g. USD, USD,BTC,ETH). Accepts fiat and crypto symbols.
amountnumberNo1The amount of base_currency to convert. Defaults to 1 if omitted.

Example requests

bash
curl "https://fast-price-exchange-rates.p.rapidapi.com/api/v1/convert?amount=100&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/convert?amount=1&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
// Convert 250 EUR to USD, BTC, and ETH
const params = new URLSearchParams({
  amount: 250,
  base_currency: 'EUR',
  quote_currency: 'USD,BTC,ETH',
})

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

const data = await response.json()

console.log(`Converting ${params.get('amount')} ${data.from}:`)
for (const [currency, value] of Object.entries(data.to)) {
  console.log(`  → ${value.toFixed(6)} ${currency}`)
}
javascript
async function getCheckoutPrices(amountEur, currencies = ['USD', 'GBP', 'JPY', 'BTC']) {
  const params = new URLSearchParams({
    amount: amountEur,
    base_currency: 'EUR',
    quote_currency: currencies.join(','),
  })

  const response = await fetch(
    `https://fast-price-exchange-rates.p.rapidapi.com/api/v1/convert?${params}`,
    {
      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
}

const prices = await getCheckoutPrices(49.99)
console.log(prices)
// { USD: 58.77, GBP: 37.44, JPY: 7960.3, BTC: 0.000815 }
python
import os
import requests

response = requests.get(
    "https://fast-price-exchange-rates.p.rapidapi.com/api/v1/convert",
    params={
        "amount": 1000,
        "base_currency": "USD",
        "quote_currency": "EUR,GBP,JPY,BTC,ETH,SOL",
    },
    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"Converting 1000 {data['from']}:\n")
for currency, value in data["to"].items():
    print(f"  {currency:<6} {value:.6f}")
python
import os
import requests

def convert(amount: float, base: str, *targets: str) -> dict:
    response = requests.get(
        "https://fast-price-exchange-rates.p.rapidapi.com/api/v1/convert",
        params={
            "amount": amount,
            "base_currency": base,
            "quote_currency": ",".join(targets),
        },
        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"]

result = convert(500, "GBP", "USD", "EUR", "BTC")
print(result)
# {'USD': 666.5, 'EUR': 591.2, 'BTC': 0.00744}

Response

json
{
  "from": "EUR",
  "to": {
    "USD": 1.1756379693996346,
    "BTC": 0.000016298695472464265
  }
}

Response fields

FieldTypeDescription
fromstringThe base currency code (mirrors base_currency).
toobjectMap of each requested quote currency to the converted amount. Values represent amount × rate — the actual quantity of the target currency you would receive.

Multiple targets in one call

Pass a comma-separated list to quote_currency to convert to several currencies at once:

quote_currency=USD,EUR,GBP,BTC,ETH

This is more efficient than making one request per target currency.


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
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.