https://github.com/burhanudinyahya/exchangerates
Free Exchange Rates API
https://github.com/burhanudinyahya/exchangerates
exchange-rates go golang
Last synced: 6 months ago
JSON representation
Free Exchange Rates API
- Host: GitHub
- URL: https://github.com/burhanudinyahya/exchangerates
- Owner: burhanudinyahya
- Created: 2024-11-15T14:48:01.000Z (11 months ago)
- Default Branch: main
- Last Pushed: 2024-11-19T03:48:08.000Z (11 months ago)
- Last Synced: 2025-03-29T08:43:40.747Z (7 months ago)
- Topics: exchange-rates, go, golang
- Language: Go
- Homepage:
- Size: 8.79 KB
- Stars: 2
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# Exchange Rates
This project is a Go-based API server that retrieves and caches exchange rate data and currency lists from external APIs. It is designed to minimize API calls to external services by using an in-memory caching system that refreshes data every hour.
## Prerequisite
- Go version 1.23.3
## Steps to Run the Application
1. Set the APP_ID Environment Variable:- On Linux/Mac:
```bash
export APP_ID="your_api_key"
```- On Windows (PowerShell):
```powershell
$env:APP_ID="your_api_key"
```2. Run the Application:
```bash
go mod tidy
go run main.go
```The server will now use the APP_ID from the environment variable, making it more secure and configurable.
## Test
- http://localhost:8080/api/latest
- http://localhost:8080/api/currencies