Ejemplo n.º 1
0
 public BfTradingMarketTicker(BfOrderBook orderBook, BfTicker nativeTicker, BfMarketHealth health, TimeSpan serverTimeDiff)
 {
     OrderBook      = orderBook;
     NativeTicker   = nativeTicker;
     Health         = health;
     ServerTimeDiff = serverTimeDiff;
     UpdatedTime    = DateTime.UtcNow + serverTimeDiff;
 }
Ejemplo n.º 2
0
        public BfTradingMarketTicker(BfOrderBook orderBook, BfTicker fxbtcTicker, BfTicker btcTicker, BfMarketHealth health, TimeSpan serverTimeDiff)
        {
            OrderBook      = orderBook;
            NativeTicker   = fxbtcTicker;
            Health         = health;
            ServerTimeDiff = serverTimeDiff;
            UpdatedTime    = DateTime.UtcNow + serverTimeDiff;

            if (fxbtcTicker != null && btcTicker != null)
            {
                SFDDifference = unchecked ((double)((fxbtcTicker.LastTradedPrice - btcTicker.LastTradedPrice) / btcTicker.LastTradedPrice));
                SFDRate       = CalculateSfdRate(Math.Abs(SFDDifference));
            }
        }