Infrastructure

    One local API for all your Indian brokers.

    One local API for 41 Indian brokers, so your charts, alerts, Excel, Python and AI assistants share one careful connection.

    Home
    01Overview

    What it is.

    API Bridge is a small program that runs on your own computer.

    You log in to your broker once, and every tool you use gets prices, option chains, candles, positions and paper orders from the Bridge instead of calling the broker on its own. It answers from a live stream and a cache first, shares identical requests and keeps each account inside its broker's rate limits, so your broker sees one well-behaved client. Every order is a paper order unless you switch live trading on in the config file.

    Built with
    • Node.js 20
    • a REST, WebSocket and MCP server
    • a web dashboard
    • Python and Node SDKs
    LicenceMr. Chartist API Bridge Personal Use Licence 1.0
    03Brokers

    41 brokers, one address.

    Every broker answers in one format at 127.0.0.1:4300, with one symbol style such as NSE:RELIANCE. Dhan is verified with a live account. The other 40 are in beta: built from each broker's official documentation and tested against recorded responses.

    • 5paisaBetaPIN and TOTP
    • 5paisaXTSBetaAPI key or token
    • Alice BlueBetaOne-time code
    • Anand RathiAlgozy, XTSBetaAPI key or token
    • Angel OneSmartAPIBetaPIN and TOTP
    • ArrowBetaOne-time code
    • Axis DirectRAPID APIsBetaOne-time code
    • BigulBigul ConnectBetaPIN and TOTP
    • Composite EdgeXTSBetaOne-time code
    • Definedge SecuritiesINTEGRATEBetaPIN and TOTP
    • DhanVerifiedAPI key or token
    • FirstockBetaPIN and TOTP
    • FlattradePiBetaOne-time code
    • FyersBetaOAuth login
    • GoodwillGWCBetaOne-time code
    • GrowwBetaAPI key or token
    • HDFC SecuritiesInvestRightBetaAPI key or token
    • HDFC SkyHDFC SecuritiesBetaAPI key or token
    • ICICI DirectBreezeBetaOne-time code
    • IIFL CapitalBetaOne-time code
    • IIFL SecuritiesXTSBetaOne-time code
    • IndiaBulls SecuritiesXTSBetaAPI key or token
    • IndMoneyINDstocksBetaPIN and TOTP
    • JainamXTSBetaAPI key or token
    • Kotak SecuritiesNeoBetaPIN and TOTP
    • Motilal OswalBetaPIN and TOTP
    • mStockMirae AssetBetaPIN and TOTP
    • Nuvama NubraBetaPIN and TOTP
    • Paytm MoneyBetaAPI key or token
    • PocketfulBetaAPI key or token
    • ProfitmartProfitMax APIBetaOne-time code
    • RMoneyXTSBetaAPI key or token
    • RupeezyVortexBetaOne-time code
    • SAMCO SecuritiesStockNoteBetaAPI key or token
    • ShoonyaFinvasiaBetaOne-time code
    • TradejiniCubePlusBetaPIN and TOTP
    • TradeSmartNoren v2BetaOne-time code
    • UpstoxBetaOAuth login
    • Wisdom CapitalXTSBetaAPI key or token
    • ZebuMyntBetaOne-time code
    • ZerodhaKiteBetaOAuth login

    Broker names show which APIs the Bridge can talk to. Mr. Chartist is not affiliated with, or endorsed by, any of them. You need your own API access from your broker. Compare numbers with your broker before you rely on a beta adapter.

    04Connect

    Every tool, every account, one connection.

    Your tools talk to the Bridge, never to the broker. Each tool gets its own key with only the access it needs, and each account keeps its own session and limits, so several of both run side by side all day.

    Your tools

    • TradingViewAlerts by webhook, charts by datafeed
    • Excel and Google SheetsLive prices in cells
    • AmiBrokerAFL functions and history import
    • Python and NodeThe SDKs, REST and streaming
    • ClaudeMCP, read-only by default
    • ChatGPTActions, read-only by default

    On your computer

    API Bridge

    127.0.0.1:4300

    Your broker sees one well-behaved client.

    Your accounts

    • Dhan (main)dhan-main · self
    • Zerodha (main)zerodha-main · self
    • Zerodha (spouse)zerodha-spouse · spouse
    • Practice accountpaper · practice
    05India's limits

    Inside India's API rules.

    SEBI's framework for retail algo trading (circular of 4 February 2025, NSE standards of 5 May 2025) is mandatory from 1 April 2026. Here is what it asks of you, and what the Bridge does about each point.

    • 10/sOrders a second

      An algo that is not registered with the exchange must stay at or below 10 orders a second per exchange segment.

      The BridgeEach account is capped at 5 a second by default, and the Bridge never allows more than 10.

      Needs verification with your broker
    • 1 IPStatic IP for live orders

      Brokers accept API orders only from a static IP you registered with them.

      The BridgeSet the registered IP per account, and the Bridge warns you before each live order.

      Needs verification with your broker
    • Your keyNo open APIs

      API access must be tied to you through your own API key. Brokers may not offer APIs that anyone can use.

      The BridgeIt uses only your own keys, never shares a session between people, and listens on this computer only.

    • You + familyYour own accounts

      Use is for your own accounts and, as SEBI allows, your spouse, dependent children and dependent parents.

      The BridgeEach account carries a holder (self, spouse and so on, never a PAN), and reads never mix holders.

      Needs verification with your broker
    • DailyLog in each morning

      API sessions end before the next trading day.

      The BridgeIt never stores TOTP secrets or automates two-factor login. The Accounts page shows the command to log in again.

      Needs verification with your broker

    Not legal advice. Check each point against the SEBI, NSE and BSE circulars and your broker's current notices. Running the Bridge for anyone else, hosting it, or selling signals would likely need exchange empanelment as an algo provider.

    06Get it running

    Get it running.

    Let an AI do it for you

    Claude

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

    You need: Repo access, README context, Terminal if using Claude Code.

    How to use: 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.

    You are my setup assistant. Install and run "API Bridge" on my computer, then confirm it works. I am not a developer, so explain every step in simple English.
    
    Repository: https://github.com/MrChartist/api-bridge
    What it is: One local API for 41 Indian brokers, so your charts, alerts, Excel, Python and AI assistants share one careful connection.
    Built with: Node.js 20 + a REST, WebSocket and MCP server + a web dashboard + Python and Node SDKs
    
    Rules
    1. Ask which operating system I use (Windows, macOS or Linux) and give commands for that system only.
    2. Check what is already installed (Git, Node.js or Python versions) before installing anything. If something is missing, tell me where to download it and wait.
    3. Ask me before installing anything globally or changing system settings.
    4. Never ask me to paste passwords or API keys into this chat. If a key is needed, tell me which file to put it in.
    5. Do not edit the project's source code unless I ask.
    6. Read the README first. If it disagrees with the steps below, follow the README and tell me why.
    
    Steps from the guide
    1. Install Node.js 20 or higher (the LTS version from nodejs.org). Docker users can skip this.
    2. Get the code: git clone https://github.com/MrChartist/api-bridge.git && cd api-bridge. No Git? Use Code, then Download ZIP on GitHub and unzip it.
    3. Easiest start: on Windows double-click start-windows.bat. On a Mac double-click start-mac.command (if macOS blocks it, right-click, choose Open, then Open again). The first run installs what it needs and asks a few questions. Copy the admin key it prints, because it is shown only once.
    4. Developers: run npm ci, then npx mc-bridge init. It writes the config, creates the master key outside the data folder and makes your first admin key.
    5. Try it with no broker: npm start -- --demo --open. Every page shows a DEMO DATA banner, and every API answer is marked as demo.
    6. Open http://127.0.0.1:4300/dashboard and paste the admin key.
    7. Connect a broker: list the account in bridge.config.json, then run npm run bridge -- accounts connect <id> in the same folder. Brokers end API sessions daily, so log in again each morning.
    8. Docker: docker compose up -d, then docker compose logs bridge shows your admin key (printed once). The port is published on 127.0.0.1 only.
    9. Check your setup at any time with npm run bridge -- doctor. Run mc-bridge commands inside the api-bridge folder: outside it, npx would download an unrelated public package with the same name.
    
    When the steps are done
    - Start the app and tell me the exact address to open. Expected address: http://127.0.0.1:4300/dashboard
    - If an error appears, read it, fix the cause and retry. After three failed attempts, stop and explain the problem simply.
    - Finish with five short lines: what the app does, how to start it again, how to stop it, where its data is stored, and one thing I can try first.
    - This is an information tool. It is not investment advice.
    
    If you can run a terminal (Claude Code), do it yourself. If you are chat only, give me one command block at a time and wait for me to reply before the next.

    Or run it yourself

    You need Node.js 20 or higher (Docker users can skip this); git, or the ZIP from GitHub; a modern browser for the dashboard; optional: a broker account with API access (demo mode needs none).

    Open a terminal and run
    git clone https://github.com/MrChartist/api-bridge.gitcd api-bridgenpm cinpx mc-bridge initnpm start -- --demo --open
    Then open http://127.0.0.1:4300/dashboard in your browser.
    07FAQ

    Questions about API Bridge.

    Best next step

    Run it, then read the code.

    Run npm start -- --demo --open, send a call in the Test console, then ask an AI to explain how that request passes the rate-limit pipeline before you connect a real broker.

    Privacy settings

    Essential sign-in storage and your saved preferences stay enabled. Analytics is optional, and you can change your choice anytime.

    Turning analytics off clears our analytics cookies and local assistant metrics. The page reloads to stop a previously loaded analytics service. Your account and learning progress stay saved.

    Read the Privacy Policy