@onebullex-group/cli 1.1.2 → 1.3.0
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/{chunk-FTINNKNR.js → chunk-PEVZEMJG.js} +16 -0
- package/dist/index.js +36 -1
- package/dist/lint-api.js +1 -1
- package/dist/registry.js +1 -1
- package/package.json +1 -1
|
@@ -324,6 +324,22 @@ var REGISTRY = [
|
|
|
324
324
|
needsAuth: true,
|
|
325
325
|
implFile: "src/commands/position/list.ts"
|
|
326
326
|
},
|
|
327
|
+
{
|
|
328
|
+
command: "position confs",
|
|
329
|
+
method: "GET",
|
|
330
|
+
path: "/v2/position/confs",
|
|
331
|
+
isWrite: false,
|
|
332
|
+
needsAuth: true,
|
|
333
|
+
implFile: "src/commands/position/confs.ts"
|
|
334
|
+
},
|
|
335
|
+
{
|
|
336
|
+
command: "position history",
|
|
337
|
+
method: "GET",
|
|
338
|
+
path: "/v2/position/history/detail",
|
|
339
|
+
isWrite: false,
|
|
340
|
+
needsAuth: true,
|
|
341
|
+
implFile: "src/commands/position/history.ts"
|
|
342
|
+
},
|
|
327
343
|
// ───── Phase 2: write operations ─────
|
|
328
344
|
{
|
|
329
345
|
command: "order create",
|
package/dist/index.js
CHANGED
|
@@ -907,6 +907,39 @@ function registerPositionList(parent, ctx) {
|
|
|
907
907
|
});
|
|
908
908
|
}
|
|
909
909
|
|
|
910
|
+
// src/commands/position/confs.ts
|
|
911
|
+
function registerPositionConfs(parent, ctx) {
|
|
912
|
+
parent.command("confs").description("Get position configuration (GET /v2/position/confs)").requiredOption("--symbol <symbol>", "trading pair").action(async (opts) => {
|
|
913
|
+
const c = ctx.http({ requireAuth: true });
|
|
914
|
+
const data = await c.getPrivate("/v2/position/confs", { symbol: opts.symbol });
|
|
915
|
+
const { render: render2, effectiveFormat: effectiveFormat2 } = await import("./output-UIZGG7EU.js");
|
|
916
|
+
ctx.stdout(
|
|
917
|
+
render2(data, {
|
|
918
|
+
format: effectiveFormat2(ctx.outputFormat, ctx.isTTY),
|
|
919
|
+
isTTY: ctx.isTTY
|
|
920
|
+
})
|
|
921
|
+
);
|
|
922
|
+
});
|
|
923
|
+
}
|
|
924
|
+
|
|
925
|
+
// src/commands/position/history.ts
|
|
926
|
+
function registerPositionHistory(parent, ctx) {
|
|
927
|
+
parent.command("history").description("Get historical position detail (GET /v2/position/history/detail)").requiredOption("--symbol <symbol>", "trading pair").requiredOption("--position-id <id>", "position id").action(async (opts) => {
|
|
928
|
+
const c = ctx.http({ requireAuth: true });
|
|
929
|
+
const data = await c.getPrivate("/v2/position/history/detail", {
|
|
930
|
+
symbol: opts.symbol,
|
|
931
|
+
positionId: opts.positionId
|
|
932
|
+
});
|
|
933
|
+
const { render: render2, effectiveFormat: effectiveFormat2 } = await import("./output-UIZGG7EU.js");
|
|
934
|
+
ctx.stdout(
|
|
935
|
+
render2(data, {
|
|
936
|
+
format: effectiveFormat2(ctx.outputFormat, ctx.isTTY),
|
|
937
|
+
isTTY: ctx.isTTY
|
|
938
|
+
})
|
|
939
|
+
);
|
|
940
|
+
});
|
|
941
|
+
}
|
|
942
|
+
|
|
910
943
|
// src/commands/config/init.ts
|
|
911
944
|
import * as readline from "readline/promises";
|
|
912
945
|
var TEST_BASE_URL = "https://futures-openapi.1bullex.com";
|
|
@@ -1475,7 +1508,7 @@ function buildProgram(opts) {
|
|
|
1475
1508
|
return new HttpClient(cfg, opts?.fetch);
|
|
1476
1509
|
}
|
|
1477
1510
|
};
|
|
1478
|
-
const program = new Command("onebullex").version(true ? "1.
|
|
1511
|
+
const program = new Command("onebullex").version(true ? "1.3.0" : "0.0.0-dev").description("OneBullEx exchange CLI").option("-p, --profile <name>", "config profile to use").option("-o, --output <format>", "output format: table | json").option("--debug", "enable debug logging").option("--timeout <ms>", "request timeout in milliseconds", parseInt).option("--confirm", "confirm write operations (required for non-dry-run writes)").option("--base-url <url>", "override base URL").option("--api-key <key>", "override api key (env: ONEBULLEX_API_KEY)").option("--secret <s>", "override secret (env: ONEBULLEX_SECRET; CLI flag discouraged for security)").exitOverride();
|
|
1479
1512
|
program.hook("preAction", (thisCommand, _actionCommand) => {
|
|
1480
1513
|
const flags = thisCommand.opts();
|
|
1481
1514
|
if (flags.output === "table" || flags.output === "json") {
|
|
@@ -1564,6 +1597,8 @@ function buildProgram(opts) {
|
|
|
1564
1597
|
registerOrderEntrustCancelAll(orderEntrust, ctx);
|
|
1565
1598
|
const position = program.command("position").description("Positions");
|
|
1566
1599
|
registerPositionList(position, ctx);
|
|
1600
|
+
registerPositionConfs(position, ctx);
|
|
1601
|
+
registerPositionHistory(position, ctx);
|
|
1567
1602
|
registerPositionAdjustLeverage(position, ctx);
|
|
1568
1603
|
registerPositionMargin(position, ctx);
|
|
1569
1604
|
registerPositionAutoMargin(position, ctx);
|
package/dist/lint-api.js
CHANGED
package/dist/registry.js
CHANGED