public IActionResult GetByAssetPairIdAsync(string assetPairId) { var orderBook = _orderBooksService.GetByAssetPairId(assetPairId); var model = _mapper.Map <OrderBookModel>(orderBook); return(Ok(model)); }
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)); }