diff --git a/project/OsEngine/Market/Servers/Binance/BinanceClient.cs b/project/OsEngine/Market/Servers/Binance/BinanceClient.cs index 05cee671a..4e98b65e9 100644 --- a/project/OsEngine/Market/Servers/Binance/BinanceClient.cs +++ b/project/OsEngine/Market/Servers/Binance/BinanceClient.cs @@ -566,15 +566,16 @@ public string CreateQuery(Method method, string endpoint, Dictionary DateTime.Now) + { + continue; + } + if (_ordersToExecute != null && _ordersToExecute.Count != 0) { Order order; @@ -2003,6 +2011,11 @@ private void ExecutorOrdersThreadArea() /// private object _orderLocker = new object(); + /// + /// время когда биржа последний раз оказалась не доступна из-за "перегрузки" + /// + private DateTime _lastSystemOverload; + /// /// входящий из системы ордер /// @@ -2206,6 +2219,22 @@ public void CanselOrder(Order order) private void ErrorEvent(string error) { SendLogMessage(error, LogMessageType.Error); + + if (error == + "{\"error\":{\"message\":\"The system is currently overloaded. Please try again later.\",\"name\":\"HTTPError\"}}") + { // останавливаемся на минуту + _lastSystemOverload = DateTime.Now; + } + if (error == "{\"error\":{\"message\":\"Executing at order price would lead to immediate liquidation\",\"name\":\"ValidationError\"}}") + { + SendLogMessage("Цена ликвидации при таком объме выше чем текущая цена ордера. Уменьшите объём", LogMessageType.Error); + } + if (error == "{\"error\":{\"message\":\"This key is disabled.\",\"name\":\"HTTPError\"}}") + { + SendLogMessage("Биржа заблокировала Ваши ключи.", LogMessageType.System); + _serverStatusNead = ServerConnectStatus.Disconnect; + Thread.Sleep(2500); + } } /// diff --git a/project/OsEngine/bin/Debug/OsEngine.exe b/project/OsEngine/bin/Debug/OsEngine.exe index f3d3bb9f8..fd3c81698 100644 Binary files a/project/OsEngine/bin/Debug/OsEngine.exe and b/project/OsEngine/bin/Debug/OsEngine.exe differ