One of the early adopters of electronic commerce (e-commerce) is the financial market sector. In late 90s, some traditional brokerages hired IT firms to create custom e-commerce solution to streamline the process of buying and selling stocks.
This happened when the stock exchange had started to open their system interface to interested member brokers allowing these brokers to send data over to exchange through the use of internet technology.
Although the traditional brokerages still exist in most of the developing countries, the prevalence of online stock market in all countries continues to surge.
So how this complex system works in a nutshell? If you buy a stock in a broker-assisted facility (meaning the broker will manually key in your stock order), the commission is relatively high. However, when you execute transaction yourself using online facility, you are able to do it yourself with low commission rate.
There are many financial instruments that have long been using online system for their trading transactions. Apart from stock trading, prominent examples of the advanced trading are currency exchange (forex), bitcoins, etc. Today, you can place orders online without hassle as you can see what’s happening on your portfolio instantly.
Having said that, I’ll explain the process in a layman’s term so to further give you insight on what is happening when you use online stock trading facility.
1. You have clicked ‘buy’ after entering all details in the stock order form. The details will be saved on the broker’s database and will be sent over to the exchange. There are protocols on what data are to be sent (e.g. new order, updated order, cancelled order). All these information will be sent to the stock exchange.
2. There is a queue in stock exchange where all incoming ‘buy’ orders are parked. When ‘sale’ order arrives, the system will determine which ‘buy’ order to match. The matching mechanism is maybe either First-In-First-Out (FIFO) or Pro-rata. FIFO in the sense that whichever buy order comes first at a higher price, it will allocate to the sale order. For example, you placed an order of 100 share @ 10.00 market price. Then you are bidding the highest (because when you buy at the highest, the sell order will be matched on the highest buying price). So your order will be fulfilled first but if the number of shares is higher than the actual share on the selling side – your order will be partially matched. The pro-rate works in a way that the same buy order will be matched proportionally depending on the size of the shares. Let us say that two buying orders with 100 shares @ same 10.00 market price. Then the sell order has only 20 shares with that price then the system will match 10 orders each for the two buying orders. Again, this depends on the algorithm the exchange is using to match orders.
3. Once the order is satisfied (both sell and buy), the exchange will send the details back to the online brokerage using API and the online system will update the user with the status. The heaviest part of this system is the accounting portion. The exchange must accurately debit or credit the account of the trader when the sell or buy transactions take place.
5. Mostly, the consolidation of all transactions between stock exchange and brokerage happens end of trading day. The brokerage will probably receive the full buy and sell report from exchange and there could be some checking to ensure that the transaction report are accurately matching the actual buy/sell activities. This is one of the most complex parts of the process as money matter is involved so if the system breaks or there is inconsistencies behind, it will surely reflect negatively to the investors.
6. Finally, users can withdraw and deposit online pretty much easily. They can send payment from their bank to the brokerage and payment can be reflected in real time. Same thing goes with withdrawal but it may not be real-time and can be completed within the day.
The system is pretty much complex to build, maintain and enhance as it involves third-parties. In addition, the online facility needs to be very reliable as heavy transactions are happening every second during trading hours so online trading platform is one of the most complex e-commerce sites that have been built by the trading participants.