Fixed a null issue with CMC data as reprted in #543

This commit is contained in:
Legedric 2018-06-04 09:48:02 +02:00
parent aca22a3a5f
commit 4fef7f566a
1 changed files with 1 additions and 1 deletions

View File

@ -35,7 +35,7 @@ namespace Core.MarketAnalyzer {
market.Symbol = currencyTicker.First["symbol"].ToString(); market.Symbol = currencyTicker.First["symbol"].ToString();
market.Price = (double)currencyTicker.First["quotes"]["USD"]["price"]; market.Price = (double)currencyTicker.First["quotes"]["USD"]["price"];
market.Volume24h = (double)currencyTicker.First["quotes"]["USD"]["volume_24h"]; market.Volume24h = (double)currencyTicker.First["quotes"]["USD"]["volume_24h"];
if (!String.IsNullOrEmpty(currencyTicker.First["quotes"]["USD"]["percent_change_24h"])) { if (!String.IsNullOrEmpty(currencyTicker.First["quotes"]["USD"]["percent_change_24h"].ToString())) {
market.TrendChange24h = (double)currencyTicker.First["quotes"]["USD"]["percent_change_24h"]; market.TrendChange24h = (double)currencyTicker.First["quotes"]["USD"]["percent_change_24h"];
} }