feat: 添加基础网格策略支持,更新环境配置示例和文档,增强 CLI 和 UI 界面

This commit is contained in:
discountry
2025-10-07 01:40:06 +08:00
parent d7a95ceb36
commit 5e65c7025d
11 changed files with 1222 additions and 12 deletions
+8 -1
View File
@@ -3,13 +3,14 @@ import { Box, Text, useInput } from "ink";
import { TrendApp } from "./TrendApp";
import { MakerApp } from "./MakerApp";
import { OffsetMakerApp } from "./OffsetMakerApp";
import { GridApp } from "./GridApp";
import { BasisApp } from "./BasisApp";
import { isBasisStrategyEnabled } from "../config";
import { loadCopyrightFragments, verifyCopyrightIntegrity } from "../utils/copyright";
import { resolveExchangeId } from "../exchanges/create-adapter";
interface StrategyOption {
id: "trend" | "maker" | "offset-maker" | "basis";
id: "trend" | "maker" | "offset-maker" | "basis" | "grid";
label: string;
description: string;
component: React.ComponentType<{ onExit: () => void }>;
@@ -28,6 +29,12 @@ const BASE_STRATEGIES: StrategyOption[] = [
description: "双边挂单提供流动性,自动追价与风控止损",
component: MakerApp,
},
{
id: "grid",
label: "基础网格策略",
description: "在上下边界之间布设等比网格,自动加仓与减仓",
component: GridApp,
},
{
id: "offset-maker",
label: "偏移做市策略",