A demat account keeps shares in digital form, so you can trade with ease and without the headache of physical shares. Meanwhile, Algo trading uses code to place market orders when predefined rules say so. These two things have separate jobs, yet they can end up running together in one trade setup.
An algo may send a buy order, then the broker side checks cash, margin, and risk rules. If the order gets filled, the shares then land in the demat account. The code does the pushing, the account is what ends up holding the asset.
What Does a Demat Account Do?
A demat account is basically a digital store for shares. It can also hold bonds, funds, and government securities too. A bank or broker can act as the Depository Participant, or DP. The DP is the link between you and a depository like NSDL or CDSL
A trading account is where a client can buy or sell, it’s more about orders. A bank account is what moves the cash in and out. In a typical flow it goes like this:
- The bank account keeps the cash. Â
- The trading account fires each order. Â
- The demat account holds the shares. Â
Also, a demat account does not pick a trade, it does not read charts or decide price. It just keeps the assets after the trade settles.
What Is Algo Trading?
Algo trading means trading through fixed rules inside code. The code can watch price, time, or trade size, and then send an order once a condition is met.
For Example, a rule might say buy ten shares at a set price, and also say exit at a set loss. So the code checks the market price and then sends the order.
This can cut delays in order entry. It can help apply the same strategy, every time, in a repeatable manner. But it still does not remove risk. Bad code can send the wrong order, a weak data feed can show a false signal. If a network fault happens, the whole flow can break. If the market moves fast, then the whole result can shift just as fast, or even quicker.
The client still owns every trade, so the risk stays with the client as well.
Steps before using an Algo
1. Set up all accounts
Open a demat account, plus a trading account, and also a bank account. Finish KYC. Verify the PAN, name, phone , email, and bank details. Add a nominee too, and please read the fee list first before you start.
2. Ask the broker about API access
An API lets your code talk to the broker system. Use the API key the broker gives you. Confirm the login rules, session time limits, order caps, and IP rules. Do not share an API key, PIN, password, or OTP , no exceptions
3. Write clear trade rules
Write each rule in plain words at first. Spell out entry, exit, lot size, and any time related condition. Set a loss cap. Also include steps for bad data, and for orders that fail. The code must know when to stop, not just keep running forever.
4. Test before live use
Test on historical data, then run in demo or paper mode if the broker offers it. Try a calm day, then test on a high volatility day too. Also try network breaks, price gaps, rejected orders, and repeated orders.
A backtest is not the same as live trading though. It may not show slippage, system lag, or thin market depth, so don’t treat it like the full picture
5. Use firm risk caps
Lock in cash per trade, set an order cap, and a daily loss cap. Add a kill switch so new orders stop immediately. Keep a manual method to check open trades, just in case something feels weird.
6. Check records each day
Compare your order log with the broker records. Review contract notes and fees. Match share debits and credits against the demat statement. If anything seems off, wrong, or unknown, act at once.
Rules for retail algo trading
SEBI issued a retail algo trading framework in February 2025. After that, NSE put its own steps in place for API use and order tags. These cover broker checks, audit logs, algo IDs, and risk controls. Some algos might also need exchange registration, and the algo provider may need to join an exchange panel as well
The path can differ based on the broker, the API type, the order rate, and where your code comes from. Before live use, the client should ask the broker which exact rules apply. NSE also expects brokers that offer retail algo access to follow their application and registration steps.
Key Safety Checks
Turn on SMS and email alerts from the DP and broker. Use two-step login. Do not sign any blank DIS slip. DIS means Delivery Instruction Slip. Also do not give third parties access to your account. And check every debit and credit shown in the statement.
Read every fee sheet carefully. Costs can include brokerage, taxes, DP debit fees, API fees, data fees, and software fees. If you trade a lot, costs pile up, so judge the plan after counting all fees.
Algo trading does not guarantee profits. It does not block losses either. It only follows what’s inside its code rules
Conclusion
A demat account stores shares in digital form. Algo trading uses code to send trade orders. These can be part of the same setup, but each one keeps a different role. Start by using valid accounts, set up safe API access, define clear rules, do testing first, set loss caps, and do daily record checks.
That way the whole process stays clearer, and you keep control over it, instead of it running on autopilot without oversight.






