Infrastructure

    One local API for your Indian broker accounts.

    Connect your brokers once, and every tool you run shares the same connections and stays inside each broker's rate limits. Paper trading by default.

    Orders
    • Runs onYour own computer
    • Brokers41 Indian brokers
    • TradingPaper by default
    01What it is

    What it is.

    API Bridge is one local service that sits in front of your Indian broker accounts and gives every tool a single API.

    • KindLocal API for Indian brokers
    • You needNode.js 22.12 or higher
    • Opens at127.0.0.1:4300
    • Sourcegithub.com/MrChartist/Api-Bridge

    It is open source and runs on your own computer: there is no hosted service and no account to create, and everything stays on your machine.

    The aim: you connect your broker accounts once, and everything else (TradingView alerts, a script, a spreadsheet, an AI assistant) talks to the Bridge instead of to each broker.

    Built with
    • Node.js
    • REST and WebSocket
    • MCP
    • SQLite-free local files
    • Python SDK
    • Node SDK
    LicenceGNU AGPL v3.0
    03What you get

    What you get.

    1. One API, 41 brokers

      Quotes, option chains, history, positions, funds and orders come back in the same shape, whichever broker is behind them.

    2. Shared rate limits

      Two tools cannot push each other over a broker's limit.

    3. Alerts become orders

      TradingView, ChartInk and GoCharting alerts are placed as orders through webhooks, including stop-loss orders. Order events are pushed back to your own program as signed webhooks.

    4. A data hub for all your tools

      The Bridge fetches data once from your broker and serves it to every tool you connect. Bulk history downloads, recordings and reusable symbol collections live in the same place.

    5. Honest data

      Every price says where it came from, how old it is and whether the source is official. Delayed data is never used for an order.

    6. A dashboard

      An order ticket, positions with profit and loss, and a kill switch.

    7. AI, code and spreadsheets

      22 tools for AI assistants (MCP, read-only by default), SDKs for Python and Node, and integrations for Excel, Google Sheets and AmiBroker.

    8. Paper by default

      No key needed on your own computer; paper trading unless you switch live trading on yourself.

    04Brokers

    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.

    05Get 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: Connect your brokers once, and every tool you run shares the same connections and stays inside each broker's rate limits. Paper trading by default.
    Built with: Node.js + REST and WebSocket + MCP + SQLite-free local files + Python SDK + Node SDK
    
    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. Start the demo|Run npm run dev in the project folder. Your browser opens the dashboard, already signed in, with sample prices and no broker. Nothing real can happen.
    2. Try a paper order|The demo has practice accounts. Place an order from the dashboard and watch it in Orders and Positions.
    3. Add a broker|Stop the demo and start the Bridge normally. On the dashboard, open Accounts and add your broker. It starts as paper only.
    4. Connect a tool|Create a key under Keys, then point your script, spreadsheet, TradingView alert or AI assistant at http://127.0.0.1:4300.
    5. Go live only when you decide|Live trading stays off until you switch it on yourself in the settings file. Nothing in the API, a webhook or an AI tool can switch it on.
    
    When the steps are done
    - Start the app and tell me the exact address to open. Expected address: http://127.0.0.1:4300
    - 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 22.12 or higher; git; about 5 minutes; no broker account to try the demo.

    Open a terminal and run
    git clone https://github.com/MrChartist/Api-Bridge.gitcd Api-Bridgenpm cinpm run dev
    Then open http://127.0.0.1:4300 in your browser.
    06First five minutes

    Your first five minutes.

    1. Step 1: Start the demo

      Run npm run dev in the project folder. Your browser opens the dashboard, already signed in, with sample prices and no broker. Nothing real can happen.

    2. Step 2: Try a paper order

      The demo has practice accounts. Place an order from the dashboard and watch it in Orders and Positions.

    3. Step 3: Add a broker

      Stop the demo and start the Bridge normally. On the dashboard, open Accounts and add your broker. It starts as paper only.

    4. Step 4: Connect a tool

      Create a key under Keys, then point your script, spreadsheet, TradingView alert or AI assistant at http://127.0.0.1:4300.

    5. Step 5: Go live only when you decide

      Live trading stays off until you switch it on yourself in the settings file. Nothing in the API, a webhook or an AI tool can switch it on.

    07Safety

    Paper first, live only by your choice.

    Every order is a practice order until all eight of these are true. Miss one and the order is refused with a clear reason. It is never quietly sent as something else.

    A live order needs all eight

    1. Live trading switched on

      In the settings file on your own computer. It is off when you install.

    2. The account marked live

      Every account you add starts as paper only.

    3. The source allowed

      The API, a webhook, an AI tool or the command line must be on that account's allowed list.

    4. A live key

      An API key with the live scope, created on this computer.

    5. The order asks for live

      An order that does not say live is a paper order.

    6. A person confirms

      For AI assistants, and for alert hooks set to need it. The tool that prepared an order can never confirm it.

    7. A retry key

      Each live order carries its own key, so sending it twice cannot place it twice.

    8. Every check passes

      Kill switch, rate and daily limits, daily loss, order value, price band, market hours and freeze quantity.

    What stands guard

    • Kill switch

      One button or one command stops live orders everywhere, and can cancel the open ones.

    • Preview first

      A preview runs every check on an order and places nothing.

    • Order gate

      No broker connection sends an order without a single-use pass made for that broker.

    • Audit log

      Every key change, login, order step, confirmation and kill-switch action is recorded.

    • Readiness check

      The Safety page shows what would stop a live order before you send one.

    • Damaged records

      If the record of sent orders is damaged, live orders stop until you check your broker's order book.

    Live orders work for Dhan, which is verified with a live account, and for Zerodha and Upstox with a warning on every order, because those two are checked against recorded samples only. Every other broker refuses live orders for now. Nothing in the API, a webhook or an AI tool can switch live trading on.

    08Honest status

    Where it stands.

    09FAQ

    Questions about API Bridge.

    Best next step

    Run it, then read the code.

    Clone the repository, start the demo, then connect one broker under Accounts. It starts on practice money.

    npm run dev

    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