Updated cryptowat.ch pricesource to new data format.

This commit is contained in:
evilny0 2021-02-06 14:50:16 +01:00
parent 046dc79a04
commit 71cfe71f9d

View File

@ -96,13 +96,13 @@ Money PriceSourceCryptoWatch::getCoinPriceFromData(int coinId)
{
case CPFM_COIN_ID_BTC:
{
Money x (jvalue["result"]["kraken:btceur"]);
Money x (jvalue["result"]["market:kraken:btceur"]);
m = x;
break;
}
case CPFM_COIN_ID_LTC:
{
Money x (jvalue["result"]["kraken:ltceur"]);
Money x (jvalue["result"]["market:kraken:ltceur"]);
m = x;
break;
}
@ -113,34 +113,34 @@ Money PriceSourceCryptoWatch::getCoinPriceFromData(int coinId)
}
case CPFM_COIN_ID_ICN:
{
Money x (jvalue["result"]["kraken:icnbtc"]);
Money y (jvalue["result"]["kraken:btceur"]);
Money x (jvalue["result"]["market:kraken:icnbtc"]);
Money y (jvalue["result"]["market:kraken:btceur"]);
ldebug << "ICN is not quoted in EUR. BTC price is : " << x;
m = x*y;
break;
}
case CPFM_COIN_ID_ETC:
{
Money x (jvalue["result"]["kraken:etceur"]);
Money x (jvalue["result"]["market:kraken:etceur"]);
m = x;
break;
}
case CPFM_COIN_ID_ETH:
{
Money x (jvalue["result"]["kraken:etheur"]);
Money x (jvalue["result"]["market:kraken:etheur"]);
m = x;
break;
}
case CPFM_COIN_ID_BCH:
{
Money x (jvalue["result"]["kraken:bcheur"]);
Money x (jvalue["result"]["market:kraken:bcheur"]);
m = x;
break;
}
case CPFM_COIN_ID_BTG:
{
Money x (jvalue["result"]["bitfinex:btgbtc"]);
Money y (jvalue["result"]["kraken:btceur"]);
Money x (jvalue["result"]["market:bitfinex:btgbtc"]);
Money y (jvalue["result"]["market:kraken:btceur"]);
ldebug << "BTG is not quoted in EUR. BTC price is : " << x;
m = x*y;
break;