Live Stock Data
0 stocks
# Code LTP High Low YCP Change Trade Value Volume

Loading data...

API Documentation
Stock Endpoints
GET /api/stocks

Get cached stock data

GET /api/stocks/live

Get freshly scraped data from DSE

GET /api/stocks/scrape

Trigger manual scraping

GET /api/stocks/:code/history?days=30

Get historical data for a stock

GET /api/stocks/json

Download data as JSON

GET /api/stocks/csv

Download data as CSV

Live Data Endpoint
GET /api/live

Get latest data from database (for UI)

Scheduler Endpoints
GET /api/scheduler/start

Start local scheduler (optional)

GET /api/scheduler/stop

Stop local scheduler

Vercel Cron Endpoint
POST /api/cron/scrape

Vercel cron job (automatic every 5 min)

Quick Examples
# Get all stocks
curl http://localhost:3000/api/stocks

# Trigger scrape
curl http://localhost:3000/api/stocks/scrape

# Get historical data
curl "http://localhost:3000/api/stocks/BRACBANK/history?days=30"

# Start local scheduler
curl http://localhost:3000/api/scheduler/start