@onebullex-group/cli 1.1.2 → 1.2.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.
@@ -324,6 +324,14 @@ 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
+ },
327
335
  // ───── Phase 2: write operations ─────
328
336
  {
329
337
  command: "order create",
package/dist/index.js CHANGED
@@ -907,6 +907,21 @@ 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
+
910
925
  // src/commands/config/init.ts
911
926
  import * as readline from "readline/promises";
912
927
  var TEST_BASE_URL = "https://futures-openapi.1bullex.com";
@@ -1475,7 +1490,7 @@ function buildProgram(opts) {
1475
1490
  return new HttpClient(cfg, opts?.fetch);
1476
1491
  }
1477
1492
  };
1478
- const program = new Command("onebullex").version(true ? "1.1.2" : "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();
1493
+ const program = new Command("onebullex").version(true ? "1.2.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
1494
  program.hook("preAction", (thisCommand, _actionCommand) => {
1480
1495
  const flags = thisCommand.opts();
1481
1496
  if (flags.output === "table" || flags.output === "json") {
@@ -1564,6 +1579,7 @@ function buildProgram(opts) {
1564
1579
  registerOrderEntrustCancelAll(orderEntrust, ctx);
1565
1580
  const position = program.command("position").description("Positions");
1566
1581
  registerPositionList(position, ctx);
1582
+ registerPositionConfs(position, ctx);
1567
1583
  registerPositionAdjustLeverage(position, ctx);
1568
1584
  registerPositionMargin(position, ctx);
1569
1585
  registerPositionAutoMargin(position, ctx);
package/dist/lint-api.js CHANGED
@@ -1,7 +1,7 @@
1
1
  #!/usr/bin/env node
2
2
  import {
3
3
  REGISTRY
4
- } from "./chunk-FTINNKNR.js";
4
+ } from "./chunk-YX4634ML.js";
5
5
 
6
6
  // scripts/check-cli-coverage.ts
7
7
  import { readFileSync } from "fs";
package/dist/registry.js CHANGED
@@ -1,7 +1,7 @@
1
1
  #!/usr/bin/env node
2
2
  import {
3
3
  REGISTRY
4
- } from "./chunk-FTINNKNR.js";
4
+ } from "./chunk-YX4634ML.js";
5
5
  export {
6
6
  REGISTRY
7
7
  };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@onebullex-group/cli",
3
- "version": "1.1.2",
3
+ "version": "1.2.0",
4
4
  "description": "OneBullEx Open API V2 command-line interface",
5
5
  "license": "MIT",
6
6
  "type": "module",
@@ -26,6 +26,16 @@
26
26
  "engines": {
27
27
  "node": ">=18"
28
28
  },
29
+ "scripts": {
30
+ "build": "tsup",
31
+ "dev": "tsx src/index.ts",
32
+ "test": "vitest run",
33
+ "test:e2e": "vitest run tests/e2e",
34
+ "lint": "biome lint src tests",
35
+ "format": "biome format --write src tests",
36
+ "check-coverage": "tsx scripts/check-cli-coverage.ts",
37
+ "typecheck": "tsc --noEmit"
38
+ },
29
39
  "dependencies": {
30
40
  "cli-table3": "^0.6.5",
31
41
  "commander": "^12.1.0",
@@ -40,15 +50,5 @@
40
50
  "typescript": "^5.5.0",
41
51
  "undici": "^8.3.0",
42
52
  "vitest": "^2.1.0"
43
- },
44
- "scripts": {
45
- "build": "tsup",
46
- "dev": "tsx src/index.ts",
47
- "test": "vitest run",
48
- "test:e2e": "vitest run tests/e2e",
49
- "lint": "biome lint src tests",
50
- "format": "biome format --write src tests",
51
- "check-coverage": "tsx scripts/check-cli-coverage.ts",
52
- "typecheck": "tsc --noEmit"
53
53
  }
54
- }
54
+ }