Your broker takes your order and checks you have the money. The exchange matches you with a seller. The clearing corporation handles settlement, and your shares normally show up in your demat account the next working day. Your shares sit with the depository (CDSL or NSDL), not with the broker.
You open Zerodha, search for Infosys and place an order to buy 10 shares at a maximum price of ₹1,500 per share. The app says “Order executed” in under a second. The next working day, the shares show up in your holdings.
It feels like Zerodha sold you the shares. It did not. Zerodha never owned them. Someone else sold them to you, and four or five other organisations made sure the deal went through safely.
If you are new to demat and trading accounts, start with our demat and trading account guide. This article goes one level deeper.
Part 1: The journey of one order
Step 1: You place the order in the app
You tap Buy. The app is the broker’s front office. It packs your order with your client code, the stock, the quantity and the price, and passes it on.
Step 2: The risk system checks you
Before your order leaves the broker, it goes through the broker’s Risk Management System (RMS). This is the middle office, mostly run by software.
It checks things like:
- Do you have ₹15,000 plus charges in your trading account?
- Is the price you entered sensible, or did you type ₹15,000 instead of ₹1,500?
- Is this stock under any special trading restriction?
If any check fails, the order is rejected right there. It never reaches the exchange. This takes a fraction of a second.
Step 3: The exchange matches you with a seller
Your order reaches NSE or BSE. The exchange keeps a list of open buy and sell orders for Infosys. That list is the order book.
The exchange’s matching engine follows two rules:
- Best price first. When you’re buying, the seller asking the lowest price gets matched first.
- Earliest order first. If two sellers ask the same price, the one who came first gets matched first.
Here’s what the sell side of the order book might look like when your order arrives:
| Seller | Asking price per share | Shares for sale | Order placed |
|---|---|---|---|
| A | ₹1,499 | 6 | 10:01 a.m. |
| B | ₹1,499 | 8 | 10:02 a.m. |
| C | ₹1,500 | 10 | 10:00 a.m. |
You asked to buy 10 shares at ₹1,500 or less. You get 6 from A and 4 from B, all at ₹1,499. A goes first because A and B asked the same price and A placed the order earlier. C placed an order before both, but asked for a higher price.
The moment your buy order meets a matching sell order, the trade happens. You never learn who the seller is, and they never learn who you are.
Step 4: You get a contract note
By the end of the day, your broker emails you a contract note. This is the official receipt for your trade. It lists the price, the quantity, the time and every charge: brokerage, STT, exchange fees, GST and stamp duty.
Keep these. They are your proof if anything goes wrong, and you need them for tax.
Step 5: The clearing corporation settles the trade
A clearing corporation is the organisation that takes over after the exchange matches a buyer and a seller. It acts as a middleman and takes responsibility for settling the trade, even if one side doesn’t deliver what it owes. For example, if the seller doesn’t deliver the shares, the clearing corporation can arrange to buy them from another seller.
NSE uses NSE Clearing. BSE uses Indian Clearing Corporation. Each one keeps a large guarantee fund for exactly this purpose.
Step 6: The depository moves the shares
In a normal trade, the clearing corporation collects the seller’s shares and your money on the next working day. Then it releases the shares.
The shares move through the depository, CDSL or NSDL, into your demat account. That is T+1 settlement: trade day plus one working day.
Your 10 Infosys shares now sit in your demat account, in your name.
Part 2: Inside the broker
Every broker splits its work into three teams, the same way banks and fund houses do: front office, middle office and back office.
Think of a courier company. The counter staff take your parcel. That is the front office. The checking team scans it before it goes on the truck. That is the middle office. The accounts team matches every parcel with every bill at night. That is the back office.
Front office: takes your order
- Trading app and website: Where most people place orders today.
- Dealers: Take orders over the phone. This is called call-and-trade. Useful when the app is down or you are travelling.
- Relationship managers: Mostly at full-service brokers like ICICI Direct or HDFC Securities. They help you with your account and may share research.
Middle office: checks before it goes out
- Risk system (RMS): Checks your money and margin before every single order. It can also close your positions if you cannot cover a loss in trades that use borrowed money.
- Surveillance: Watches for odd trading patterns, like a client suddenly buying a huge amount of a tiny stock. Brokers must report suspicious activity to the exchange.
- Compliance: Makes sure the broker follows SEBI and exchange rules.
Back office: counts and settles
- Settlement: Sends your money and the seller’s shares to the clearing corporation on time.
- Client ledger: Tracks every rupee you put in, take out, spend on trades or get from sales. This is your account statement with the broker.
- Contract notes and reports: Sends you contract notes, statements and tax reports.
- DP operations: Brokers who are also a Depository Participant run the demat side of your account here.
Part 3: Who does what in a stock trade
Outside the broker, four organisations keep the whole system running:
| Who | Examples | Job | Simple version |
|---|---|---|---|
| Exchange | NSE, BSE | Matches buy and sell orders | The marketplace |
| Clearing corporation | NSE Clearing, Indian Clearing Corporation | Guarantees and settles every trade | The guarantor |
| Depository | CDSL, NSDL | Holds shares in electronic form | The locker |
| Clearing banks | Large banks approved by the exchange | Move money between brokers and the clearing corporation | The money pipe |
Your broker connects you to all four. But your shares end up with the depository, and your trade is guaranteed by the clearing corporation. The broker is only the middleman.
Part 4: T and T+1, step by step
T is the day the trade happens. T+1 is the next working day. For example, if you buy on Friday, T+1 is Monday unless Monday is a settlement holiday.
| When | What happens |
|---|---|
| Trade day (T), market hours | You place the order. RMS checks it. The exchange matches it. |
| Trade day (T), end of day | Your broker sends the contract note. It shows what you paid for the shares, plus charges. |
| Next working day (T+1) | The money goes to the clearing corporation. The seller’s shares go in. The clearing corporation releases the shares to your demat account. |
| After T+1 | The shares show in your holdings. You can sell them any time. |
Selling works the same way in reverse. Your shares leave your demat on T+1 and the money reaches your trading account the same day.
Part 5: Who checks the broker
A broker is not trusted on its own word. Several outsiders watch it.
- SEBI registers every broker and sets the rules. It can fine a broker or cancel its licence.
- The exchanges inspect their brokers regularly. They check the broker’s books against client records.
- The clearing corporation checks that the broker can pay for its clients’ trades every day.
- The depository confirms what is in your demat. You get a statement from CDSL or NSDL directly, not just from the broker.
- Client money rules. Your money in the trading account belongs to you, not to the broker. The broker cannot use it for its own business. From time to time, the broker must send idle money back to your bank account.
- Investor Protection Fund. Each exchange keeps a fund to pay investors back if a broker defaults, up to a limit.
Why your shares are safe
Put it all together:
- The broker takes your order, but your shares do not sit with the broker.
- The exchange matches the trade, but never touches your shares or your money.
- The clearing corporation handles settlement, even if one side doesn’t deliver what it owes.
- The depository holds your shares in your name.
- SEBI, the exchanges and the depositories all check the broker from outside.
What if your broker shuts down? Your shares are in your demat account with CDSL or NSDL. You can move them to another broker. The money in your trading account is the part that carries more risk. Do not leave large amounts sitting idle with any broker.
Keep your login and approval codes safe. Never share your password, OTP or TPIN with anyone, including someone who says they are from your broker.
For the same story on the mutual fund side, read Behind the Scenes of a Mutual Fund, where we follow a mutual fund order from start to finish.
Key takeaways
- Your broker is a middleman. It takes your order and checks your money. It does not sell you the shares and it does not hold them.
- The exchange matches you with a seller on best price first, then earliest order first.
- The clearing corporation handles settlement. It steps in if one side doesn’t deliver what it owes.
- Your shares sit with CDSL or NSDL, in your name, and normally arrive on T+1.
- Keep your contract notes. They are your proof of every trade and you need them for tax.
- Once a month, check the CDSL or NSDL statement against your broker app. If the two ever do not match, raise it with your broker straight away.