https://github.com/nico-iaco/currency-watcher
Currency Watcher is a simple Go application that monitors the exchange rate between two currencies and sends a Telegram notification when a specified threshold is exceeded
https://github.com/nico-iaco/currency-watcher
exchange golang telegram
Last synced: 12 months ago
JSON representation
Currency Watcher is a simple Go application that monitors the exchange rate between two currencies and sends a Telegram notification when a specified threshold is exceeded
- Host: GitHub
- URL: https://github.com/nico-iaco/currency-watcher
- Owner: nico-iaco
- Created: 2025-07-07T10:51:15.000Z (12 months ago)
- Default Branch: main
- Last Pushed: 2025-07-07T12:08:47.000Z (12 months ago)
- Last Synced: 2025-07-07T12:23:51.634Z (12 months ago)
- Topics: exchange, golang, telegram
- Language: Go
- Homepage:
- Size: 3.91 KB
- Stars: 0
- Watchers: 0
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: readme.md
Awesome Lists containing this project
README
# Currency Watcher
Currency Watcher is a simple Go application that monitors the exchange rate between two currencies and sends a Telegram notification when a specified threshold is exceeded.
## Features
- Periodically checks the exchange rate between two configurable currencies.
- Sends a Telegram message if the rate exceeds a configurable threshold.
- Easy configuration via environment variables.
## Requirements
- Go 1.24 or later
- A valid [ExchangeRate-API](https://www.exchangerate-api.com/) key
- A Telegram bot token and chat ID
## Configuration
Set the following environment variables before running the application:
- `API_KEY`: Your ExchangeRate-API key (**required**)
- `TELEGRAM_TOKEN`: Your Telegram bot token (**required**)
- `TELEGRAM_CHAT_ID`: The chat ID to send notifications to (**required**)
- `NOTIFICATION_THRESHOLD`: The exchange rate threshold for notifications (**required**, e.g. `1.15`)
- `CHECK_INTERVAL_MINUTES`: (Optional) How often to check the rate, in minutes (default: `15`)
- `BASE_CURRENCY`: (Optional) The base currency code (default: `GBP`)
- `TARGET_CURRENCY`: (Optional) The target currency code (default: `EUR`)
## Usage
1. Clone the repository:
```bash
git clone https://github.com/yourusername/moneyChangeNotifier.git cd moneyChangeNotifier
```
2. Set the required environment variables.
3. Run the application:
```bash
go run main.go
```