Open SourceOption Hub
    F&O analytics terminalReact 18 + Vite + TypeScript + proxy-server.mjs (Express)

    Option Hub.

    India's most comprehensive open-source Options & Futures analytics terminal for NSE F&O. Runs locally on your machine with a React frontend on port 4001 and an Express proxy on port 4002 that relays data from Dhan, NSE, TradingView, and Yahoo Finance with automatic failover, caching, and WebSocket support.

    What the README tells you

    132 ⭐ | 67 forks | 162 commits | MIT licensed. The README provides Windows/Mac beginner guides, 7 route pages, full project structure tree, data-flow architecture diagram, 6-source status bar, broker BYOK config for 7 Indian brokers, and keyboard shortcuts (⌘1–⌘6). Live data during market hours; Dhan API optional for premium option chain + Greeks.

    Features

    What this repo gives you.

    A quick practical feature map before you open the source code.

    Dashboard (/) — 10+ live widgets: Index Cards with sparklines, Key Metrics (PCR/VIX/Max Pain), IV Rank Scanner, Top Movers, Sector Heatmap, Most Active F&O, Market Breadth with 0–100 sentiment score, Futures Premium/Discount + VIX chart, GIFT Nifty + expiry countdown.

    Option Chain (/option-chain) — Full CE/PE data with LTP, OI, OI Change, Volume, IV for NIFTY/BANKNIFTY/FINNIFTY/MIDCPNIFTY and individual stocks. ATM auto-highlighted, multi-expiry switching.

    OI Analysis (/oi-analysis) — Deep Open Interest analysis with 10 analysis tabs, ATM zone analysis, OI heatmap, support/resistance levels, multi-expiry context, IV/PCR modules.

    Strategy Builder (/strategy-builder) — Build options strategies with payoff charts. Pre-built: Bull Call Spread, Bear Put Spread, Long Straddle, Iron Condor, Butterfly, Collar, and more.

    Position Tracker (/position-tracker) + Watchlist (/watchlist) — Track open positions with simulated P&L and save favorite F&O symbols.

    Broker Settings (/broker-settings) — BYOK architecture supporting 7 Indian brokers (Dhan, Zerodha, Angel One, Upstox, etc.). Keys stored in localStorage only — never sent externally.

    Proxy Server (port 4002) — Express proxy handles CORS bypass, 3–30s response caching, rate-limit protection, Dhan binary WebSocket parsing → clean JSON relay. Data priority: Dhan → NSE → TradingView → Yahoo Finance.

    6-source real-time status bar, Command Palette (⌘K), AlertSystem, IndexedDB for persistent chart storage, dark/light themes, keyboard shortcuts ⌘1–⌘6.

    Installation

    Step-by-Step Setup.

    Follow these steps to get Option Hub running on your machine.

    Setup Path

    Run it locally, then inspect the system.

    Follow the README flow first. Once the app opens locally, use the AI prompts below to trace the data flow and make focused changes.

    CloneInstallRunInspect
    1

    Install

    Start here

    Install Node.js v18+ LTS from nodejs.org.

    2

    Clone

    Clone. git clone https://github.com/MrChartist/india-s-best-option-hub.git && cd india-s-best-option-hub

    git clone https://github.com/MrChartist/india-s-best-option-hub.git
    3

    Install

    Install. npm install (wait ~1-2 minutes on first install).

    npm install
    4

    Dev mode

    Start both servers. npm run dev — this launches Vite on :4001 and proxy on :4002 simultaneously.

    npm run dev
    5

    Step 5

    Open http://localhost:4001 — live data populates automatically during market hours (Mon–Fri, 9:15 AM–3:30 PM IST).

    6

    Dev mode

    (Optional) For premium data: copy .env.example to .env, add DHAN_CLIENT_ID and DHAN_ACCESS_TOKEN from dhan.co, restart with npm run dev.

    npm run dev
    7

    Step 7

    Production

    (Optional) Add other broker keys via the /broker-settings page UI — stored in browser localStorage only.

    Want AI to do this for you?Copy a ready-made prompt for Antigravity, Codex, or Claude below ↓
    AI-Powered Setup

    Set Up Option Hub With AI.

    Pick your AI tool, copy the prompt, and let it handle the entire setup and codebase walkthrough for you.

    Google Antigravity

    Best when you want the assistant to operate inside the editor and handle setup end-to-end.

    Desktop editorGitNode or PythonModel access

    Ready-to-use prompt ↓

    Open https://github.com/MrChartist/india-s-best-option-hub. Clone the repository, inspect the README first, then set up the project locally using the exact setup steps from the README. Before editing anything, explain the stack, folder structure, data flow, required environment variables, and the safest first customization for this project: Run npm run dev, open localhost:4001 during market hours to see live data, then ask an AI to map the proxy-server.mjs data flow before customizing any widget.

    How it works: Paste the prompt into Antigravity after choosing the repo. Ask it to read the README first, run setup commands, keep changes small, and explain every file it touches before editing.

    OpenAI Codex

    Best when you want command-by-command setup, debugging, code edits, and verification in a local workspace.

    GitTerminalNode or PythonLocal workspace

    Ready-to-use prompt ↓

    I want to work on https://github.com/MrChartist/india-s-best-option-hub. First read the README and summarize what the project does. Then give me the exact commands for my operating system to clone, install, configure environment variables, and run it locally. After it runs, inspect the codebase and propose one small change that matches this goal: Run npm run dev, open localhost:4001 during market hours to see live data, then ask an AI to map the proxy-server.mjs data flow before customizing any widget.

    How it works: Paste the prompt into Codex with the repository URL. Ask it to run the project, identify the stack from files instead of guessing, make scoped edits, and verify with build or browser checks.

    Claude

    Best when you want architecture explanation, codebase understanding, and a clean implementation plan before edits.

    Repo accessREADME contextTerminal if using Claude Code

    Ready-to-use prompt ↓

    Analyze https://github.com/MrChartist/india-s-best-option-hub from the README and source structure. Create a clear architecture map, explain the main modules, identify setup risks, and recommend a safe implementation plan for extending it. Focus especially on: Ask the AI to trace the full data pipeline: Browser → proxy-server.mjs (:4002) → Dhan/NSE/TradingView APIs, and explain the failover chain and caching strategy. Ask it to map the 7 route pages (/, /option-chain, /oi-analysis, /strategy-builder, /position-tracker, /watchlist, /broker-settings) and their component trees. Ask it to explain the Dhan WebSocket binary parsing in proxy-server.mjs and how ticks are relayed as JSON to the browser via useWebSocket.ts. Ask it to identify the IndexedDB schema in localDatabase.ts and how chart/candle data is persisted across sessions. Start with one focused change: add a new index to IndexCards, customize the IV Rank Scanner thresholds, or add a new strategy preset to the Strategy Builder.

    How it works: Paste the prompt with the GitHub link. Ask Claude to read the README, map modules, list risks, and produce a practical plan before using Claude Code or another agent to implement.

    AI Focus

    What to Ask the AI.

    After setup, use these focused questions to get the most value from your AI assistant.

    AI Briefing Mode

    Ask for maps, not magic.

    Use these prompts after the repo runs locally. The goal is to make the AI trace the system before it changes code.

    FlowLogicRiskChange
    01

    Map the data flow

    Ask the AI to trace the full data pipeline: Browser → proxy-server.mjs (:4002) → Dhan/NSE/TradingView APIs, and explain the failover chain and caching strategy.

    02

    Prompt 2

    Ask it to map the 7 route pages (/, /option-chain, /oi-analysis, /strategy-builder, /position-tracker, /watchlist, /broker-settings) and their component trees.

    03

    Prompt 3

    Ask it to explain the Dhan WebSocket binary parsing in proxy-server.mjs and how ticks are relayed as JSON to the browser via useWebSocket.ts.

    04

    Explain the architecture

    Ask it to identify the IndexedDB schema in localDatabase.ts and how chart/candle data is persisted across sessions.

    05

    Make one focused change

    Start with one focused change: add a new index to IndexCards, customize the IV Rank Scanner thresholds, or add a new strategy preset to the Strategy Builder.

    Best Next Step

    Run npm run dev, open localhost:4001 during market hours to see live data, then ask an AI to map the proxy-server.mjs data flow before customizing any widget.