Finds latest NAV for a given ISIN code or scheme code; in fact, it fetches entire list of latest NAV from https://www.amfiindia.com/; store it into a SQLite database; thereafter, for each request, shows only rows that are relevant to the given ISIN codes or Scheme Codes.
Developed with following goals in mind:
a) Run it as $ target/release/findlatestnav "INF209K01YN0" (where "INF209K01YN0" is an ISIN code of a mutual fund), this gives following results:
latest NAVs are: [Record { schemecode: 119550, isingrowth: "INF209K01YN0", isindivreinvestment: "-", schemename: "Aditya Birla Sun Life Banking & PSU Debt Fund- Direct Plan-Growth", netassetvalue: "254.3784", date: "23-Sep-2019", remarks: None, createdon: "2019-09-24 11:52:24.205286755 +05:30" }]
b) More than one ISIN code can be passed with comma, space, semicolon separator as $ target/release/findlatestnav "INF209KA12Z1, INF209K01YN0" this gives result like:
latest NAVs are: [Record { schemecode: 119551, isingrowth: "INF209KA12Z1", isindivreinvestment: "INF209KA13Z9", schemename: "Aditya Birla Sun Life Banking & PSU Debt Fund - Direct Plan-Dividend", netassetvalue: "150.1778", date: "23-Sep-2019", remarks: None, createdon: "2019-09-24 11:52:24.204577137 +05:30" }, Record { schemecode: 119550, isingrowth: "INF209K01YN0", isindivreinvestment: "-", schemename: "Aditya Birla Sun Life Banking & PSU Debt Fund- Direct Plan-Growth", netassetvalue: "254.3784", date: "23-Sep-2019", remarks: None, createdon: "2019-09-24 11:52:24.205286755 +05:30" }]
Please refer: https://github.com/mohankumaranna/findlatestnavsite_
MIT