What is the systematic process flow when I place an order at Zerodha?
When a client places an order, the order is first passed through Thomson Reuters Risk Management Layer (RMS). Thomson Reuters is one of the em-paneled vendors of the exchange who provide internet based trading software/technology to the trading members of the exchange (brokers like Zerodha). The RMS check includes validations like margin checks and many more.
After the validation by the RMS layer, the order then passes through the Order Management System [OMS], which validates & checks order type, quantity etc. & then fires the orders to the exchange.
Both the RMS & OMS layer of TR is in our NET MAGIC data centers in Mumbai which is connected to the Exchange via 5 High Bandwidth Lease lines.
Each message line connecting the exchange and net magic has a certain message bandwidth. For example, a 40-message line can carry 40 orders per second. Besides the message capacity, the lines are also identified by unique IPs. Also, the exchange identifies these lines as a ‘scenario’.
Each of these lines, have a redundancy line mapped to it via an Exchange Point of Presence (POP), located at Ghatkopar, Mumbai. These redundancy lines are picked up in case the primary lines go down.
Now, when you place an order, the following are the interim statuses that an order can go through. Normally, you wouldn't be able to see them as they happen in fast succession internally.
For a completed order -
PUT ORDER REQUEST RECEIVED -> VALIDATION PENDING -> OPEN PENDING -> OPEN -> COMPLETE
For Rejected orders -
PUT ORDER REQUEST RECEIVED -> VALIDATION PENDING -> REJECTED
or PUT ORDER REQUEST RECEIVED -> VALIDATION PENDING -> OPEN PENDING
or PUT ORDER REQUEST RECEIVED -> VALIDATION PENDING -> OPEN PENDING -> OPEN -> REJECTED
When the order placed doesn’t get through TR’s RMS layer or gets clogged, the order status will be displayed as Validation Pending.
If the order gets through the RMS & then also the OMS but doesn’t get sent to the exchange servers, the order status will be open pending, [When it shows open pending, it means that exchange hasn’t sent us the confirmation for the orders, as they haven’t received it yet.]
Now that the order path is explained, it’ll be easier to understand the various order status’ and why they happen & their implications –
Complete – When the order placed has been executed successfully at the exchange.
Pending – When the order has been sent to the exchange but its not yet executed & is open/pending execution.
Rejected – The order was rejected by the RMS or OMS layer, and the rejection reason can vary depending on circumstance – the common rejection reasons & their implications can be seen here - https://tradingqna.com/c/zerodha/zerodha-order-rejection-reasons/l/latest
Modify Pending – this order status occurs when an open pending or validation pending order is being modified.
Lapsed – the open pending orders get lapsed when the lines to the exchange are up & running after being broken down & they get cancelled. So new orders have to be placed instead.