internal PriceTicker ToPriceTicker(HitBtc.Ticker ticker) { return(new PriceTicker() { HighPrice = ticker.high.GetValueOrDefault(), LowPrice = ticker.low.GetValueOrDefault(), LastPrice = ticker.last.GetValueOrDefault(), PriceChange = ticker.last.GetValueOrDefault() - ticker.open.GetValueOrDefault(), PriceChangePercent = CalcChangePercent(ticker.last.GetValueOrDefault(), ticker.open.GetValueOrDefault()), QuoteVolume = ticker.volumeQuote, Symbol = ticker.symbol, SymbolInformation = GetSymbolInformation(ticker.symbol), Volume = ticker.volumeQuote }); }
internal bool FilterInvalidTicker(HitBtc.Ticker ticker) { return(ticker.last.HasValue && ticker.open.HasValue); }