This application allows users to set price alerts for Bitcoin (BTC). When the target price is reached, an email notification is sent to the user.
- Create, delete, and fetch price alerts.
- Real-time price updates using Binance WebSocket.
- User authentication with JWT tokens.
- Email notifications using Gmail SMTP.
- Caching with Redis.
- Dockerized setup.
POST /login
{
"username": "username",
"password": "password"
}
POST /alerts/create
{
"user_id": "1",
"coin": "BTC",
"target_price": 33000.00
}
DELETE /alerts/delete
{
"user_id": "1",
"coin": "BTC"
}
GET /alerts/fetch?user_id=1
{
"user_id": "1"
}
- Clone the repository.
- Create a
.env
file in the root directory and add the following environment variables:
POSTGRES_USER: user
POSTGRES_PASSWORD: password
POSTGRES_DB: price_alert
- Run the following command to start the application:
docker-compose up
- The application will be running on
http://localhost:8000
.
- Golang
- PostgreSQL
- Redis
- Docker
- Binance WebSocket
- JWT
Made with ❤️ by Mohammad Shaad.