mirror of
https://github.com/discountry/ritmex-bot.git
synced 2026-09-11 09:18:08 +00:00
update maker points config
This commit is contained in:
+1
-1
@@ -61,7 +61,7 @@ MAKER_PRICE_TICK=0.1 # Maker price tick size (defaults to PRI
|
|||||||
|
|
||||||
# Maker-points Binance depth imbalance monitor
|
# Maker-points Binance depth imbalance monitor
|
||||||
MAKER_POINTS_BINANCE_DEPTH_WINDOW_BPS=3 # Binance depth monitor window around best bid/ask (bps)
|
MAKER_POINTS_BINANCE_DEPTH_WINDOW_BPS=3 # Binance depth monitor window around best bid/ask (bps)
|
||||||
MAKER_POINTS_BINANCE_DEPTH_IMBALANCE_RATIO=8 # Imbalance threshold ratio (e.g. 8 => one side >= 8x)
|
MAKER_POINTS_BINANCE_DEPTH_IMBALANCE_RATIO=9 # Imbalance threshold ratio (e.g. 9 => one side >= 9x)
|
||||||
|
|
||||||
# Grid strategy defaults
|
# Grid strategy defaults
|
||||||
GRID_LOWER_PRICE=25000 # Grid lower bound price (quote currency)
|
GRID_LOWER_PRICE=25000 # Grid lower bound price (quote currency)
|
||||||
|
|||||||
@@ -133,7 +133,7 @@ MAKER_POINTS_CLOSE_THRESHOLD=0.1
|
|||||||
MAKER_POINTS_STOP_LOSS_USD=0
|
MAKER_POINTS_STOP_LOSS_USD=0
|
||||||
MAKER_POINTS_MIN_REPRICE_BPS=3
|
MAKER_POINTS_MIN_REPRICE_BPS=3
|
||||||
MAKER_POINTS_BINANCE_DEPTH_WINDOW_BPS=3
|
MAKER_POINTS_BINANCE_DEPTH_WINDOW_BPS=3
|
||||||
MAKER_POINTS_BINANCE_DEPTH_IMBALANCE_RATIO=8
|
MAKER_POINTS_BINANCE_DEPTH_IMBALANCE_RATIO=9
|
||||||
|
|
||||||
# ===== 挂单档位开关 =====
|
# ===== 挂单档位开关 =====
|
||||||
MAKER_POINTS_BAND_0_10=true
|
MAKER_POINTS_BAND_0_10=true
|
||||||
@@ -176,7 +176,7 @@ MAKER_POINTS_CLOSE_THRESHOLD=0.1
|
|||||||
MAKER_POINTS_STOP_LOSS_USD=0
|
MAKER_POINTS_STOP_LOSS_USD=0
|
||||||
MAKER_POINTS_MIN_REPRICE_BPS=3
|
MAKER_POINTS_MIN_REPRICE_BPS=3
|
||||||
MAKER_POINTS_BINANCE_DEPTH_WINDOW_BPS=3
|
MAKER_POINTS_BINANCE_DEPTH_WINDOW_BPS=3
|
||||||
MAKER_POINTS_BINANCE_DEPTH_IMBALANCE_RATIO=8
|
MAKER_POINTS_BINANCE_DEPTH_IMBALANCE_RATIO=9
|
||||||
MAKER_POINTS_BAND_0_10=true
|
MAKER_POINTS_BAND_0_10=true
|
||||||
MAKER_POINTS_BAND_10_30=true
|
MAKER_POINTS_BAND_10_30=true
|
||||||
MAKER_POINTS_BAND_30_100=true
|
MAKER_POINTS_BAND_30_100=true
|
||||||
@@ -219,7 +219,7 @@ bun run pm2:start:maker-points
|
|||||||
| `MAKER_POINTS_CLOSE_THRESHOLD` | 持仓达到多少开始平仓 | 设为 `0` 表示不自动平仓 |
|
| `MAKER_POINTS_CLOSE_THRESHOLD` | 持仓达到多少开始平仓 | 设为 `0` 表示不自动平仓 |
|
||||||
| `MAKER_POINTS_STOP_LOSS_USD` | 亏损多少美元强制平仓 | 设为 `0` 表示关闭止损 |
|
| `MAKER_POINTS_STOP_LOSS_USD` | 亏损多少美元强制平仓 | 设为 `0` 表示关闭止损 |
|
||||||
| `MAKER_POINTS_BINANCE_DEPTH_WINDOW_BPS` | Binance 失衡检测窗口(bps) | 默认 `3` |
|
| `MAKER_POINTS_BINANCE_DEPTH_WINDOW_BPS` | Binance 失衡检测窗口(bps) | 默认 `3` |
|
||||||
| `MAKER_POINTS_BINANCE_DEPTH_IMBALANCE_RATIO` | Binance 失衡比例阈值 | 默认 `8` |
|
| `MAKER_POINTS_BINANCE_DEPTH_IMBALANCE_RATIO` | Binance 失衡比例阈值 | 默认 `9` |
|
||||||
| `MAKER_POINTS_BAND_*` | 三个挂单档位的开关 | 全部 `true` 即可 |
|
| `MAKER_POINTS_BAND_*` | 三个挂单档位的开关 | 全部 `true` 即可 |
|
||||||
| `STANDX_TOKEN_CREATE_DATE` | Token 创建日期 | 推荐配置,格式 YYYY-MM-DD |
|
| `STANDX_TOKEN_CREATE_DATE` | Token 创建日期 | 推荐配置,格式 YYYY-MM-DD |
|
||||||
| `STANDX_TOKEN_VALIDITY_DAYS` | Token 有效期天数 | 推荐配置,与创建日期配合使用 |
|
| `STANDX_TOKEN_VALIDITY_DAYS` | Token 有效期天数 | 推荐配置,与创建日期配合使用 |
|
||||||
|
|||||||
+2
-2
@@ -229,7 +229,7 @@ export interface MakerPointsConfig {
|
|||||||
enableBinanceDepthCancel: boolean;
|
enableBinanceDepthCancel: boolean;
|
||||||
/** Binance 深度监控窗口(bps),默认 3 */
|
/** Binance 深度监控窗口(bps),默认 3 */
|
||||||
binanceDepthWindowBps?: number;
|
binanceDepthWindowBps?: number;
|
||||||
/** Binance 深度失衡比例阈值,默认 8 */
|
/** Binance 深度失衡比例阈值,默认 9 */
|
||||||
binanceDepthImbalanceRatio?: number;
|
binanceDepthImbalanceRatio?: number;
|
||||||
/** 各档位最小深度阈值 (BTC),盘口到目标价之间的挂单量低于此值则跳过该档位,默认 10 */
|
/** 各档位最小深度阈值 (BTC),盘口到目标价之间的挂单量低于此值则跳过该档位,默认 10 */
|
||||||
filterMinDepth: number;
|
filterMinDepth: number;
|
||||||
@@ -259,7 +259,7 @@ export const makerPointsConfig: MakerPointsConfig = {
|
|||||||
minRepriceBps: parseNumber(process.env.MAKER_POINTS_MIN_REPRICE_BPS, 3),
|
minRepriceBps: parseNumber(process.env.MAKER_POINTS_MIN_REPRICE_BPS, 3),
|
||||||
enableBinanceDepthCancel: parseBoolean(process.env.MAKER_POINTS_BINANCE_DEPTH_CANCEL, true),
|
enableBinanceDepthCancel: parseBoolean(process.env.MAKER_POINTS_BINANCE_DEPTH_CANCEL, true),
|
||||||
binanceDepthWindowBps: parseNumber(process.env.MAKER_POINTS_BINANCE_DEPTH_WINDOW_BPS, 3),
|
binanceDepthWindowBps: parseNumber(process.env.MAKER_POINTS_BINANCE_DEPTH_WINDOW_BPS, 3),
|
||||||
binanceDepthImbalanceRatio: parseNumber(process.env.MAKER_POINTS_BINANCE_DEPTH_IMBALANCE_RATIO, 8),
|
binanceDepthImbalanceRatio: parseNumber(process.env.MAKER_POINTS_BINANCE_DEPTH_IMBALANCE_RATIO, 9),
|
||||||
filterMinDepth: parseNumber(process.env.MAKER_POINTS_FILTER_MIN_DEPTH, 10),
|
filterMinDepth: parseNumber(process.env.MAKER_POINTS_FILTER_MIN_DEPTH, 10),
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|||||||
@@ -208,7 +208,7 @@ export class MakerPointsEngine {
|
|||||||
levels: 20,
|
levels: 20,
|
||||||
ratio: Number.isFinite(this.config.binanceDepthImbalanceRatio)
|
ratio: Number.isFinite(this.config.binanceDepthImbalanceRatio)
|
||||||
? Math.max(1.01, Number(this.config.binanceDepthImbalanceRatio))
|
? Math.max(1.01, Number(this.config.binanceDepthImbalanceRatio))
|
||||||
: 8,
|
: 9,
|
||||||
depthWindowBps: Number.isFinite(this.config.binanceDepthWindowBps)
|
depthWindowBps: Number.isFinite(this.config.binanceDepthWindowBps)
|
||||||
? Math.max(1, Number(this.config.binanceDepthWindowBps))
|
? Math.max(1, Number(this.config.binanceDepthWindowBps))
|
||||||
: 3,
|
: 3,
|
||||||
|
|||||||
@@ -27,7 +27,7 @@ class StubAdapter implements ExchangeAdapter {
|
|||||||
}
|
}
|
||||||
|
|
||||||
describe("MakerPointsEngine Binance depth monitor config", () => {
|
describe("MakerPointsEngine Binance depth monitor config", () => {
|
||||||
it("uses default 3bps window and ratio 8", () => {
|
it("uses default 3bps window and ratio 9", () => {
|
||||||
const engine = new MakerPointsEngine(
|
const engine = new MakerPointsEngine(
|
||||||
{
|
{
|
||||||
symbol: "BTC-USD",
|
symbol: "BTC-USD",
|
||||||
@@ -56,7 +56,7 @@ describe("MakerPointsEngine Binance depth monitor config", () => {
|
|||||||
.options;
|
.options;
|
||||||
|
|
||||||
expect(trackerOptions?.depthWindowBps).toBe(3);
|
expect(trackerOptions?.depthWindowBps).toBe(3);
|
||||||
expect(trackerOptions?.ratio).toBe(8);
|
expect(trackerOptions?.ratio).toBe(9);
|
||||||
|
|
||||||
engine.stop();
|
engine.stop();
|
||||||
});
|
});
|
||||||
|
|||||||
Reference in New Issue
Block a user