新增 OffsetMakerEngine 和 OffsetMakerApp,支持根据盘口深度自动偏移挂单并在极端不平衡时撤退;更新 MakerEngine,优化撤单逻辑以清理已成交的挂单。

This commit is contained in:
discountry
2025-09-24 02:41:01 +08:00
parent c79662bb7c
commit fa3c912d63
4 changed files with 757 additions and 1 deletions
+8 -1
View File
@@ -2,9 +2,10 @@ import React, { useState } from "react";
import { Box, Text, useInput } from "ink";
import { TrendApp } from "./TrendApp";
import { MakerApp } from "./MakerApp";
import { OffsetMakerApp } from "./OffsetMakerApp";
interface StrategyOption {
id: "trend" | "maker";
id: "trend" | "maker" | "offset-maker";
label: string;
description: string;
component: React.ComponentType<{ onExit: () => void }>;
@@ -23,6 +24,12 @@ const STRATEGIES: StrategyOption[] = [
description: "双边挂单提供流动性,自动追价与风控止损",
component: MakerApp,
},
{
id: "offset-maker",
label: "偏移做市策略",
description: "根据盘口深度自动偏移挂单并在极端不平衡时撤退",
component: OffsetMakerApp,
},
];
const inputSupported = Boolean(process.stdin && (process.stdin as any).isTTY);