If we go at "https://kite.zerodha.com/holdings" zerodha shows very nice portfolio values related to mutual funds investments at the bottom. That shows: 1. Total Investments 2. Current Value 3. P&L
I need exactly the same values but there is no api exists as of now to fetch these. What would be the recommend and clean way to get these values for a user?
You can fetch mutual funds holdings and sum up all the (average price * quantity) to get total investments. You can sum all the (LTP * quantity) to get the current value. P&L is the difference between these two values.
You can sum all the (LTP * quantity) to get the current value. P&L is the difference between these two values.