A simple tool to provide user information of funds.
Information such as net asset value, accumulated net, value trend and so on.
Functions planned to complete right now:
- Basic information of fund
- Funds information search
- Fund net asset value trend
-
/api/fund/search_fund
Search funds that are related to the word.
Params:
word
: key word of the fund, it can be the title, code or spell.Example:
/api/fund/search_fund?word=161725
-
/api/fund/fund_tendency_chart
Get information of net asset value tendency of the fund.
Params:
code
: the code of fund.time_interval
: time interval of the result, default is 30 days.Example:
/api/fund/fund_tendency_chart?code=161725&time_interval=10
-
/tendency_info.html
This page is used to show the chart of tendency of the fund.
User input the code of fund and select the time interval, then generate the chart.
Using ExpressJS and MongoDB.
- Install Node.js environment
- First clone the repository.
- Run command
npm install
- Create
conf
folder and write the config file. Content as follow:
/* ./conf/conf.js */
var config = {
port: xxxx, // app listening port
default_time_interval: xx, //default time interval for trend graph.
mongo_url: "xxxx", // MongoDB database url
env: "xx", // project environment, if value is "testing", app will use logger middleware.
fund_tendency_map: ['净值日期', '单位净值', '累计净值', '日增长率', '申购状态', '赎回状态', '分红送配'], // Do not modify this line.
};
module.exports = config;
- run command
npm start
ornode app
Just have fun.