refactor: extract shared adapter utilities (safeInvoke + initManager)

Created src/exchanges/adapter-utils.ts with createSafeInvoke() and
createInitManager() factories. Converted 7/8 adapters to use shared
utilities, eliminating ~350 lines of duplicated retry/init/error-handling
boilerplate. Lighter adapter kept as-is (no retry logic by design).
Also translated Chinese comments in adapter.ts and order-schema.ts.
This commit is contained in:
discountry
2026-04-06 18:36:56 +08:00
parent d799cf79c2
commit 20855c2d1d
10 changed files with 217 additions and 580 deletions
+2 -3
View File
@@ -13,9 +13,8 @@ export interface BaseOrderIntent {
export interface LimitOrderIntent extends BaseOrderIntent {
price: number;
// StandX TPSL 参数
slPrice?: number; // 止损价格
tpPrice?: number; // 止盈价格
slPrice?: number;
tpPrice?: number;
}
export interface MarketOrderIntent extends BaseOrderIntent {