5 releases
0.1.4 | Jul 2, 2020 |
---|---|
0.1.3 | Oct 1, 2019 |
0.1.2 | Sep 26, 2019 |
0.1.1 | Sep 24, 2019 |
0.1.0 | Sep 10, 2019 |
#920 in HTTP server
23KB
250 lines
find_latest_nav_site
A web site to find latest nav for the 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:
- Learn Rust language
- Learn Web App in Rust language
- 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 a browser)
-
Clone or download this app
-
Edit Settings.toml for folder names, database name (yearly database), ip address, ip port, etc
-
Build the executable file using: $Cargo build --release
-
Copy following files/folder into a separate folder say "~/projects"
- target/release/find_latest_nav_site
- templates folder
- Settings.toml file
-
Edit find_latest_nav_site.service for folder names and follow instructions in it to run this app as a service in linux
-
Assuming entries in Settings.toml file for ip address and port as 127.0.0.1 and 4000, open the web browser and enter url as http://127.0.0.1:4000. Browser then shows a text field to enter ISIN codes. Enter ISIN codes such as INF109KC1TX2 INF173K01MT0 and click on search icon. The result will appear under NAV Details.
-
Alternately, ISIN codes can be entered in the URL itself as http://127.0.0.1:4000/search?codes=INF109KC1TX2,INF173K01MT0. This shows a list similar to AMFI website list. This list can be saved into a local folder using shell script as:
In a file name, such as nav.sh, enter following row
curl http://127.0.0.1:4000/search?codes=INF109KC1TX2,INF173K01MT0 --output NAV.csv
Please note that .csv extension in NAV.csv; so as to use it as a spreadsheet or to link it with another spread sheet.
How to use it (in command line)
Please refer: https://github.com/mohankumaranna/find_latest_nav
Example
A working web applications can be found at the following link; running in a digital ocean's droplet:
find latest NAV site
Tools
In case of running multiple web applications on different ports, a traffic router can be used. Please refer: https://github.com/mohankumaranna/traffic_router
License
MIT
Dependencies
~60MB
~1M SLoC