Skip to content

Conversation

@brf153
Copy link
Contributor

@brf153 brf153 commented Sep 23, 2025

Earlier I was not getting important mutual fund fields like avg_cost, total_cost, return, etc
image

I have added these values to Mutual Fund type after which I started getting it
Screenshot 2025-09-23 180215

It was present in the nsdl_statement.py

elif current_demat["type"] == "MF":
            if m := re.search(
                NSDL_MF_HOLDINGS_RE,
                line,
                re.DOTALL | re.MULTILINE | re.I,
            ):
                isin, ucc, name, folio, units, avg_cost, total_cost, nav, value, pnl, returns = (
                    m.groups()
                )
                name = re.sub(r"\s+", " ", name).strip()
                name = re.sub(r"[^a-zA-Z0-9_)]+$", "", name).strip()
                current_demat["mutual_funds"].append(
                    {
                        "isin": isin,
                        "ucc": ucc,
                        "name": name,
                        "folio": folio,
                        "balance": units,
                        "avg_cost": avg_cost,
                        "total_cost": total_cost,
                        "nav": nav,
                        "value": value,
                        "pnl": pnl,
                        "return": returns,
                    }
                )

but not in the types

Signed-off-by: brf153 <153hsb@gmail.com>
@codereverser codereverser merged commit 7064a9e into codereverser:main Sep 24, 2025
1 check failed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants