public AssetStatusResponse ListAssetStatus(int assetId) { AssetStatusResponse result = null; var asset = GetById(assetId); var coinGeckoData = CoinGeckoBusiness.GetSimpleCoinData(asset.CoinGeckoId); if (coinGeckoData != null) { result = new AssetStatusResponse() { AssetId = asset.Id, Name = asset.Name, Code = asset.Code, AllTimeHigh = coinGeckoData.AllTimeHigh, AllTimeHighDate = coinGeckoData.AllTimeHighDate, AllTimeHighPercentage = coinGeckoData.AllTimeHighPercentage, CirculatingSupply = coinGeckoData.CirculatingSupply, High24h = coinGeckoData.High24h, Low24h = coinGeckoData.Low24h, MarketCap = coinGeckoData.MarketCap, MarketCapPercentage24h = coinGeckoData.MarketCapPercentage24h, MarketCapVariation24h = coinGeckoData.MarketCapVariation24h, MarketCapRank = coinGeckoData.MarketCapRank, Price = coinGeckoData.Price, TotalSupply = coinGeckoData.TotalSupply, TotalVolume = coinGeckoData.TotalVolume, Variation24h = coinGeckoData.Variation24h, VariationPercentage24h = coinGeckoData.VariationPercentage24h }; } return(result); }
public List <AssetResponse.ValuesResponse> FilterValueResponse(int assetId, DateTime?dateTime) { dateTime = dateTime ?? Data.GetDateTimeNow().AddDays(-30); var asset = AssetBusiness.GetById(assetId); var days = Math.Ceiling(Data.GetDateTimeNow().Subtract(dateTime.Value).TotalDays); return(CoinGeckoBusiness.GetAssetValues(asset.CoinGeckoId, (int)days)); }
public async Task CreateCoingeckoNotIncludedAssetsAsync() { await CreateNotIncludedAssetsAsync(CoinGeckoBusiness.GetAllCoinsData()); }
public void UpdateCoingeckoAssetsMarketcap() { UpdateAssetsMarketcap(CoinGeckoBusiness.GetAllCoinsData()); }
public async Task UpdateCoingeckoAssetsIconsAsync() { await UpdateIconsAsync(CoinGeckoBusiness.GetAllCoinsData()); }