This API provides access to daily exchange rates for various currencies. Exchange rates are stored in a structured format for easy access and manageability.
Exchange rates are stored in the following structure:
/data
/USD
/2024
/01
- 01.json
latest.json
To access the exchange rates for a specific day, use the following URL format:
https://cdn.jsdelivr.net/gh/Sungorus/rates-api/data/USD/2024/01/01.json
### Example Requests
To get the exchange rates for January 1, 2024:
```bash
curl https://cdn.jsdelivr.net/gh/Sungorus/rates-api/data/USD/2024/01/01.json
The response for daily rates will be a JSON object containing the exchange rates:
{
"EUR": 0.85,
"GBP": 0.75,
"JPY": 110.50
}
The latest exchange rates can be accessed using the following URL format:
https://cdn.jsdelivr.net/gh/Sungorus/rates-api/data/USD/latest.json
To get the latest exchange rates:
curl https://cdn.jsdelivr.net/gh/Sungorus/rates-api/data/USD/latest.json
The response for the latest rates will be structured similarly:
{
"EUR": 0.85,
"GBP": 0.75,
"JPY": 110.50
}
- Ensure the directory structure is properly set up on your server or local environment to access the files correctly.
- Regularly run the script to update exchange rates as needed.