mirror of
https://github.com/discountry/ritmex-bot.git
synced 2026-09-09 08:18:07 +00:00
feat(exchanges): add Ondo Perps exchange adapter
This commit is contained in:
@@ -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";
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -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 {
|
||||
|
||||
@@ -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}'`);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user