First commit

This commit is contained in:
Lewis Diamond
2020-07-12 22:47:21 -04:00
commit 37ebd9f824
18 changed files with 3277 additions and 0 deletions

15
src/processors/pricing.js Normal file
View File

@@ -0,0 +1,15 @@
const strom = require("strom").strom();
const pricing = require("../stores/pricing");
module.exports = function ({
seed = undefined,
pricingStore = pricing.global({ seed }),
} = {}) {
return strom.map(({ ticker, price }) => {
if (price) {
pricingStore.set(ticker, parseFloat(price));
}
console.log(`Pricing for ${ticker} set to ${pricingStore.get(ticker)}`);
return;
});
};