Example #1
0
        public MarketOrdersResponse GetMarketOrders(MarketOrdersRequest request)
        {
            string tradePairLabel = GetTradePairLabel(request.TradePair);
            var    query          = request.OrderCount.HasValue ? $"/{tradePairLabel}/{request.OrderCount}" : $"/{tradePairLabel}";

            return(GetResult <MarketOrdersResponse>(PublicApiCall.GetMarketOrders, query));
        }
Example #2
0
        public MarketOrdersResponse GetMarketOrders(MarketOrdersRequest request)
        {
            var query = "getorderbook?market=" + $"{request.TradePair.PairLabel}" + "&type=both";
            MarketOrdersResponse r = GetResult <MarketOrdersResponse>(PublicApiCall.GetMarketOrders, query);

            foreach (var c in r.Data.Buy)
            {
                c.Label = request.TradePair.PairLabel;
                c.Total = c.Price * c.Volume;
            }

            foreach (var c in r.Data.Sell)
            {
                c.Label = request.TradePair.PairLabel;
                c.Total = c.Price * c.Volume;
            }

            return(r);
        }