private CryptoMarket ConvertMarket(Instrument instrument)
        {
            var future = ConvertFuture(instrument);

            MarketType marketType = MarketType.Future;

            if (future == null)
            {
                marketType = MarketType.Perpetual;
            }
            if (future != null)
            {
                marketType = MarketType.Future;
            }

            var market = new CryptoMarket
            {
                Name           = instrument.Symbol,
                Future         = future,
                PriceIncrement = instrument.TickSize,
                QuoteCurrency  = instrument.QuoteCurrency,
                Underlying     = instrument.Underlying,
                Type           = marketType,
                BaseCurrency   = instrument.RootSymbol,
                MakerFee       = instrument.MakerFee,
                TakerFee       = instrument.TakerFee
            };

            return(market);
        }
Exemplo n.º 2
0
        private CryptoMarket ConvertMarket(Market market)
        {
            var future = ConvertFuture(market.Future);

            var cryptoMarket = new CryptoMarket
            {
                Name           = market.Name,
                Future         = future,
                Enabled        = market.Enabled,
                PriceIncrement = market.PriceIncrement,
                SizeIncrement  = market.SizeIncrement,
                QuoteCurrency  = market.QuoteCurrency,
                Underlying     = market.Underlying,
                Type           = ConvertMarketType(market.Type, market.Name),
                BaseCurrency   = market.BaseCurrency
            };

            return(cryptoMarket);
        }