Once listed on the stock exchanges, the stocks issued by companies can be traded in the secondary market to make a profile or cut losses. This buying and selling of stocks listed on the exchange are done by stockbrokers/brokerage firms, that act as the middleman between investors and the stock exchange.
Your broker passes on your buy order for shares to the stock exchange. The stock exchange searches for a sell order for the same here
Once a seller and a buyer are found and fixed, a price is agreed to finalize the transaction. Post that the stock exchange communicates to your broker that your order has been confirmed.
This message is then passed on to you by the broker.
Meanwhile, the stock exchange also confirms the details of the buyers and the sellers of shares to ensure the parties don’t default.
It then facilitates the actual transfer of ownership of shares from sellers to buyers. This process is called the settlement cycle.
Earlier, it used to take weeks to settle stock trades. But now, this has been brought down to T+2 days.
You can understand by this example -
If you trade a stock today, you will get your shares deposited in your Demat/trading account by the day after tomorrow (i.e. within two working days).
The stock exchange also ensures that the trade of stocks is honored during the settlement.
If the settlement cycle doesn’t happen in T+2 days, the sanctity of the stock market is lost, because it means trades may not be upheld.
Stockbrokers identify their clients by a unique code assigned to an investor.
After the transaction is done by an investor, the stockbroker issues him/her a contract note which provides details of the transaction such as time and date of the stock trade.
Apart from the purchase price of a stock, an investor is also supposed to pay brokerage fees, stamp duty, and securities transaction tax.
In case of a sale transaction, these costs are reduced from the sale proceeds, and then the remaining amount is paid to the investor.
At the broker and stock exchange levels, there are multiple entities/parties involved in the communication chain like brokerage order department, exchange floor traders, etc.
But the stock trading process has become electronic today. so, the process of matching buyers and sellers is done online and as a result, trading happens within minutes.
Just keep this small concept in your mind:
The Indian stock exchanges, BSE and NSE, have algorithms that determine the price of stocks on the basis of volume traded and these prices change pretty fast. So, this is how the stock market works in India. There is definitely more to it however this is a good starting point to develop further understanding.