Monitor German fuel prices and get notified when prices drop below your threshold.
tankwart is a Rust application that polls the Tankerkönig API for fuel prices at gas stations and sends notifications via ntfy.sh when prices drop below a configured threshold.
- Monitors Diesel, E5, and E10 fuel prices
- Configurable price thresholds per fuel type
- Notifications via ntfy.sh push notifications
- 5-minute polling interval
- Supports multiple gas stations
git clone https://github.com/reckerp/tankwart.git
cd tankwart
cargo build --releaseCreate a .env file based on .env.example:
# https://creativecommons.tankerkoenig.de/
TANKERKOENIG_API_KEY=your_api_key
# ntfy.sh
NTFY_TOPIC=your_topic
# separated by comma
STATION_IDS=station_id_1,station_id_2,station_id_3
# price thresholds (optional)
THRESHOLD_E5=1.700
THRESHOLD_E10=1.700
THRESHOLD_DIESEL=1.600- Visit https://creativecommons.tankerkoenig.de/
- Register for a free API key
- Use the API key in your
.envfile
- Visit https://tankerkoenig.de/ (in German)
- Search for your preferred gas stations
- The station ID is visible in the URL or can be found through the API
- Visit https://ntfy.sh/
- Subscribe to a topic (or create your own)
- Use the topic name in your
.envfile - Install the ntfy app on your phone to receive push notifications
cargo run --releaseThe application will:
- Poll fuel prices every 5 minutes
- Print current prices to the console
- Send a notification when a price drops below your threshold
Notifications are only sent when:
- The current price is at or below your threshold
- The price has dropped compared to the last check
This prevents notification spam when prices fluctuate around your threshold.
MIT