Example #1
0
 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
     });
 }
Example #2
0
 internal bool FilterInvalidTicker(HitBtc.Ticker ticker)
 {
     return(ticker.last.HasValue && ticker.open.HasValue);
 }