mirror of
https://github.com/discountry/ritmex-bot.git
synced 2026-09-10 00:38:07 +00:00
Add Binance depth monitoring configuration to MakerPoints
- Introduced new environment variables `MAKER_POINTS_BINANCE_DEPTH_WINDOW_BPS` and `MAKER_POINTS_BINANCE_DEPTH_IMBALANCE_RATIO` to configure Binance depth monitoring. - Updated `MakerPointsConfig` interface and implementation to include these new parameters. - Enhanced translations to reflect dynamic depth window information in the UI. - Added tests to validate the new configuration options and their integration into the MakerPoints engine.
This commit is contained in:
@@ -206,8 +206,12 @@ export class MakerPointsEngine {
|
||||
baseUrl: process.env.BINANCE_SPOT_WS_URL ?? process.env.BINANCE_WS_URL,
|
||||
restBaseUrl: process.env.BINANCE_REST_URL,
|
||||
levels: 20,
|
||||
ratio: 2,
|
||||
depthWindowBps: 9,
|
||||
ratio: Number.isFinite(this.config.binanceDepthImbalanceRatio)
|
||||
? Math.max(1.01, Number(this.config.binanceDepthImbalanceRatio))
|
||||
: 8,
|
||||
depthWindowBps: Number.isFinite(this.config.binanceDepthWindowBps)
|
||||
? Math.max(1, Number(this.config.binanceDepthWindowBps))
|
||||
: 5,
|
||||
speedMs: 100,
|
||||
logger: (context, error) => {
|
||||
this.tradeLog.push("warn", `Binance ${context} 异常: ${extractMessage(error)}`);
|
||||
|
||||
Reference in New Issue
Block a user