Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

google-stocks-watch

Package Overview
Dependencies
Maintainers
1
Versions
5
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

google-stocks-watch

Stock ticker to pull the latest stock data and calculate gain or loss based on the purchase

  • 0.1.0
  • Source
  • npm
  • Socket score

Version published
Weekly downloads
0
decreased by-100%
Maintainers
1
Weekly downloads
 
Created
Source

google-stocks-watch Build Status

Stock ticker to pull the latest stock data and calculate gain or loss based on the purchase. Based on google-stocks NPM

Install

$ npm install --save google-stocks-watch

Usage

var GoogleStocksWatch = require('google-stocks-watch'),
    clear = require('clear'),
    googleStocksWatch;

var config = {
  timerInterval: 8,
  stocks: {
    'AAPL': {
      amount: '2',
      price: '130.10'
    },
    'GOOG': {
      amount: '10',
      price: '520.55'
    }
  }
};

googleStocksWatch = new GoogleStocksWatch(config, function(err, data) {
  clear();
  console.log(data);
});

googleStocksWatch.start();

returned format looks like this:

/**
[ { code: 'AAPL',
    amount: '2',
    current_time: 'May 4, 4:47PM EDT',
    current_price: '128.77',
    current_total_price: '257.54',
    purchased_price: '130.10',
    purchased_total_price: '260.20',
    diff: '-2.66',
    percentage: '-1.02%' },
  { code: 'GOOG',
    amount: '10',
    current_time: 'May 4, 4:46PM EDT',
    current_price: '540.97',
    current_total_price: '5409.70',
    purchased_price: '520.55',
    purchased_total_price: '5205.50',
    diff: '204.20',
    percentage: '3.92%' } ]
**/

License

MIT license; see LICENSE.

(c) 2015 by Alexey Novak

Keywords

FAQs

Package last updated on 12 May 2015

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc