feat(exchanges): add Ondo Perps exchange adapter

This commit is contained in:
discountry
2026-07-11 15:10:40 +08:00
parent 6b5f2542a4
commit 1f2c2150e0
20 changed files with 2181 additions and 4 deletions
+2
View File
@@ -88,6 +88,8 @@ function assignExchange(options: CliOptions, raw: string): void {
options.exchange = normalized as CliOptions["exchange"];
} else if (normalized === "gravity" || normalized === "grav" || normalized === "grv") {
options.exchange = "grvt";
} else if (normalized === "ondo" || normalized === "ondoperp") {
options.exchange = "ondoperps";
}
}
+9
View File
@@ -117,6 +117,15 @@ const STATIC_CAPABILITIES: Record<
changeMarginMode: true,
forceCancelAllOrders: true,
},
ondoperps: {
trailingStops: false,
fundingRate: true,
precision: true,
queryOpenOrders: true,
queryAccountSnapshot: true,
changeMarginMode: false,
forceCancelAllOrders: true,
},
};
export interface CommandExecutorDependencies {
+1
View File
@@ -470,6 +470,7 @@ function normalizeExchange(value: string | undefined): SupportedExchangeId | und
const normalized = value.trim().toLowerCase();
if (normalized === "gravity" || normalized === "grav" || normalized === "grv") return "grvt";
if (normalized === "bnb") return "binance";
if (normalized === "ondo" || normalized === "ondoperp") return "ondoperps";
if (isSupportedExchangeId(normalized)) return normalized;
throw new CommandParseError(`Unsupported exchange '${value}'`);
}