UNPKG

fake-stock-market-generator

Version:

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

42 lines (32 loc) 905 B
# Fake Stock Market Generator ### Generates a fake symbol, company and price data for the specified number of days. ### To install run this command: ```javascript npm install fake-stock-market-generator --save ``` ### Then import it ```javascript let fakestockmarketgenerator = require('fake-stock-market-generator'); ``` ### Run it using this command ```javascript fakestockmarketgenerator.generateStockData(numberOfDays) ``` ### Test it by using this command ```javascript node -e 'require(\"./index.js\").generateStockData(5)' ``` ### An example of the output ```javascript { 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 } ] } ```