1. Request two rates
This asks for the euro and British pound against the US dollar. Change the base in the path or the comma-separated symbols list to get different currencies.
2. Read the response
You will get JSON in this shape. The rates below are an example, so your numbers and timestamps will be different.
Use rates.EUR and rates.GBP in your code. Keep source, market_session, and data_updated_at if you show freshness to users.
3. Add a key when you need account quota
Anonymous requests are for evaluation and are limited by IP. A free account gives you an account-attributed monthly quota. Keep the key on your server, not in public browser JavaScript.
Create a free key, then replace YOUR_KEY. The X-API-Key header also works when a connector cannot set an Authorization header.
Where to go next
- Convert an amount with a GET or batch POST request.
- Pull historical data for one day or a date range.
- Understand source and freshness before putting a rate in production.