{"_id":"@bydoxe/bydoxe-cli","_rev":"4-a41de161741aa2ebaa150bd180d5596d","name":"@bydoxe/bydoxe-cli","dist-tags":{"latest":"0.1.3"},"versions":{"0.1.0":{"name":"@bydoxe/bydoxe-cli","version":"0.1.0","license":"UNLICENSED","_id":"@bydoxe/bydoxe-cli@0.1.0","maintainers":[{"name":"bydoxe-developer","email":"dev@bydoxe.com"}],"bin":{"bydoxe":"dist/cli.js"},"dist":{"shasum":"8f2b09b6109f8a9fc9c4b914f82053bc61c12265","tarball":"https://registry.npmjs.org/@bydoxe/bydoxe-cli/-/bydoxe-cli-0.1.0.tgz","fileCount":50,"integrity":"sha512-qDbS1gau56hnlOKhBYdic/DWuUaakOlXuiiJCwG6T8O42oqF7SQmZHTMbNJ+Q7eaQt9G0j+ehSbRnUy6g2lVqg==","signatures":[{"sig":"MEYCIQDYil6be6QGxNyezNmz669FlwzrJzSlUo8ZdonXRQwRMwIhALmIfqiUVJsABuvCeIBLY52sQcJ8n2eN6YefQEOI7L9g","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"unpackedSize":294091},"type":"module","engines":{"node":">=20"},"gitHead":"819b8a5eb5d25bc839ff451273c33862f4753cf2","scripts":{"test":"npm run build && node --test test/*.test.mjs","build":"tsc -p tsconfig.json","prepack":"npm run build","validate":"npm run typecheck && npm test && npm run catalog:check && npm run reference:check && npm run summary:check && npm run smoke:readme && npm run smoke:public-rest-live && npm run smoke:websocket-live && npm run smoke:websocket-private-live && node scripts/validate-project.mjs","typecheck":"tsc -p tsconfig.json --noEmit","smoke:readme":"npm run build && node scripts/smoke-readme-examples.mjs","catalog:check":"npm run build && node scripts/generate-command-catalog.mjs --check","summary:check":"node scripts/generate-command-summary.mjs --check","reference:check":"node scripts/generate-command-reference.mjs --check","catalog:generate":"npm run build && node scripts/generate-command-catalog.mjs","summary:generate":"npm run catalog:generate && node scripts/generate-command-summary.mjs","reference:generate":"npm run catalog:generate && node scripts/generate-command-reference.mjs","smoke:websocket-live":"npm run build && node scripts/smoke-websocket-public-live.mjs","smoke:public-rest-live":"npm run build && node scripts/smoke-public-rest-live.mjs","smoke:websocket-private-live":"npm run build && node scripts/smoke-websocket-private-live.mjs"},"_npmUser":{"name":"bydoxe-developer","email":"dev@bydoxe.com"},"_npmVersion":"11.13.0","description":"Command-line tool for interacting with the BYDOXE Open API.","directories":{},"_nodeVersion":"24.16.0","_hasShrinkwrap":false,"devDependencies":{"typescript":"^5.7.3","@types/node":"^22.10.7"},"_npmOperationalInternal":{"tmp":"tmp/bydoxe-cli_0.1.0_1784007260216_0.049243354471753875","host":"s3://npm-registry-packages-npm-production"}},"0.1.1":{"name":"@bydoxe/bydoxe-cli","version":"0.1.1","keywords":["bydoxe","crypto","exchange","open-api","cli","trading","websocket","agent"],"author":{"name":"BYDOXE"},"license":"UNLICENSED","_id":"@bydoxe/bydoxe-cli@0.1.1","maintainers":[{"name":"bydoxe-developer","email":"dev@bydoxe.com"}],"homepage":"https://github.com/bydoxe/bydoxe-cli#readme","bugs":{"url":"https://github.com/bydoxe/bydoxe-cli/issues"},"bin":{"bydoxe":"dist/cli.js"},"dist":{"shasum":"826a46f0ab5aae47049cadd9473fde109270a5b3","tarball":"https://registry.npmjs.org/@bydoxe/bydoxe-cli/-/bydoxe-cli-0.1.1.tgz","fileCount":50,"integrity":"sha512-IZdggMHglzV5/HVPeZcK29fhiHSMP4w622votBvh3dTZV/lndagdDu1lI/SfpPA9nMHFeNP+aFIDHPwB+P3lmA==","signatures":[{"sig":"MEQCIAL1ki5OlLR3iOMR8XOG82K692/Z77VnJZjM5hxGGSEvAiBGzptI4i95yFJ7R8YN85Czfv2jWaq7s1Wgjs5Zq3nUZw==","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"unpackedSize":294567},"type":"module","engines":{"node":">=20"},"gitHead":"dc394ecb4dbebf4746746fa3c9d45d6326213755","scripts":{"test":"npm run build && node --test test/*.test.mjs","build":"tsc -p tsconfig.json","prepack":"npm run build","validate":"npm run typecheck && npm test && npm run catalog:check && npm run reference:check && npm run summary:check && npm run smoke:readme && npm run smoke:public-rest-live && npm run smoke:websocket-live && npm run smoke:websocket-private-live && node scripts/validate-project.mjs","typecheck":"tsc -p tsconfig.json --noEmit","smoke:readme":"npm run build && node scripts/smoke-readme-examples.mjs","catalog:check":"npm run build && node scripts/generate-command-catalog.mjs --check","summary:check":"node scripts/generate-command-summary.mjs --check","reference:check":"node scripts/generate-command-reference.mjs --check","catalog:generate":"npm run build && node scripts/generate-command-catalog.mjs","summary:generate":"npm run catalog:generate && node scripts/generate-command-summary.mjs","reference:generate":"npm run catalog:generate && node scripts/generate-command-reference.mjs","smoke:websocket-live":"npm run build && node scripts/smoke-websocket-public-live.mjs","smoke:public-rest-live":"npm run build && node scripts/smoke-public-rest-live.mjs","smoke:websocket-private-live":"npm run build && node scripts/smoke-websocket-private-live.mjs"},"_npmUser":{"name":"bydoxe-developer","email":"dev@bydoxe.com"},"repository":{"url":"git+https://github.com/bydoxe/bydoxe-cli.git","type":"git"},"_npmVersion":"11.13.0","description":"Safe preview-first command-line companion for the BYDOXE Open API.","directories":{},"_nodeVersion":"24.16.0","publishConfig":{"access":"public"},"_hasShrinkwrap":false,"devDependencies":{"typescript":"^5.7.3","@types/node":"^22.10.7"},"_npmOperationalInternal":{"tmp":"tmp/bydoxe-cli_0.1.1_1784008036829_0.024227847574464167","host":"s3://npm-registry-packages-npm-production"}},"0.1.2":{"name":"@bydoxe/bydoxe-cli","version":"0.1.2","keywords":["bydoxe","crypto","exchange","open-api","cli","trading","websocket","agent"],"author":{"name":"BYDOXE"},"license":"UNLICENSED","_id":"@bydoxe/bydoxe-cli@0.1.2","maintainers":[{"name":"bydoxe-developer","email":"dev@bydoxe.com"}],"homepage":"https://github.com/bydoxe/bydoxe-cli#readme","bugs":{"url":"https://github.com/bydoxe/bydoxe-cli/issues"},"bin":{"bydoxe":"dist/cli.js"},"dist":{"shasum":"e9845c4e4670f8ad3d31fdf88623e51f83f8c369","tarball":"https://registry.npmjs.org/@bydoxe/bydoxe-cli/-/bydoxe-cli-0.1.2.tgz","fileCount":53,"integrity":"sha512-0cPwPzIu6gFeFUdECXuY2oTXQCYXh6TLWTV5el2N6DNwtQRdN7ZS+O8kZr87p0yXwKooYtPgbnPz6cAmjONBkQ==","signatures":[{"sig":"MEUCICFV13V+lmpOtXACk7ItJieH2m57EY9yqnC3kWGO0cscAiEAh5zZ0v5h5fyItbjYHPn5kN7mrwv4FUCI8sv1FF2SNNk=","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"unpackedSize":311892},"type":"module","engines":{"node":">=20"},"gitHead":"69f828c503aa3e44a72dcf44155de38fe569a841","scripts":{"test":"npm run build && node --test test/*.test.mjs","build":"tsc -p tsconfig.json","prepack":"npm run build","validate":"npm run typecheck && npm test && npm run catalog:check && npm run reference:check && npm run summary:check && npm run smoke:readme && npm run smoke:public-rest-live && npm run smoke:websocket-live && npm run smoke:websocket-private-live && node scripts/validate-project.mjs","typecheck":"tsc -p tsconfig.json --noEmit","smoke:readme":"npm run build && node scripts/smoke-readme-examples.mjs","catalog:check":"npm run build && node scripts/generate-command-catalog.mjs --check","summary:check":"node scripts/generate-command-summary.mjs --check","reference:check":"node scripts/generate-command-reference.mjs --check","catalog:generate":"npm run build && node scripts/generate-command-catalog.mjs","summary:generate":"npm run catalog:generate && node scripts/generate-command-summary.mjs","reference:generate":"npm run catalog:generate && node scripts/generate-command-reference.mjs","smoke:websocket-live":"npm run build && node scripts/smoke-websocket-public-live.mjs","smoke:public-rest-live":"npm run build && node scripts/smoke-public-rest-live.mjs","smoke:websocket-private-live":"npm run build && node scripts/smoke-websocket-private-live.mjs"},"_npmUser":{"name":"bydoxe-developer","email":"dev@bydoxe.com"},"repository":{"url":"git+https://github.com/bydoxe/bydoxe-cli.git","type":"git"},"_npmVersion":"11.13.0","description":"Safe preview-first command-line companion for the BYDOXE Open API.","directories":{},"_nodeVersion":"24.16.0","publishConfig":{"access":"public"},"_hasShrinkwrap":false,"devDependencies":{"typescript":"^5.7.3","@types/node":"^22.10.7"},"_npmOperationalInternal":{"tmp":"tmp/bydoxe-cli_0.1.2_1784019813473_0.7798505448478741","host":"s3://npm-registry-packages-npm-production"}},"0.1.3":{"name":"@bydoxe/bydoxe-cli","version":"0.1.3","description":"Safe preview-first command-line companion for the BYDOXE Open API.","license":"UNLICENSED","type":"module","author":{"name":"BYDOXE"},"homepage":"https://github.com/bydoxe/bydoxe-cli#readme","repository":{"type":"git","url":"git+https://github.com/bydoxe/bydoxe-cli.git"},"bugs":{"url":"https://github.com/bydoxe/bydoxe-cli/issues"},"keywords":["bydoxe","crypto","exchange","open-api","cli","trading","websocket","agent"],"publishConfig":{"access":"public"},"bin":{"bydoxe":"dist/cli.js"},"scripts":{"build":"tsc -p tsconfig.json","catalog:generate":"npm run build && node scripts/generate-command-catalog.mjs","catalog:check":"npm run build && node scripts/generate-command-catalog.mjs --check","reference:generate":"npm run catalog:generate && node scripts/generate-command-reference.mjs","reference:check":"node scripts/generate-command-reference.mjs --check","summary:generate":"npm run catalog:generate && node scripts/generate-command-summary.mjs","summary:check":"node scripts/generate-command-summary.mjs --check","prepack":"npm run build","typecheck":"tsc -p tsconfig.json --noEmit","test":"npm run build && node --test test/*.test.mjs","smoke:readme":"npm run build && node scripts/smoke-readme-examples.mjs","smoke:public-rest-live":"npm run build && node scripts/smoke-public-rest-live.mjs","smoke:websocket-live":"npm run build && node scripts/smoke-websocket-public-live.mjs","smoke:websocket-private-live":"npm run build && node scripts/smoke-websocket-private-live.mjs","validate":"npm run typecheck && npm test && npm run catalog:check && npm run reference:check && npm run summary:check && npm run smoke:readme && npm run smoke:public-rest-live && npm run smoke:websocket-live && npm run smoke:websocket-private-live && node scripts/validate-project.mjs"},"engines":{"node":">=20"},"devDependencies":{"@types/node":"^22.10.7","typescript":"^5.7.3"},"gitHead":"bf26b8b1d5b5dfa0534d39ef0420dd26bb523437","_id":"@bydoxe/bydoxe-cli@0.1.3","_nodeVersion":"24.16.0","_npmVersion":"11.13.0","dist":{"integrity":"sha512-aRIAcxe2WFKPbMwJCEjesNi7oVMroR1MrADICF3kFRDwscaafuEX1TPw5pnLahwMgjJwMnka6XZyBp1qLTzLYg==","shasum":"ab6e057028df455fba3d1d83b3dcf3d954afa927","tarball":"https://registry.npmjs.org/@bydoxe/bydoxe-cli/-/bydoxe-cli-0.1.3.tgz","fileCount":53,"unpackedSize":334660,"signatures":[{"keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U","sig":"MEUCIQCB2lt25taOxCKcTgLM+/gpAkuAmd8XzHyPNIrjLt5qDgIgaCgyR8ptTud4H6KFB8vjmruzeOgKyTCv3V+EW/EvEP4="}]},"_npmUser":{"name":"bydoxe-developer","email":"dev@bydoxe.com"},"directories":{},"maintainers":[{"name":"bydoxe-developer","email":"dev@bydoxe.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages-npm-production","tmp":"tmp/bydoxe-cli_0.1.3_1784705178283_0.1765986888624258"},"_hasShrinkwrap":false}},"time":{"created":"2026-07-14T05:34:20.051Z","modified":"2026-07-22T07:26:18.737Z","0.1.0":"2026-07-14T05:34:20.349Z","0.1.1":"2026-07-14T05:47:16.975Z","0.1.2":"2026-07-14T09:03:33.634Z","0.1.3":"2026-07-22T07:26:18.537Z"},"bugs":{"url":"https://github.com/bydoxe/bydoxe-cli/issues"},"author":{"name":"BYDOXE"},"license":"UNLICENSED","homepage":"https://github.com/bydoxe/bydoxe-cli#readme","keywords":["bydoxe","crypto","exchange","open-api","cli","trading","websocket","agent"],"repository":{"type":"git","url":"git+https://github.com/bydoxe/bydoxe-cli.git"},"description":"Safe preview-first command-line companion for the BYDOXE Open API.","maintainers":[{"name":"bydoxe-developer","email":"dev@bydoxe.com"}],"readme":"# BYDOXE CLI\n\nBYDOXE CLI is a safe command-line companion for the BYDOXE Open API.\n\nUse it to inspect market data, review account information, prepare spot and futures trading actions, manage copy trading workflows, and preview WebSocket messages without pasting API secrets into chat sessions or scripts.\n\nThe CLI is built around a preview-first workflow:\n\n- Read public market data with simple commands.\n- Keep private API credentials in a local CLI profile or environment variables.\n- Review every sensitive request with `--dry-run`.\n- Require exact `--confirm CONFIRM` before write actions can execute.\n- Use structured JSON output when another tool or agent needs to read the result.\n\n## What You Can Do\n\n- Check BYDOXE server time, spot markets, futures markets, order books, candles, fills, funding, open interest, and trader ratios.\n- Read authenticated account, balance, order, position, trigger order, and copy trading data from a locally configured account.\n- Prepare spot orders, transfers, withdrawals, futures orders, leverage changes, TP/SL, trigger orders, and copy trading changes with validation and dry-run previews.\n- Build public and private WebSocket message previews.\n- Run bounded public WebSocket live sessions.\n- Run private read-only WebSocket live sessions only behind explicit local opt-in gates.\n\n## Quick Start\n\nInstall from npm after the `0.1.3` patch package is published:\n\n```text\nnpm install -g @bydoxe/bydoxe-cli\nbydoxe --help\n```\n\nBefore publication, or when working from a source checkout, run:\n\n```sh\nnpm install\nnpm run build\nnode dist/cli.js --help\n```\n\n## Configure Credentials\n\nPublic market commands do not need credentials.\n\nPrivate account, order, position, copy trading, and write commands require each installer or operator to configure their own BYDOXE credentials locally:\n\n```sh\nbydoxe config set\nbydoxe config status\n```\n\n`bydoxe config set` stores credentials in the local profile at `~/.bydoxe/config` with `0600` file permissions. `bydoxe config status` reports only masked setup status and never prints secret values.\n\nFor non-interactive setup, pass all credential values as flags from a trusted local shell or secret manager:\n\n```sh\nbydoxe config set --access-key \"<your-access-key>\" --secret-key \"<your-secret-key>\" --passphrase \"<your-passphrase>\"\n```\n\nEnvironment variables are also supported and take priority over the local profile:\n\n```sh\nexport BYDOXE_ACCESS_KEY=\"<your-access-key>\"\nexport BYDOXE_SECRET_KEY=\"<your-secret-key>\"\nexport BYDOXE_PASSPHRASE=\"<your-passphrase>\"\n```\n\nDo not paste API secrets into AI chat sessions, issue trackers, release notes, or documentation examples.\n\nOptional endpoint overrides are available when an approved environment requires them:\n\n```sh\nexport BYDOXE_REST_BASE_URL=\"https://open-api.bydoxe.com/api/v1\"\nexport BYDOXE_PUBLIC_WS_URL=\"wss://open-api.bydoxe.com/v1/ws/public\"\nexport BYDOXE_PRIVATE_WS_URL=\"wss://open-api.bydoxe.com/v1/ws/private\"\n```\n\n## Safe First Commands\n\nStart with dry-run previews. A dry-run prints the request or WebSocket message that would be sent, without sending it.\n\n```sh\nbydoxe public time --dry-run\nbydoxe spot market tickers --symbol BTCUSDT --dry-run --format json\nbydoxe future market candles --symbol BTCUSDT --interval 1m --limit 100 --dry-run --format json\nbydoxe account funding-assets --coin USDT --dry-run --format json\nbydoxe future position all --dry-run --format json\nbydoxe websocket public subscribe --instType SPOT --channel ticker --instId BTCUSDT --dry-run --format json\n```\n\nWrite actions should also start as dry-runs:\n\n```sh\nbydoxe spot trade place-order --body '{\"base\":\"BTC\",\"quote\":\"USDT\",\"orderType\":\"MARKET\",\"tradeType\":\"BUY\",\"amount\":\"0.001\"}' --dry-run --format json\nbydoxe future account set-leverage --symbol BTCUSDT --longLeverage 5 --shortLeverage 5 --dry-run --format json\nbydoxe copytrading follower cancel-follow --body '{\"productType\":\"USDT-FUTURES\",\"traderUid\":\"trader-1\"}' --dry-run --format json\n```\n\nOnly execute a write command after reviewing the dry-run output and adding the exact confirmation token:\n\n```text\nbydoxe spot trade place-order --body '{\"base\":\"BTC\",\"quote\":\"USDT\",\"orderType\":\"MARKET\",\"tradeType\":\"BUY\",\"amount\":\"0.001\"}' --confirm CONFIRM --format json\n```\n\n## Safety Model\n\n- Private credentials are read from environment variables first, then from the local `~/.bydoxe/config` profile.\n- `bydoxe config status` exposes only masked setup state so agents can check whether credentials are configured without reading secret values.\n- Credential-bearing headers and WebSocket login fields are redacted in previews and live result summaries.\n- Required parameters are validated before request construction.\n- Write commands validate common identifiers, positive numeric fields, enum-like fields, order identifier alternatives, and supported nested batch body fields.\n- Write commands require exact `--confirm CONFIRM` before live execution.\n- WebSocket live sessions are bounded by message count or timeout.\n- Private WebSocket spot trade remains outside read-only live workflows.\n\nSee [docs/write-body-validation-plan.md](docs/write-body-validation-plan.md) for nested write body validation scope and [docs/private-websocket-readonly-live-plan.md](docs/private-websocket-readonly-live-plan.md) for private WebSocket read-only live boundaries.\n\n## Output\n\nUse `--format json` when another program or AI agent needs structured output:\n\n```sh\nbydoxe spot market orderbook --symbol BTCUSDT --limit 20 --dry-run --format json\nbydoxe future order detail --symbol BTCUSDT --orderId 123456789 --dry-run --format json\n```\n\nUse the default human output for quick terminal inspection.\n\n## Command Reference\n\nUse [docs/command-reference.md](docs/command-reference.md) for the full generated CLI command surface. It includes REST endpoints, WebSocket scopes, auth requirements, risk levels, required parameters, optional parameters, and write validation rules.\n\nUse [docs/command-summary.md](docs/command-summary.md) for a generated command coverage and safety summary.\n\n## WebSocket Live Sessions\n\nPublic WebSocket live sessions are available with bounded runtime options:\n\n```text\nbydoxe websocket public ping --live --timeout-ms 5000 --format json\nbydoxe websocket public subscribe --instType SPOT --channel ticker --instId BTCUSDT --live --max-messages 5 --timeout-ms 15000 --format json\n```\n\nPrivate read-only WebSocket live execution is limited to private subscribe and unsubscribe commands and requires all of these gates:\n\n- Local credentials configured through `bydoxe config set` or environment variables.\n- Explicit `BYDOXE_ENABLE_PRIVATE_WS_READONLY_LIVE=1` opt-in.\n- Explicit `--max-messages` and `--timeout-ms` bounds.\n\n```text\nBYDOXE_ENABLE_PRIVATE_WS_READONLY_LIVE=1 bydoxe websocket private subscribe --instType USDT-FUTURES --channel orders --instId BTCUSDT --live --max-messages 2 --timeout-ms 10000 --format json\n```\n\nPrivate WebSocket spot trade payloads remain preview-only.\n\n## Distribution\n\nThe current BYDOXE CLI patch release target is version `0.1.3`, matching the companion BYDOXE Agent Skills release target. The CLI is distributed as the npm package `@bydoxe/bydoxe-cli`.\n\nUse [docs/distribution.md](docs/distribution.md) for versioning, npm distribution, and installer-owned credential configuration policy.\n\nUse [docs/release-readiness.md](docs/release-readiness.md) before publishing or tagging a release.\n\n## Development\n\n```sh\nnpm run validate\nnpm run typecheck\nnpm test\nnpm run catalog:generate\nnpm run catalog:check\nnpm run reference:generate\nnpm run reference:check\nnpm run summary:generate\nnpm run summary:check\nnpm run smoke:readme\nnpm run smoke:public-rest-live\nnpm run smoke:websocket-live\nnpm run smoke:websocket-private-live\nnpm run build\n```\n\n`npm run validate` runs type checking, unit tests, command catalog, generated reference, generated summary freshness checks, README dry-run smoke examples, optional public REST and WebSocket live smoke gates, README command coverage checks, command metadata checks, domain checks, unfinished-marker checks, and English-only content checks for project artifacts. The public REST live smoke is skipped unless `BYDOXE_RUN_LIVE_REST_TESTS=1` is set. The public WebSocket live smoke is skipped unless `BYDOXE_RUN_LIVE_WS_TESTS=1` is set. The private read-only WebSocket live smoke is skipped unless `BYDOXE_RUN_LIVE_PRIVATE_WS_TESTS=1` is set.\n\n`docs/command-catalog.json` is generated from the CLI command registries. It is the machine-readable source for command metadata, required parameters, optional parameters, auth scope, risk level, transport, and endpoint mapping.\n\n`docs/command-reference.md` is generated from the command catalog. It is the human-readable command reference for endpoint mapping, parameter hints, and write validation rules.\n\n`docs/command-summary.md` is generated from the command catalog. It is the quick status summary for command counts, group coverage, risk profile, and safety scope.\n\n`bydoxe --help` lists required and optional parameter hints from the same command registry metadata.\n\n## Optional Live Smoke Checks\n\nThe optional public REST live smoke runs a bounded `public time` request only when explicitly enabled:\n\n```sh\nBYDOXE_RUN_LIVE_REST_TESTS=1 npm run smoke:public-rest-live\n```\n\nPublic REST market samples are a second opt-in layer:\n\n```sh\nBYDOXE_RUN_LIVE_REST_TESTS=1 BYDOXE_RUN_LIVE_REST_MARKET_TESTS=1 npm run smoke:public-rest-live\n```\n\nMarket samples include spot tickers, spot orderbook, spot candles, futures ticker, and futures candles. Set `BYDOXE_REST_LIVE_SYMBOL` to override the default market sample symbol. Set `BYDOXE_REST_LIVE_CANDLE_INTERVAL` to override the default candle interval.\n\n## Public REST Commands\n\n| Command | Endpoint |\n| --- | --- |\n| `bydoxe public time` | `GET /public/time` |\n| `bydoxe spot market coins` | `GET /spot/market/coins` |\n| `bydoxe spot market symbols` | `GET /spot/market/symbols` |\n| `bydoxe spot market tickers` | `GET /spot/market/tickers` |\n| `bydoxe spot market orderbook` | `GET /spot/market/orderbook` |\n| `bydoxe spot market candles` | `GET /spot/market/candles` |\n| `bydoxe spot market history-candles` | `GET /spot/market/history-candles` |\n| `bydoxe spot market fills` | `GET /spot/market/fills` |\n| `bydoxe spot market fills-history` | `GET /spot/market/fills-history` |\n| `bydoxe future market ticker` | `GET /future/market/24h-ticker` |\n| `bydoxe future market mark-price` | `GET /future/market/mark-price` |\n| `bydoxe future market book-ticker` | `GET /future/market/book-ticker` |\n| `bydoxe future market fills` | `GET /future/market/fills` |\n| `bydoxe future market fills-history` | `GET /future/market/fills-history` |\n| `bydoxe future market depth` | `GET /future/market/depth` |\n| `bydoxe future market candles` | `GET /future/market/candles` |\n| `bydoxe future market history-fund-rate` | `GET /future/market/history-fund-rate` |\n| `bydoxe future market history-candles` | `GET /future/market/history-candles` |\n| `bydoxe future market history-index-candles` | `GET /future/market/history-index-candles` |\n| `bydoxe future market history-mark-candles` | `GET /future/market/history-mark-candles` |\n| `bydoxe future market funding-info` | `GET /future/market/funding-info` |\n| `bydoxe future market open-interest` | `GET /future/market/open-interest` |\n| `bydoxe future market taker-buy-sell` | `GET /future/market/taker-buy-sell` |\n| `bydoxe future market account-long-short` | `GET /future/market/account-long-short` |\n| `bydoxe future market top-trader-position-long-short` | `GET /future/market/top-trader-position-long-short` |\n| `bydoxe future market top-trader-account-long-short` | `GET /future/market/top-trader-account-long-short` |\n| `bydoxe future market query-position-tier` | `GET /future/market/query-position-tier` |\n\nCommand flags that are not global options are forwarded as query parameters. For example, `--symbol BTCUSDT --limit 100` becomes `?symbol=BTCUSDT&limit=100`.\n\n## Authenticated Read Commands\n\nAuthenticated read commands require local credentials and never require chat-based API secrets.\n\n| Command | Endpoint |\n| --- | --- |\n| `bydoxe common trade-fee` | `GET /common/trade-fee` |\n| `bydoxe account funding-assets` | `GET /account/funding-assets` |\n| `bydoxe account all-balance` | `GET /account/all-account-balance` |\n| `bydoxe spot trade unfilled-orders` | `GET /spot/trade/unfilled-orders` |\n| `bydoxe spot trade history-orders` | `GET /spot/trade/history-orders` |\n| `bydoxe spot trade fills` | `GET /spot/trade/fills` |\n| `bydoxe spot trade order-info` | `POST /spot/trade/order-info` |\n| `bydoxe spot account assets` | `GET /spot/account/assets` |\n| `bydoxe spot account transfer-coin-info` | `GET /spot/account/transfer-coin-info` |\n| `bydoxe spot account withdrawal-records` | `GET /spot/account/withdrawal-records` |\n| `bydoxe spot account deposit-records` | `GET /spot/account/deposit-records` |\n| `bydoxe spot account transfer-records` | `GET /spot/account/transfer-records` |\n| `bydoxe spot account deposit-address` | `GET /spot/account/deposit-address` |\n| `bydoxe future position single` | `GET /future/position/single-position` |\n| `bydoxe future position all` | `GET /future/position/all-position` |\n| `bydoxe future position history` | `GET /future/position/history-position` |\n| `bydoxe future account info` | `GET /future/account` |\n| `bydoxe future account max-open` | `GET /future/account/max-open` |\n| `bydoxe future account liq-price` | `GET /future/account/liq-price` |\n| `bydoxe future account open-count` | `GET /future/account/open-count` |\n| `bydoxe future order detail` | `GET /future/order/detail` |\n| `bydoxe future order fills` | `GET /future/order/fills` |\n| `bydoxe future order fill-history` | `GET /future/order/fill-history` |\n| `bydoxe future order orders-pending` | `GET /future/order/orders-pending` |\n| `bydoxe future order orders-history` | `GET /future/order/orders-history` |\n| `bydoxe future trigger orders-pending` | `GET /future/order/orders-plan-pending` |\n| `bydoxe future trigger orders-history` | `GET /future/order/orders-plan-history` |\n| `bydoxe copytrading trader current-orders` | `GET /copy/mix-trader/order-current-track` |\n| `bydoxe copytrading trader history-orders` | `GET /copy/mix-trader/order-history-track` |\n| `bydoxe copytrading trader total-detail` | `GET /copy/mix-trader/order-total-detail` |\n| `bydoxe copytrading trader profit-summary` | `GET /copy/mix-trader/profit-history-summarys` |\n| `bydoxe copytrading trader profit-history` | `GET /copy/mix-trader/profit-history-details` |\n| `bydoxe copytrading trader profit-details` | `GET /copy/mix-trader/profit-details` |\n| `bydoxe copytrading trader followers` | `GET /copy/mix-trader/query-followers` |\n| `bydoxe copytrading follower current-orders` | `GET /copy/mix-follower/query-current-orders` |\n| `bydoxe copytrading follower history-orders` | `GET /copy/mix-follower/query-history-orders` |\n| `bydoxe copytrading follower settings` | `GET /copy/mix-follower/query-copy-trade-settings` |\n| `bydoxe copytrading follower traders` | `GET /copy/mix-follower/query-my-traders` |\n\nAuthenticated read request parameters can be built from flags. Read-only POST commands, such as `spot trade order-info`, also accept `--body` JSON.\n\n## Write Commands\n\nWrite commands require local credentials and exact `--confirm CONFIRM` for live execution. Always review `--dry-run` output first.\n\n| Command | Endpoint |\n| --- | --- |\n| `bydoxe spot trade place-order` | `POST /spot/trade/place-order` |\n| `bydoxe spot trade cancel-order` | `POST /spot/trade/cancel-order` |\n| `bydoxe spot trade cancel-replace-order` | `POST /spot/trade/cancel-replace-order` |\n| `bydoxe spot trade batch-cancel-replace-order` | `POST /spot/trade/batch-cancel-replace-order` |\n| `bydoxe spot trade batch-orders` | `POST /spot/trade/batch-orders` |\n| `bydoxe spot trade batch-cancel-orders` | `POST /spot/trade/batch-cancel-orders` |\n| `bydoxe spot trade cancel-symbol-order` | `POST /spot/trade/cancel-symbol-order` |\n| `bydoxe spot account transfer` | `POST /spot/account/transfer` |\n| `bydoxe spot account withdraw` | `POST /spot/account/withdraw` |\n| `bydoxe spot account cancel-withdraw` | `POST /spot/account/cancel-withdraw` |\n| `bydoxe future account set-leverage` | `POST /future/account/set-leverage` |\n| `bydoxe future account set-margin` | `POST /future/account/set-margin` |\n| `bydoxe future account set-margin-mode` | `POST /future/account/set-margin-mode` |\n| `bydoxe future order place` | `POST /future/order/place-order` |\n| `bydoxe future order click-backhand` | `POST /future/order/click-backhand` |\n| `bydoxe future order batch-place` | `POST /future/order/batch-place-order` |\n| `bydoxe future order modify` | `POST /future/order/modify-order` |\n| `bydoxe future order cancel` | `POST /future/order/cancel-order` |\n| `bydoxe future order batch-cancel` | `POST /future/order/batch-cancel-orders` |\n| `bydoxe future order close-positions` | `POST /future/order/close-positions` |\n| `bydoxe future order cancel-all` | `POST /future/order/cancel-all-orders` |\n| `bydoxe future trigger place` | `POST /future/order/place-plan-order` |\n| `bydoxe future trigger modify` | `POST /future/order/modify-plan-order` |\n| `bydoxe future trigger cancel` | `POST /future/order/cancel-plan-order` |\n| `bydoxe future tpsl place` | `POST /future/order/place-tpsl-order` |\n| `bydoxe future tpsl modify` | `POST /future/order/modify-tpsl-order` |\n| `bydoxe future tpsl cancel` | `POST /future/order/cancel-tpsl-order` |\n| `bydoxe copytrading trader modify-tpsl` | `POST /copy/mix-trader/order-modify-tpsl` |\n| `bydoxe copytrading trader close-positions` | `POST /copy/mix-trader/order-close-positions` |\n| `bydoxe copytrading trader config` | `POST /copy/mix-trader/config-trader-setting` |\n| `bydoxe copytrading trader remove-follower` | `POST /copy/mix-trader/remove-follower` |\n| `bydoxe copytrading follower setting-tpsl` | `POST /copy/mix-follower/setting-tpsl` |\n| `bydoxe copytrading follower setting-copy-trade` | `POST /copy/mix-follower/setting-copy-trade` |\n| `bydoxe copytrading follower close-positions` | `POST /copy/mix-follower/close-positions` |\n| `bydoxe copytrading follower cancel-follow` | `POST /copy/mix-follower/cancel-follow` |\n\nWrite request bodies can be built from flags or passed as JSON:\n\n```sh\nbydoxe future account set-leverage --symbol BTCUSDT --longLeverage 5 --shortLeverage 5 --dry-run --format json\nbydoxe future account set-leverage --body '{\"symbol\":\"BTCUSDT\",\"longLeverage\":5,\"shortLeverage\":5}' --dry-run --format json\nbydoxe future tpsl cancel --body '{\"symbol\":\"BTCUSDT\",\"orderIdList\":[{\"orderId\":\"tpsl-1\"}]}' --dry-run --format json\nbydoxe copytrading trader config --body '{\"traderMode\":true,\"copyPairList\":[\"BTCUSDT\"],\"profitShareRatio\":10}' --dry-run --format json\nbydoxe copytrading follower cancel-follow --body '{\"productType\":\"USDT-FUTURES\",\"traderUid\":\"trader-1\"}' --dry-run --format json\n```\n\n## WebSocket Commands\n\nWebSocket commands build connection and message previews with `--dry-run`. Public WebSocket commands also support bounded live sessions with `--live`. Private WebSocket live sessions are intentionally disabled behind a safety gate.\n\n| Command | Purpose |\n| --- | --- |\n| `bydoxe websocket public ping` | Preview a public WebSocket ping message |\n| `bydoxe websocket public subscribe` | Preview a public channel subscription |\n| `bydoxe websocket public unsubscribe` | Preview a public channel unsubscription |\n| `bydoxe websocket private login` | Preview a signed private login payload |\n| `bydoxe websocket private subscribe` | Preview a private channel subscription |\n| `bydoxe websocket private unsubscribe` | Preview a private channel unsubscription |\n| `bydoxe websocket private spot trade` | Preview a private spot trade payload |\n\nExamples:\n\n```sh\nbydoxe websocket public ping --dry-run --format json\nbydoxe websocket public subscribe --instType SPOT --channel ticker --instId BTCUSDT --dry-run --format json\nbydoxe websocket private login --dry-run --format json\nbydoxe websocket private subscribe --instType USDT-FUTURES --channel orders --instId BTCUSDT --dry-run --format json\nbydoxe websocket private spot trade --instId BTCUSDT --side buy --orderType limit --size 0.01 --price 60000 --dry-run --format json\n```\n\nPublic live examples:\n\n```text\nbydoxe websocket public ping --live --timeout-ms 5000 --format json\nbydoxe websocket public subscribe --instType SPOT --channel ticker --instId BTCUSDT --live --max-messages 5 --timeout-ms 15000 --format json\n```\n\nOptional live smoke:\n\n```sh\nBYDOXE_RUN_LIVE_WS_TESTS=1 npm run smoke:websocket-live\n```\n\nOptional private read-only live smoke:\n\n```sh\nBYDOXE_RUN_LIVE_PRIVATE_WS_TESTS=1 BYDOXE_ENABLE_PRIVATE_WS_READONLY_LIVE=1 npm run smoke:websocket-private-live\n```\n\nThe private smoke uses the live private WebSocket URL `wss://open-api.bydoxe.com/v1/ws/private` by default. Set `BYDOXE_PRIVATE_WS_LIVE_URL`, `BYDOXE_PRIVATE_WS_LIVE_INST_TYPE`, `BYDOXE_PRIVATE_WS_LIVE_CHANNEL`, `BYDOXE_PRIVATE_WS_LIVE_INST_ID`, `BYDOXE_PRIVATE_WS_LIVE_MAX_MESSAGES`, or `BYDOXE_PRIVATE_WS_LIVE_TIMEOUT_MS` to override the default private read-only WebSocket sample.\n\nPrivate WebSocket login previews redact credential-bearing fields in dry-run output. Private spot trade messages require exact `--confirm CONFIRM` before any future live execution path.\n\nPrivate read-only WebSocket live execution is limited to private subscribe and unsubscribe commands and requires all of these gates:\n\n- Authenticated login handshake verification.\n- Explicit `BYDOXE_ENABLE_PRIVATE_WS_READONLY_LIVE=1` opt-in.\n- Explicit `--max-messages` and `--timeout-ms` bounds.\n- Local credentials configured through `bydoxe config set` or environment variables.\n\nExample:\n\n```sh\nBYDOXE_ENABLE_PRIVATE_WS_READONLY_LIVE=1 bydoxe websocket private subscribe --instType USDT-FUTURES --channel orders --instId BTCUSDT --live --max-messages 2 --timeout-ms 10000 --format json\n```\n\nSee [docs/private-websocket-readonly-live-plan.md](docs/private-websocket-readonly-live-plan.md) for the read-only private WebSocket live boundary. Private spot trade live execution is not part of that boundary.\n","readmeFilename":"README.md"}