Enhance Binance depth health monitoring and defense mode logic

- Updated translations for Binance depth status messages to include depth window information.
- Modified `MakerPointsEngine` to incorporate health checks for the Binance depth tracker, including handling of unhealthy states.
- Improved defense mode activation logic to respond to Binance depth health status, ensuring appropriate logging and notifications.
- Added integration tests for defense mode behavior based on Binance depth health, validating transitions into and out of defense mode.
- Refactored `BinanceDepthTracker` to support health checks and improved connection management.
This commit is contained in:
discountry
2026-02-07 21:54:22 +08:00
parent fa82d45bfb
commit 2a1cf24510
5 changed files with 623 additions and 108 deletions
+4
View File
@@ -94,6 +94,8 @@ describe("MakerPointsEngine defense-mode REST polling", () => {
(engine as any).enterDefenseMode({
standxDepthStale: true,
binanceStale: false,
binanceUnhealthy: false,
binanceHealthReason: null,
standxAccountStale: false,
accountInvalid: false,
standxRestUnhealthy: false,
@@ -146,6 +148,8 @@ describe("MakerPointsEngine defense-mode REST polling", () => {
(engine as any).enterDefenseMode({
standxDepthStale: true,
binanceStale: false,
binanceUnhealthy: false,
binanceHealthReason: null,
standxAccountStale: false,
accountInvalid: false,
standxRestUnhealthy: false,