diff --git a/lib/database.js b/lib/database.js index 43a88f85..33372d72 100644 --- a/lib/database.js +++ b/lib/database.js @@ -779,8 +779,8 @@ module.exports = { history: obj.trades, summary: obj.stats }, function() { - // check if this is the default market - if (market == settings.markets_page.default_exchange.exchange_name) { + // check if this is the default market and trading pair and that the price is recorded in BTC + if (market == settings.markets_page.default_exchange.exchange_name && settings.markets_page.default_exchange.trading_pair.toUpperCase() == coin_symbol.toUpperCase() + '/' + pair_symbol.toUpperCase() && pair_symbol.toUpperCase() == 'BTC') { // this is the default market so update the last price stats Stats.updateOne({coin: settings.coin.name}, { last_price: obj.stats.last,