Average buy price is wrong

Kite shows wrong average buy price. For example I buy share A for INR 500 X 10 shares. then again I buy Share A 600 X 10 shares (The avg buy now is 550 per share), Now I sell 800 Shares X 10. Now how to calculate the avg price?

Its the average price which is taken into effect for intraday. For delivery, it will work out as FIFO model even though your average price remains 550 but since u bought in parts and now selling in parts so FIFO is followed.

you placed your orders @ 500 and @ 600, but important is that what price the order executed, which you can check in ledger or contract note.
simple taking, money put for the order / qty received is the avg price