#utility #tool #library

bin+lib find_latest_nav

find latest net-asset-value (NAV) for the given scheme code or ISIN code; the source data is taken from amfi website

4 releases

0.1.3 Jul 2, 2020
0.1.2 Sep 26, 2019
0.1.1 Sep 24, 2019
0.1.0 Sep 10, 2019

#208 in #library

42 downloads per month
Used in find_latest_nav_site

MIT license

445KB
573 lines

find_latest_nav

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.

Goals

Developed with following goals in mind:

  1. Learn Rust language
  2. NAV list for a given ISIN codes rather than entire list found in amfiindia website; this in turn can slightly improve performance while opening along with mutual fund's tracking sheet; with this app, it loads only 10 to 20 rows, rather than entire list of approximately 5000 rows.

How to use it (in command line)

  1. Clone or download this app

  2. Edit Settings.toml for folder names, database name (yearly database), etc

  3. Build the executable file using: $Cargo build --release

  4. a) Run it as $ target/release/find_latest_nav "INF209K01YN0" (where "INF209K01YN0" is an ISIN code of a mutual fund), this gives following results:

    latest NAVs are: [Record { scheme_code: 119550, isin_growth: "INF209K01YN0", isin_div_reinvestment: "-", scheme_name: "Aditya Birla Sun Life Banking & PSU Debt Fund- Direct Plan-Growth", net_asset_value: "254.3784", date: "23-Sep-2019", remarks: None, created_on: "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/find_latest_nav "INF209KA12Z1, INF209K01YN0" this gives result like:

    latest NAVs are: [Record { scheme_code: 119551, isin_growth: "INF209KA12Z1", isin_div_reinvestment: "INF209KA13Z9", scheme_name: "Aditya Birla Sun Life Banking & PSU Debt Fund - Direct Plan-Dividend", net_asset_value: "150.1778", date: "23-Sep-2019", remarks: None, created_on: "2019-09-24 11:52:24.204577137 +05:30" }, Record { scheme_code: 119550, isin_growth: "INF209K01YN0", isin_div_reinvestment: "-", scheme_name: "Aditya Birla Sun Life Banking & PSU Debt Fund- Direct Plan-Growth", net_asset_value: "254.3784", date: "23-Sep-2019", remarks: None, created_on: "2019-09-24 11:52:24.205286755 +05:30" }]

How to use it (in a browser)

Please refer: https://github.com/mohankumaranna/find_latest_nav_site

License

MIT

Dependencies

~44MB
~763K SLoC