@okx_ai/okx-trade-cli 1.3.2-beta.4 → 1.3.2-beta.6
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/index.js +10 -10
- package/dist/index.js.map +1 -1
- package/package.json +10 -10
- package/LICENSE +0 -21
package/dist/index.js
CHANGED
|
@@ -12374,7 +12374,7 @@ async function cmdDiagnoseMcp(options = {}) {
|
|
|
12374
12374
|
|
|
12375
12375
|
// src/commands/diagnose.ts
|
|
12376
12376
|
var CLI_VERSION = readCliVersion();
|
|
12377
|
-
var GIT_HASH = true ? "
|
|
12377
|
+
var GIT_HASH = true ? "3331141" : "dev";
|
|
12378
12378
|
function maskKey2(key) {
|
|
12379
12379
|
if (!key) return "(not set)";
|
|
12380
12380
|
if (key.length <= 8) return "****";
|
|
@@ -12709,10 +12709,10 @@ async function runCliChecks(config, profile, outputPath) {
|
|
|
12709
12709
|
}
|
|
12710
12710
|
|
|
12711
12711
|
// src/unknown-command.ts
|
|
12712
|
-
function unknownSubcommand(module, action, knownActions) {
|
|
12712
|
+
function unknownSubcommand(module, action, knownActions, knownPaths = []) {
|
|
12713
12713
|
const actionStr = action ?? "(missing)";
|
|
12714
12714
|
errorLine(`Unknown command: okx ${module} ${actionStr}`);
|
|
12715
|
-
const hint = suggestSubcommand(action, knownActions);
|
|
12715
|
+
const hint = suggestSubcommand(action, knownActions, knownPaths);
|
|
12716
12716
|
if (hint) {
|
|
12717
12717
|
errorLine(` Did you mean: okx ${module} ${hint} ?`);
|
|
12718
12718
|
}
|
|
@@ -12722,12 +12722,12 @@ function unknownSubcommand(module, action, knownActions) {
|
|
|
12722
12722
|
errorLine(` Run 'okx ${module} --help' for full usage.`);
|
|
12723
12723
|
process.exitCode = 1;
|
|
12724
12724
|
}
|
|
12725
|
-
function suggestSubcommand(action, knownActions) {
|
|
12725
|
+
function suggestSubcommand(action, knownActions, knownPaths = []) {
|
|
12726
12726
|
if (!action || !action.includes("-")) return void 0;
|
|
12727
12727
|
const parts = action.split("-");
|
|
12728
12728
|
if (parts.length !== 2) return void 0;
|
|
12729
12729
|
const [a, b] = parts;
|
|
12730
|
-
if (knownActions.includes(b)) {
|
|
12730
|
+
if (knownActions.includes(b) && knownPaths.includes(`${b} ${a}`)) {
|
|
12731
12731
|
return `${b} ${a}`;
|
|
12732
12732
|
}
|
|
12733
12733
|
return void 0;
|
|
@@ -18579,7 +18579,7 @@ async function cmdEventCancel(run, opts) {
|
|
|
18579
18579
|
// src/index.ts
|
|
18580
18580
|
var _require3 = createRequire3(import.meta.url);
|
|
18581
18581
|
var CLI_VERSION2 = _require3("../package.json").version;
|
|
18582
|
-
var GIT_HASH2 = true ? "
|
|
18582
|
+
var GIT_HASH2 = true ? "3331141" : "dev";
|
|
18583
18583
|
function handlePilotCommand(action, json, force, binaryPath) {
|
|
18584
18584
|
if (action === "status") return cmdPilotStatus(json, binaryPath);
|
|
18585
18585
|
if (action === "install") return cmdPilotInstall(json, binaryPath);
|
|
@@ -18909,7 +18909,7 @@ function handleSpotCommand(run, action, rest, v, json) {
|
|
|
18909
18909
|
"algo",
|
|
18910
18910
|
"batch",
|
|
18911
18911
|
"leverage"
|
|
18912
|
-
]);
|
|
18912
|
+
], ["algo place", "algo cancel", "algo amend", "algo trail", "algo orders"]);
|
|
18913
18913
|
}
|
|
18914
18914
|
function handleSwapAlgoCommand(run, subAction, v, json) {
|
|
18915
18915
|
if (subAction === "trail")
|
|
@@ -19054,7 +19054,7 @@ function handleSwapCommand(run, action, rest, v, json) {
|
|
|
19054
19054
|
"leverage",
|
|
19055
19055
|
"algo",
|
|
19056
19056
|
"batch"
|
|
19057
|
-
]);
|
|
19057
|
+
], ["algo place", "algo cancel", "algo amend", "algo trail", "algo orders"]);
|
|
19058
19058
|
}
|
|
19059
19059
|
function handleOptionAlgoCommand(run, subAction, v, json) {
|
|
19060
19060
|
if (subAction === "place")
|
|
@@ -19156,7 +19156,7 @@ function handleOptionCommand(run, action, rest, v, json) {
|
|
|
19156
19156
|
"amend",
|
|
19157
19157
|
"batch-cancel",
|
|
19158
19158
|
"algo"
|
|
19159
|
-
]);
|
|
19159
|
+
], ["algo place", "algo cancel", "algo amend", "algo orders"]);
|
|
19160
19160
|
}
|
|
19161
19161
|
function handleFuturesAlgoCommand(run, subAction, v, json) {
|
|
19162
19162
|
if (subAction === "trail")
|
|
@@ -19301,7 +19301,7 @@ function handleFuturesCommand(run, action, rest, v, json) {
|
|
|
19301
19301
|
"leverage",
|
|
19302
19302
|
"batch",
|
|
19303
19303
|
"algo"
|
|
19304
|
-
]);
|
|
19304
|
+
], ["algo place", "algo cancel", "algo amend", "algo trail", "algo orders"]);
|
|
19305
19305
|
}
|
|
19306
19306
|
function handleBotGridCommand(run, v, rest, json) {
|
|
19307
19307
|
const subAction = rest[0];
|