Api bug unrealizedProfit is always zero


Hi @vive1101011

hey @vive1101011, this is not a bug. We don’t provide this data on APIs, most users who consume APIs can simply add P&L on all individual positions and get this with a simple query. We do the same and render combined P&L on the fly on Dhan platforms - you will see this is much much faster than all other platforms out there.

Why we don’t provide this - to get collective P&L from all positions on LTP that is changing dynamically and then streaming it - will result in lag & performance issues if we start streaming this.

Actually the problem is if quote api(getting LTP) not available to the individual investors then the only option left to calculate p&l is using /charts/intraday 1min candle close, which is delayed.