mirror of
https://github.com/discountry/ritmex-bot.git
synced 2026-09-10 08:48: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:
@@ -28,10 +28,14 @@ describe("config env parsing", () => {
|
||||
process.env.EXCHANGE = "standx";
|
||||
process.env.MAKER_POINTS_STOP_LOSS_USD = "1 # comment";
|
||||
process.env.MAKER_POINTS_CLOSE_THRESHOLD = "2 ; comment";
|
||||
process.env.MAKER_POINTS_BINANCE_DEPTH_WINDOW_BPS = "6 # comment";
|
||||
process.env.MAKER_POINTS_BINANCE_DEPTH_IMBALANCE_RATIO = "9 ; comment";
|
||||
|
||||
const { makerPointsConfig } = await loadConfig();
|
||||
expect(makerPointsConfig.stopLossUsd).toBe(1);
|
||||
expect(makerPointsConfig.closeThreshold).toBe(2);
|
||||
expect(makerPointsConfig.binanceDepthWindowBps).toBe(6);
|
||||
expect(makerPointsConfig.binanceDepthImbalanceRatio).toBe(9);
|
||||
});
|
||||
|
||||
it("parses boolean maker-points env values with inline comments", async () => {
|
||||
@@ -42,4 +46,3 @@ describe("config env parsing", () => {
|
||||
expect(makerPointsConfig.enableBand10To30).toBe(false);
|
||||
});
|
||||
});
|
||||
|
||||
|
||||
Reference in New Issue
Block a user