public async Task <string> shouge(long orderId) { try { var dogEmptySell = new DogEmptySellDao().GetDogEmptySellBySellOrderId(orderId); if (dogEmptySell.IsFinished) { return("已经完成的不操作"); } var dogEmptyBuyList = new DogEmptyBuyDao().ListDogEmptyBuyBySellOrderId(orderId); if (dogEmptyBuyList.Count > 0 && dogEmptyBuyList.Find(it => it.BuyState != StateConst.Canceled.ToString() && it.BuyState != StateConst.PartialFilled.ToString() && it.BuyState != StateConst.Filled.ToString()) != null) { // 存在操作中的,则不操作 return("存在操作中的,则不操作"); } CommonSymbol symbol = CoinUtils.GetCommonSymbol(dogEmptySell.SymbolName, dogEmptySell.QuoteCurrency); // 先初始化一下 AnalyzeResult analyzeResult = AnalyzeResult.GetAnalyzeResult(symbol); if (analyzeResult == null) { return("分析结果未null"); } return(CoinTrade.ShouGeDogEmpty(dogEmptySell, symbol, analyzeResult, true)); } catch (Exception ex) { logger.Error($"严重 orderId:{orderId}- {ex.Message}", ex); return(ex.Message); } }