title: NIFTY 50 Forecaster Backend
emoji: 📈
colorFrom: green
colorTo: blue
sdk: docker
app_port: 7860
NIFTY 50 Forecaster Backend
FastAPI Hugging Face Docker Space for the NIFTY 50 first-five-minute direction forecaster.
Endpoints
GET /healthGET /dashboardGET /prediction/latestPOST /prediction/refresh-first5POST /data/refresh-dailyGET /cron/keepalivePOST /data/refresh-market-close
Data
Parquet files live in data/:
nifty50_1m.parquetnifty50_1d.parquetopening_direction_training_dataset.parquettest_predictions.parquet
Runtime
The API starts a daily background refresh loop. It wakes after 09:20 Asia/Kolkata, fetches Yahoo Finance ^NSEI 1-minute candles for the 09:15-09:19 opening window, appends them to Parquet, and writes the latest T+5 prediction.
After market close it wakes again at 15:45 Asia/Kolkata, refreshes the 1-minute and daily Parquet files, updates the opening training dataset with same-day close outcomes, and writes the saved prediction record used for the next trading session card. The /cron/keepalive endpoint also checks this close refresh so a Hugging Face Space that was idled still catches up when Netlify pings it.
Netlify also pings /cron/keepalive every 10 minutes through its scheduled function.