Complete overhaul of all markets

This commit is contained in:
joeuhren
2020-11-27 20:34:15 -07:00
parent ed22c671fc
commit 85fef18cdb
24 changed files with 988 additions and 1492 deletions
+4 -4
View File
@@ -166,12 +166,12 @@ function save_tx(txid, blockheight, cb) {
}
function get_market_data(market, cb) {
if(fs.existsSync('./lib/markets/' + market + '.js')){
if (fs.existsSync('./lib/markets/' + market + '.js')) {
exMarket = require('./markets/' + market);
exMarket.get_data(settings.markets.coin, settings.markets.exchange, function(err, obj){
exMarket.get_data(settings.markets, function(err, obj) {
return cb(err, obj);
});
}else{
} else {
return cb(null);
}
}
@@ -683,7 +683,7 @@ module.exports = {
buys: obj.buys,
sells: obj.sells,
history: obj.trades,
summary: obj.stats,
summary: obj.stats
}, function() {
if ( market == settings.markets.default ) {
Stats.updateOne({coin:settings.coin}, {