public IActionResult GetByAssetPairIdAsync(string assetPairId)
        {
            var orderBook = _orderBooksService.GetByAssetPairId(assetPairId);

            var model = _mapper.Map <OrderBookModel>(orderBook);

            return(Ok(model));
        }
示例#2
0
        public override Task <GetOrderBookByAssetPairIdResponse> GetByAssetPairId(
            GetOrderBookByAssetPairIdRequest request, ServerCallContext context)
        {
            var orderBook = _orderBooksService.GetByAssetPairId(request.AssetPairId);

            var response = new GetOrderBookByAssetPairIdResponse {
                OrderBook = _mapper.Map <OrderBook>(orderBook)
            };

            return(Task.FromResult(response));
        }