Пример #1
0
 private void KlineListen()
 {
     try
     {
         WebSocketClient.SubscribeKlineStream(this.Symbol.Key.ToLower(), KlineInterval.OneMinute, HandleKlineEvent);
     }
     catch (Exception ex)
     {
         Logger.Error("Exception during KlineListen: " + BinanceMarketApi.GetExceptionErrorInfo(ex));
     }
 }
Пример #2
0
 private void PartialDepthListen()
 {
     try
     {
         WebSocketClient.SubscribePartialDepthStream(this.Symbol.Key.ToLower(), PartialDepthLevels.Five, HandlePartialDepthUpdate);
     }
     catch (Exception ex)
     {
         Logger.Error("Exception during PartialDepthListen: " + BinanceMarketApi.GetExceptionErrorInfo(ex));
     }
 }
Пример #3
0
 public override async Task Update(TimeSlice slice)
 {
     foreach (var op in Algo.ActiveOperations)
     {
         try
         {
             await ManageOperation(op);
         }
         catch (Exception ex)
         {
             var msg = BinanceMarketApi.GetExceptionErrorInfo(ex);
             Logger.Error($"SimpleStopLossRiskManager: exception while managin  {op.ToString("c")}\n       Error: {msg}");
         }
     }
 }