Important: This documentation covers Yarn 1 (Classic).
For Yarn 2+ docs and migration guide, see yarnpkg.com.

Package detail

fake-stock-market-generator

sabriel4527.2kISC1.0.3

Generates FAKE price data that can be used to simulate a stock market

stock, market, data, fake

readme

Fake Stock Market Generator

Generates a fake symbol, company and price data for the specified number of days.

To install run this command:

npm install fake-stock-market-generator --save

Then import it

let fakestockmarketgenerator = require('fake-stock-market-generator');

Run it using this command

fakestockmarketgenerator.generateStockData(numberOfDays)

Test it by using this command

node -e 'require(\"./index.js\").generateStockData(5)'

An example of the output

{ symbol: 'RI',
  companyName: 'Crist LLC',
  catchPhrase: 'Down-sized bandwidth-monitored budgetary management',
  priceData: 
   [ { minute: 0, price: 524 },
     { minute: 1, price: 536.63 },
     { minute: 2, price: 565.37 },
     { minute: 3, price: 566.74 },
     { minute: 4, price: 576.08 } 
    ] 
}