feat: 更新基础套利引擎,添加资金收益和手续费计算逻辑,优化信号评估功能并更新UI以显示相关信息

This commit is contained in:
discountry
2025-10-07 16:23:53 +08:00
parent d778e20c23
commit 24f93fa8a7
3 changed files with 88 additions and 5 deletions
+2
View File
@@ -113,6 +113,7 @@ export interface BasisArbConfig {
refreshIntervalMs: number;
maxLogEntries: number;
takerFeeRate: number;
arbAmount: number; // base asset amount to arb (e.g., ASTER amount when ASTERUSDT)
}
export type GridDirection = "both" | "long" | "short";
@@ -158,6 +159,7 @@ export const basisConfig: BasisArbConfig = {
refreshIntervalMs: parseNumber(process.env.BASIS_REFRESH_INTERVAL_MS, 1000),
maxLogEntries: parseNumber(process.env.BASIS_MAX_LOG_ENTRIES, 200),
takerFeeRate: parseNumber(process.env.BASIS_TAKER_FEE_RATE, 0.0004),
arbAmount: parseNumber(process.env.ARB_AMOUNT, parseNumber(process.env.TRADE_AMOUNT, 0)),
};
const resolveGridDirection = (raw: string | undefined, fallback: GridDirection): GridDirection => {