A minimalist personal investment portfolio tracker powered by Kite Connect
Endurance is a clean, Notion-inspired portfolio dashboard that connects to your Zerodha Kite account to display real-time holdings, positions, and market data. Built with Django and styled with a minimalist black & white aesthetic.
- Portfolio Dashboard — View all your holdings and positions at a glance
- Candlestick Charts — NIFTY 50 and SENSEX charts with Lightweight Charts
- Stock Details — Detailed view for any stock with OHLC data and news
- Stock News — Latest news for your holdings via Finnhub API
- AI Suggestions — Investment insights powered by OpenAI (optional)
- Sector Watchlists — Curated stock lists for Healthcare, IT, Banking, and more
- Minimalist UI — Clean, Notion-inspired black & white design
- Docker and Docker Compose
- Zerodha Kite Connect API credentials (Register here)
-
Clone the repository
git clone https://github.com/yesabhishek/endurance.git cd endurance -
Configure environment variables
cp .env.example .env
Edit
.envwith your credentials:KITE_API_KEY=your_kite_api_key KITE_API_SECRET=your_kite_api_secret
-
Start the application
cd portfolio_app docker compose up --build -
Open in browser
Visit http://localhost:8000 and login with your Kite account.
endurance/
├── portfolio_app/ # Django application
│ ├── portfolio/ # Main Django app
│ │ ├── templates/ # HTML templates
│ │ ├── static/ # CSS and JS
│ │ ├── views.py # View controllers
│ │ ├── kite_auth.py # Kite OAuth handling
│ │ ├── news_service.py # Stock news fetching
│ │ ├── chart_service.py # Chart data service
│ │ └── curated_stocks.py # Sector stock lists
│ ├── docker-compose.yml # Docker configuration
│ └── Dockerfile # Container build
├── kite-mcp/ # Kite MCP Server (Go)
├── .env.example # Environment template
└── README.md
| Variable | Description |
|---|---|
KITE_API_KEY |
Your Kite Connect API key |
KITE_API_SECRET |
Your Kite Connect API secret |
| Variable | Description |
|---|---|
DJANGO_SECRET_KEY |
Django secret key (auto-generated if not set) |
OPENAI_API_KEY |
OpenAI API key for AI suggestions |
FINNHUB_API_KEY |
Finnhub API key for stock news |
| Route | Description |
|---|---|
/ |
Dashboard with portfolio overview and charts |
/holdings/ |
List of all holdings |
/holdings/<symbol>/ |
Detailed view of a holding |
/positions/ |
Open positions |
/market/ |
Market overview with index data |
/watchlist/ |
Sector-based watchlists |
/stock/<symbol>/ |
Stock details (any stock) |
This project takes security seriously:
- No hardcoded credentials — All secrets are loaded from environment variables
.envis gitignored — Your credentials are never committed- OAuth flow — Secure Kite authentication with token management
- Session-based auth — Access tokens stored securely in Django sessions
- Never commit
.env— The.gitignorefile excludes it - Rotate your API keys if you accidentally expose them
- Use strong
DJANGO_SECRET_KEYin production
cd portfolio_app
python -m venv venv
source venv/bin/activate
pip install -r requirements.txt
python manage.py migrate
python manage.py runserverpython manage.py test| Endpoint | Method | Description |
|---|---|---|
/api/portfolio/ |
GET | Portfolio summary JSON |
/api/chart/<symbol>/ |
GET | OHLC chart data |
/api/ai-suggest/<symbol>/ |
GET | AI investment suggestion |
Edit portfolio/static/portfolio/css/style.css. The design uses CSS variables:
:root {
--text-primary: #1a1a1a;
--bg-primary: #ffffff;
--border-light: #e5e5e5;
}Edit portfolio/curated_stocks.py to add new sector watchlists.
MIT License — see LICENSE for details.
- Zerodha Kite Connect — Trading API
- Lightweight Charts — Candlestick charts by TradingView
- Finnhub — Stock news API
- OpenAI — AI suggestions
Disclaimer: This is a personal portfolio tracker for informational purposes only. It does not provide investment advice. Always do your own research before making investment decisions.