Esempio n. 1
0
        public TickerPriceResponse GetPriceValue(AvailableStrategy availableStrategy)
        {
            var result = new TickerPriceResponse();

            var response = _binanceClient.Spot.Market.GetPrice(availableStrategy.Symbol);

            if (response.Success)
            {
                result.SetResult(response.Data.Price);
            }
            else
            {
                result.Message = response.Error.Message;
            }

            return(result);
        }
Esempio n. 2
0
        public TickerPriceResponse GetPriceValue(AvailableStrategy availableStrategy)
        {
            var result = new TickerPriceResponse();

            var response = _kucoinClient.GetTicker(availableStrategy.Symbol);

            if (response.Success)
            {
                result.SetResult(response.Data.LastTradePrice.GetValueOrDefault());
            }
            else
            {
                result.Message = response.Error.Message;
            }

            return(result);
        }