doppelgunner-stock
v2.3.6
Published
stock api for node connects with WSJ as of now
Downloads
4
Maintainers
Readme
doppelgunner-stock api
Api for getting historical-prices and analyzing its data.
Installation
npm install --save doppelgunner-stock
Samples
Loading of historical prices from WSJ.
- Note: internet is required
- Note: important to pass function callback to execute when downloading finished
import { HP, HPCommons, HPModel } from 'doppelgunner-stock';
HP.load(HP.downloadWSJ('X',false,'PH'), funcCallback);
OR
HP.load(HP.downloadWSJ('X',false,'PH'), () => {/*something to do here*/});
Function callback
- Note: better to make promise for chaining
- Note: This sample extracts and displays all dates
function funcCallback(hpModel) {
new Promise((resolve,reject) => {
resolve(hpModel);
}).then(xurpas => HPCommons.getColumn(xurpas, 'date'))
.then(dateColumn => console.log(dateColumn));
}
Limitations
- Downloads from WSJ as of now
- Only historical-prices