https://github.com/zaneh/exchange-rate-api
An Elixir service to fetch/cache exchange rates from exchangerate-api.com
https://github.com/zaneh/exchange-rate-api
api cache elixir exchange-rate-api exchange-rates exchange-rates-api forex
Last synced: about 1 year ago
JSON representation
An Elixir service to fetch/cache exchange rates from exchangerate-api.com
- Host: GitHub
- URL: https://github.com/zaneh/exchange-rate-api
- Owner: ZaneH
- License: mit
- Created: 2023-02-14T08:58:45.000Z (over 3 years ago)
- Default Branch: main
- Last Pushed: 2023-11-29T01:51:15.000Z (over 2 years ago)
- Last Synced: 2025-02-02T17:55:59.731Z (over 1 year ago)
- Topics: api, cache, elixir, exchange-rate-api, exchange-rates, exchange-rates-api, forex
- Language: Elixir
- Homepage:
- Size: 21.5 KB
- Stars: 1
- Watchers: 2
- Forks: 1
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# Exchange Rate API
Fetch the exchange rate for various currencies based on the [Exchange Rate API](https://exchangerate-api.com/). This is a wrapper around the API and is not affiliated with the Exchange Rate API. Responses are cached for 1 hour before re-fetching.
- **Example Request:** `GET /v1/rates/usd,gbp,eur,cad`
- The currency request can be singular or CSV
**Response:**
```json
{
"status": "ok",
"data": {
"usd": 1,
"gbp": 0.824978,
"eur": 0.934425,
"cad": 1.33451
}
}
```
## Run Locally
**Pre-requisites:** [Elixir](https://elixir-lang.org/install.html)
```bash
git clone https://github.com/zaneh/exchange-rate-api
cd exchange-rate-api
mix deps.get
mix run --no-halt
```