public async Task <ActionResult> CancelTrade(int id, TradeCancelType cancelType)
        {
            var result = await TradeWriter.CancelTrade(User.Id(), new CancelTradeModel
            {
                //TradeId = id,
                //TradePairId = id,
                CancelType = cancelType
            });

            return(Json(result));
        }
        public async Task <ApiResult <CancelOrderResponse> > CancelOrder(string userId, TradeCancelType cancelType, int?orderId, string market)
        {
            try
            {
                var result = await TradeService.QueueCancel(new CancelTradeModel
                {
                    UserId     = userId,
                    Market     = market,
                    OrderId    = orderId,
                    CancelType = cancelType,
                    IsApi      = true
                });

                if (result.HasError)
                {
                    return(new ApiResult <CancelOrderResponse>(false, result.Error));
                }

                var response = new CancelOrderResponse
                {
                    CanceledOrders = result.CanceledOrders
                };
                return(new ApiResult <CancelOrderResponse>(true, response));
            }
            catch (Exception ex)
            {
                return(new ApiResult <CancelOrderResponse>(ex));
            }
        }