Skip to content

Latest commit

 

History

History
77 lines (65 loc) · 1.32 KB

README.md

File metadata and controls

77 lines (65 loc) · 1.32 KB

Price Alert Application

Overview

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.

Features

  • 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.

Endpoints

Login

POST /login

{
    "username": "username",
    "password": "password"
}

Create Alert

POST /alerts/create

{
    "user_id": "1",
    "coin": "BTC",
    "target_price": 33000.00
}

Delete Alert

DELETE /alerts/delete

{
    "user_id": "1",
    "coin": "BTC"
}

Fetch Alerts

GET /alerts/fetch?user_id=1

{
    "user_id": "1"
}

Setup

  1. Clone the repository.
  2. Create a .env file in the root directory and add the following environment variables:
POSTGRES_USER: user
POSTGRES_PASSWORD: password
POSTGRES_DB: price_alert
  1. Run the following command to start the application:
docker-compose up
  1. The application will be running on http://localhost:8000.

Technologies

  • Golang
  • PostgreSQL
  • Redis
  • Docker
  • Binance WebSocket
  • JWT

Thank You

Made with ❤️ by Mohammad Shaad.