mirror of
https://github.com/discountry/ritmex-bot.git
synced 2026-09-11 09:18:08 +00:00
Enhance Binance depth health monitoring and defense mode logic (#21)
- 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:
@@ -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,
|
||||
|
||||
Reference in New Issue
Block a user