Python BTC Up application fetches cryptocurrency exchange rates from the Alpha Vantage API and stores them in an InfluxDB database.
- Fetches real-time exchange rates between specified cryptocurrencies and fiat currencies.
- Stores exchange rates in an InfluxDB database.
- Uses environment variables for configuration.
- Containerized using Docker.
- Python 3.10+
- Docker (for containerization)
- Alpha Vantage API Key
- InfluxDB instance
-
Clone the repository:
git clone https://github.com/mohrezfadaei/btcup.git cd btcup
-
Install dependencies:
make install
-
Install development dependencies:
make install-dev
Create a .env
file in the root directory with the following content:
DEBUG=true
API_TOKEN=your_api_token
API_URL=https://www.alphavantage.co/query
API_FROM_CURRENCY=BTC
API_TO_CURRENCY=USD
INFLUX_URL=your_influx_url
INFLUX_TOKEN=your_influx_secret
INFLUX_ORG=your_influx_org
UPDATE_INTERVAL_SEC=30
To run the application:
make run
To set up the development environment, run:
make install-dev
To run the tests:
make test
To lint the code:
make lint
-
Build Docker image:
docker-compose build .
-
Start Docker containers:
docker-compose up -d
-
Stop Docker containers:
docker-compose down
This project is licensed under the MIT License - see the LICENSE file for details.