Include Satoshi ticker, include Monero ticker, and introduce 24h pct change for WOW

This commit is contained in:
dsc
2021-05-10 18:56:57 +02:00
parent 096b28318c
commit 2ccefe0883
6 changed files with 138 additions and 67 deletions
+3 -1
View File
@@ -41,7 +41,9 @@ void Prices::cryptoPricesReceived(const QJsonArray &data) {
ms.symbol = obj.value("symbol").toString().toUpper();
ms.image = obj.value("image").toString();
ms.name = obj.value("name").toString();
ms.price_usd = obj.value("current_price").toDouble();
ms.price_usd = obj.value("current_price").toDouble(0);
ms.price_btc = obj.value("current_price_btc").toDouble(0.0);
ms.price_sat = obj.value("current_price_satoshi").toInt(0);
ms.price_usd_change_pct_24h = obj.value("price_change_percentage_24h").toDouble();
if(ms.price_usd <= 0) continue;
+2
View File
@@ -15,6 +15,8 @@ struct marketStruct {
QString name;
QString image;
double price_usd;
double price_btc;
uint price_sat;
double price_usd_change_pct_24h;
};