Giter VIP home page Giter VIP logo

node-amfinav's Introduction

node-amfinav

Fetches NAVs of Indian mutual funds published by AMFI and reformats data into JSON

DISCLAIMER/WARNING : Developer has nothing to do with AMFI . If AMFI changes the way data is published or stops publishing the data, this code will not work as expected.

Data can be read as a JSON Array

Install

npm install amfinav

Usage

amfi = require('amfi');
amfiNavs = new amfi(options);

using with an event listener with refresh every 3600 seconds

var amfiNavs = new amfi({refreshInterval : 3600});
amfiNavs.on('dataready', callback);

using with a callback with refresh every 3600 seconds

var amfiNavs = new amfi({callback: callback, refreshInterval : 3600});

using with a callback and no refresh

var amfiNavs = new amfi({callback: callback});

using with a event listener and no refresh

var amfiNavs = new amfi();
amfiNavs.on('dataready', listener);
Options
  • callback : function which handles NAV Data
  • refreshInterval : Interval in seconds. Data is refreshed at this interval.
Events
  • dataready : Emitted after data is fetched and processed into JSON.
Objects & properties
  • amfi.status : String, 'Acquiring Data' or 'Data Ready'
  • amfi.updateDate : Date, When last time data was updated
  • amfi.data : Object, NAV Data
	{funds:[fund1, fund2...], fundManagers: [fundManager1, fundManager2..], 
	fundTypes: [fundType1, fundType2...], updateDate : Date}
  • fundManager : String, name of the fund manager
  • fundType : String, fund type
  • fund : Object
{ 'Scheme Code': 'NNNNNNNN',
  'ISIN Div Payout/ ISIN Growth': 'Code1',
  'ISIN Div Reinvestment': 'Code2',
  'Scheme Name': 'Scheme XXXXXX',
  'Net Asset Value': '10.6113',
  'Repurchase Price': '10.5052',
  'Sale Price': '10.6113',
  'Date': '28-Mar-2013',
  'Type': 'Type1',
  'Manager': 'Manager1' }

node-amfinav's People

Contributors

svoorakk avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.