feat: 重构订单路由逻辑,添加订单意图类型以支持多交易所订单处理

This commit is contained in:
discountry
2025-10-23 14:04:44 +08:00
parent fabc8af679
commit ea5da20311
10 changed files with 745 additions and 62 deletions
+3
View File
@@ -602,6 +602,9 @@ export class ParadexGateway {
// Only omit amount for MARKET close-position orders; STOP requires explicit size
const shouldOmitAmount = isClosePosition && type === "market";
const amountArg: any = shouldOmitAmount ? undefined : amount;
if (!shouldOmitAmount && amountArg != null && extraParams.size === undefined) {
extraParams.size = amountArg.toString();
}
const order = (await this.exchange.createOrder(
symbol,
type,