Hi Sujith/Rakesh, Can you please let me know when does the realized field get updated for Orders? Even when the position is closed, this field is not getting updated. Only the unrealised field has the value. At any point of point if I need to know the realised PnL, not able to get the details from this field instead I am manually calculating it.
Realised param in the positions API is a legacy field. You can use this formula, pnl = (sellValue - buyValue) + (netQuantity * lastPrice * multiplier);
pnl = (sellValue - buyValue) + (netQuantity * lastPrice * multiplier);
For calculating the realized and unrealised profits should be go for manual calculations.