Skip to content

A simple tool for fund using Node.js and MongoDB | 基于Node.js和MongoDB实现的基金小工具

License

Notifications You must be signed in to change notification settings

zx33/fund-tools

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

8 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Fund tools

Description

A simple tool to provide user information of funds.

Information such as net asset value, accumulated net, value trend and so on.

Function Todo List

Functions planned to complete right now:

  • Basic information of fund
  • Funds information search
  • Fund net asset value trend

Available APIs and Pages

APIs

  1. /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

  2. /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

Pages

  1. /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.

Implement

Using ExpressJS and MongoDB.

How to run

  1. Install Node.js environment
  2. First clone the repository.
  3. Run command npm install
  4. 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;
  1. run command npm start or node app

Finally

Just have fun.

About

A simple tool for fund using Node.js and MongoDB | 基于Node.js和MongoDB实现的基金小工具

Topics

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published