Margin keeps your books and keeps your valuations, allocation and target prices in order, so the decisions are all that's left to you. Your AI agent works from the same data.
Margin in two minutes
Holdings and trades from
Why Margin
Why Margin in three minutes
The problem
Whether to buy, hold, add or sell depends on what a stock’s valuation says at today’s price, and the price moves every day. With the DCF in a spreadsheet, the price in the broker app and the stock list somewhere else, you stitch the three together by hand. A stock bought for a 15 percent expected return may offer only 6 percent after a sharp rally, with nothing about the business changed, and it looks the same as a holding that is still working.
How Margin solves it
Margin keeps your holdings, your stock lists and a saved DCF for each stock together and reads them against the latest price. The dashboard shows the expected return each valuation implies today beside the Buy, Add, Reduce or Exit prices you set.
Workflow
Pick the trading account, then upload its holdings and tradebook from Zerodha, Groww, Upstox or AngelOne, or from any other broker through the generic CSV layout. The dividend statement and the funds statement come in as uploads of their own, and the consistency check names any split or bonus the tradebook never recorded before you trust a return.
Several accounts, across brokers, read as one portfolio
Video walkthrough
API & AI Agents
Create an API token and an AI agent, or any script of your own, can carry the whole bookkeeping side: import holdings and tradebooks, record a year of dividends, send the funds statement, build and name lists, set target allocation, and mark a stock studied, tracked or rejected as you screen.
It can do the valuation work too. An agent can compute a DCF from assumptions you give it, solve a reverse DCF for the growth the current price implies, save a forward projection against a stock, and move that projection to another quarter. Publishing a stock story video to YouTube runs through the same token.
Agents read their instructions from a machine-readable llms.txt
that spells out what each upload replaces and what it leaves alone, so a skill works against the
current contract rather than a copy of it. The recipes page sets out exactly what a token can
read, what it can write, and what stays closed to it.
# point your agent at
go.marginapp.in/llms.txt
Authorization: Bearer mgn_••••••••
POST /web/stockOfInterest/upload/json
POST /web/dividends/upload/csv
POST /web/fundsLedger/upload/json
POST /web/projection/dcf
Data Security
Margin needs your holdings and trades to do its job, and very little else about you. The funds statement from your broker is read on your own computer, so the file and the bank details in it never reach us. Your name and email are kept in a separate locked vault, so the portfolio records on our side carry no name.
Questions
No. You download holdings, trades, dividends and the funds statement from your broker and upload them, and Margin never asks for a broker login or holds one. If you would rather not do that by hand, you can create an API token and point an agent of your own at it, and even then your broker credentials stay on your machine.
No. Prices come from the NSE and BSE end of day files, so they do not move during the session. Margin shows the date of the quote beside any value it reports, and it tells you when a total is missing a stock it has no price for.
Yes. Send a file per account and Margin merges them, adding the quantities and averaging the cost by quantity. Each holding still shows the split by broker underneath, and you can ask for returns, gains and allocation one trading account at a time.
No. Margin covers listed equities on NSE and BSE. Everything in it, from the valuation grid to the capital gains rates, is built for that and would be wrong applied elsewhere.
No. There are no recommendations, no target prices of ours and no tips. Margin computes what your own assumptions imply and shows it against the market price, and every anchor on a stock is one you set yourself.
Yes. Holdings, trades, dividends and the funds statement can each be cleared from inside the app, in whole or a year or a broker at a time, and you can delete the account and everything in it. An API token deliberately cannot do any of that.
Free
No credit card required.
Margin is free while it is young, and pricing arrives in a few months. We will tell you before any of it takes effect.