fake-stock-market-generator
v1.0.3
Published
Generates FAKE price data that can be used to simulate a stock market
Downloads
410
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 }
]
}