The closing balance is different on Q and Kite in the nights because the closing balance on Q Ledger is updated after 7pm on the same day whereas the closing balance on Kite is updated only at around 5am the next morning.
This is because the equity trade process runs till about 7pm everyday after equity markets close, which calculates the closing balance for the day after considering the payin/payout amount and net P&L calculated from the trades executed for the day. This closing balance value is then immediately updated on the Q Ledger.
The Commodity markets still continue to trade until 11.30pm in the night after which the commodity trade process takes place. After all trade processes are complete, a starter process is run on Kite at 5am in the morning where the correct closing balances for Equity as well as Commodity is updated on it from Q to ensure the correct margin is available for the new trading day.
Another thing about Kite balance is that if there was a payin (funds transferred in) during the day, it will end up showing twice in the night, until the new files are updated from Q. In this case, the payin of 5lks is showing twice on Kite, hence the balance is 5lks more.
Before the markets commence to trade, the closing balances on Kite and Q will match and be up to date.
Please note that the closing balance in Q is shown under Equity cash balance and the closing balance in Kite is shown under Total account value. This total account value will then be the free cash balance to trade with for the next trading day.