perp-cli 0.12.15 → 0.14.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/README.md +278 -31
- package/dist/_stderr-filter.js +0 -1
- package/dist/agent-wallet/lighter-keystore.d.ts +11 -0
- package/dist/agent-wallet/lighter-keystore.js +92 -10
- package/dist/agent-wallet/passphrase.d.ts +1 -1
- package/dist/agent-wallet/passphrase.js +16 -3
- package/dist/agent-wallet/store.d.ts +37 -4
- package/dist/agent-wallet/store.js +132 -0
- package/dist/agent-wallet/venue-keystore.d.ts +14 -0
- package/dist/agent-wallet/venue-keystore.js +121 -0
- package/dist/api/public/hyperliquid.js +4 -4
- package/dist/api/public/lighter.js +5 -5
- package/dist/api/public/pacifica.d.ts +0 -1
- package/dist/api/public/pacifica.js +4 -13
- package/dist/api/public/urls.d.ts +9 -1
- package/dist/api/public/urls.js +35 -13
- package/dist/arb/file-lock.d.ts +11 -0
- package/dist/arb/file-lock.js +74 -0
- package/dist/arb/index.d.ts +2 -2
- package/dist/arb/index.js +2 -2
- package/dist/arb/pending-entry.d.ts +32 -0
- package/dist/arb/pending-entry.js +77 -0
- package/dist/arb/sizing.d.ts +6 -13
- package/dist/arb/sizing.js +12 -51
- package/dist/arb/state.d.ts +45 -12
- package/dist/arb/state.js +214 -42
- package/dist/arb/utils.d.ts +20 -6
- package/dist/arb/utils.js +43 -39
- package/dist/bot/conditions.d.ts +4 -4
- package/dist/bot/conditions.js +11 -6
- package/dist/bot/config.d.ts +17 -1
- package/dist/bot/config.js +48 -12
- package/dist/bot/engine.d.ts +61 -2
- package/dist/bot/engine.js +610 -144
- package/dist/bot/fill-size.d.ts +7 -0
- package/dist/bot/fill-size.js +18 -0
- package/dist/bot/index.d.ts +1 -1
- package/dist/bot/index.js +1 -1
- package/dist/bot/perp-order.d.ts +99 -0
- package/dist/bot/perp-order.js +299 -0
- package/dist/bot/presets.d.ts +7 -0
- package/dist/bot/presets.js +17 -0
- package/dist/bot/quarantine.d.ts +75 -0
- package/dist/bot/quarantine.js +190 -0
- package/dist/bot/quote-rules.d.ts +23 -0
- package/dist/bot/quote-rules.js +69 -0
- package/dist/bot/strategies/avellaneda-mm.d.ts +32 -2
- package/dist/bot/strategies/avellaneda-mm.js +72 -70
- package/dist/bot/strategies/basis-arb.js +2 -0
- package/dist/bot/strategies/dca-strategy.d.ts +2 -0
- package/dist/bot/strategies/dca-strategy.js +5 -0
- package/dist/bot/strategies/funding-arb-strategy.d.ts +43 -3
- package/dist/bot/strategies/funding-arb-strategy.js +571 -380
- package/dist/bot/strategies/funding-arb-utils.d.ts +48 -23
- package/dist/bot/strategies/funding-arb-utils.js +159 -195
- package/dist/bot/strategies/funding-arb-v2.d.ts +32 -0
- package/dist/bot/strategies/funding-arb-v2.js +258 -47
- package/dist/bot/strategies/funding-auto.js +215 -194
- package/dist/bot/strategies/spot-perp-arb-strategy.d.ts +14 -0
- package/dist/bot/strategies/spot-perp-arb-strategy.js +217 -50
- package/dist/bot/strategies/spot-perp-executor.d.ts +73 -19
- package/dist/bot/strategies/spot-perp-executor.js +319 -120
- package/dist/bot/strategies/spot-perp-state.d.ts +43 -0
- package/dist/bot/strategies/spot-perp-state.js +70 -0
- package/dist/bot/strategy-types.d.ts +6 -0
- package/dist/bot/tui/BotDashboard.d.ts +7 -2
- package/dist/bot/tui/BotDashboard.js +6 -3
- package/dist/bridge-engine.d.ts +120 -19
- package/dist/bridge-engine.js +710 -422
- package/dist/bridge-signers.d.ts +54 -0
- package/dist/bridge-signers.js +161 -0
- package/dist/cache.d.ts +4 -1
- package/dist/cache.js +11 -0
- package/dist/cli-flags.d.ts +50 -0
- package/dist/cli-flags.js +104 -0
- package/dist/cli-program.d.ts +35 -0
- package/dist/cli-program.js +286 -0
- package/dist/cli-spec.js +1 -1
- package/dist/client-id-tracker.js +11 -2
- package/dist/commands/account.d.ts +7 -1
- package/dist/commands/account.js +74 -84
- package/dist/commands/agent-import.d.ts +114 -0
- package/dist/commands/agent-import.js +794 -0
- package/dist/commands/agent.d.ts +232 -2
- package/dist/commands/agent.js +1858 -955
- package/dist/commands/alerts.d.ts +1 -0
- package/dist/commands/alerts.js +31 -28
- package/dist/commands/arb/index.d.ts +60 -1
- package/dist/commands/arb/index.js +381 -384
- package/dist/commands/arb-auto.d.ts +132 -4
- package/dist/commands/arb-auto.js +1474 -967
- package/dist/commands/arb.d.ts +3 -1
- package/dist/commands/arb.js +62 -30
- package/dist/commands/bot.js +127 -47
- package/dist/commands/bridge.d.ts +2 -1
- package/dist/commands/bridge.js +339 -192
- package/dist/commands/builder.d.ts +55 -0
- package/dist/commands/builder.js +387 -0
- package/dist/commands/funds-onchain.d.ts +32 -0
- package/dist/commands/funds-onchain.js +286 -0
- package/dist/commands/funds.d.ts +25 -0
- package/dist/commands/funds.js +939 -245
- package/dist/commands/history.js +72 -45
- package/dist/commands/init.d.ts +107 -15
- package/dist/commands/init.js +1116 -249
- package/dist/commands/jobs.d.ts +2 -1
- package/dist/commands/jobs.js +77 -15
- package/dist/commands/manage.js +136 -91
- package/dist/commands/market.d.ts +4 -1
- package/dist/commands/market.js +35 -32
- package/dist/commands/outcome.d.ts +10 -0
- package/dist/commands/outcome.js +396 -0
- package/dist/commands/plan.js +52 -12
- package/dist/commands/portfolio.d.ts +1 -0
- package/dist/commands/portfolio.js +60 -72
- package/dist/commands/rebalance.d.ts +2 -1
- package/dist/commands/rebalance.js +33 -43
- package/dist/commands/risk.js +46 -19
- package/dist/commands/settings.d.ts +1 -0
- package/dist/commands/settings.js +246 -51
- package/dist/commands/trade.d.ts +50 -0
- package/dist/commands/trade.js +1943 -695
- package/dist/commands/wallet.d.ts +30 -1
- package/dist/commands/wallet.js +316 -337
- package/dist/config.d.ts +60 -9
- package/dist/config.js +252 -82
- package/dist/constants.d.ts +29 -4
- package/dist/constants.js +62 -20
- package/dist/dashboard/server.d.ts +2 -0
- package/dist/dashboard/server.js +9 -6
- package/dist/dashboard/ui.js +6 -4
- package/dist/dashboard/ws-feeds.js +20 -8
- package/dist/dex-asset-map.js +5 -3
- package/dist/errors.d.ts +122 -0
- package/dist/errors.js +194 -0
- package/dist/event-stream.js +75 -19
- package/dist/evm-master-tx.d.ts +59 -0
- package/dist/evm-master-tx.js +154 -0
- package/dist/exchanges/adapter-network.d.ts +10 -0
- package/dist/exchanges/adapter-network.js +10 -0
- package/dist/exchanges/arcus/adapter.d.ts +196 -0
- package/dist/exchanges/arcus/adapter.js +1092 -0
- package/dist/exchanges/arcus/agent.d.ts +55 -0
- package/dist/exchanges/arcus/agent.js +188 -0
- package/dist/exchanges/arcus/client.d.ts +63 -0
- package/dist/exchanges/arcus/client.js +285 -0
- package/dist/exchanges/arcus/public.d.ts +65 -0
- package/dist/exchanges/arcus/public.js +138 -0
- package/dist/exchanges/arcus/signing.d.ts +176 -0
- package/dist/exchanges/arcus/signing.js +288 -0
- package/dist/exchanges/arcus/spot-chain.d.ts +60 -0
- package/dist/exchanges/arcus/spot-chain.js +241 -0
- package/dist/exchanges/arcus/spot-router.d.ts +177 -0
- package/dist/exchanges/arcus/spot-router.js +183 -0
- package/dist/exchanges/arcus/spot.d.ts +109 -0
- package/dist/exchanges/arcus/spot.js +645 -0
- package/dist/exchanges/aster-funds.d.ts +127 -0
- package/dist/exchanges/aster-funds.js +252 -0
- package/dist/exchanges/aster-nonce.d.ts +2 -0
- package/dist/exchanges/aster-nonce.js +107 -0
- package/dist/exchanges/aster-spot.d.ts +117 -0
- package/dist/exchanges/aster-spot.js +686 -0
- package/dist/exchanges/aster-typed-data.d.ts +133 -7
- package/dist/exchanges/aster-typed-data.js +121 -7
- package/dist/exchanges/aster.d.ts +219 -6
- package/dist/exchanges/aster.js +1023 -153
- package/dist/exchanges/builder-fee.d.ts +254 -0
- package/dist/exchanges/builder-fee.js +421 -0
- package/dist/exchanges/canonical-symbols.d.ts +32 -0
- package/dist/exchanges/canonical-symbols.js +96 -0
- package/dist/exchanges/capabilities.d.ts +7 -1
- package/dist/exchanges/capabilities.js +7 -0
- package/dist/exchanges/hl-signing.d.ts +165 -0
- package/dist/exchanges/hl-signing.js +158 -0
- package/dist/exchanges/hyperliquid-outcome.d.ts +211 -0
- package/dist/exchanges/hyperliquid-outcome.js +646 -0
- package/dist/exchanges/hyperliquid-spot.d.ts +44 -5
- package/dist/exchanges/hyperliquid-spot.js +308 -117
- package/dist/exchanges/hyperliquid.d.ts +462 -57
- package/dist/exchanges/hyperliquid.js +1575 -449
- package/dist/exchanges/index.d.ts +6 -0
- package/dist/exchanges/index.js +4 -0
- package/dist/exchanges/interface.d.ts +63 -10
- package/dist/exchanges/interface.js +18 -3
- package/dist/exchanges/ioc-outcome.d.ts +44 -0
- package/dist/exchanges/ioc-outcome.js +57 -0
- package/dist/exchanges/legacy-trading-v2.d.ts +39 -0
- package/dist/exchanges/legacy-trading-v2.js +940 -0
- package/dist/exchanges/lighter-public.d.ts +43 -0
- package/dist/exchanges/lighter-public.js +276 -0
- package/dist/exchanges/lighter-rh-deposit.d.ts +62 -0
- package/dist/exchanges/lighter-rh-deposit.js +185 -0
- package/dist/exchanges/lighter-signer.d.ts +123 -0
- package/dist/exchanges/lighter-signer.js +215 -0
- package/dist/exchanges/lighter-spot.d.ts +91 -13
- package/dist/exchanges/lighter-spot.js +595 -233
- package/dist/exchanges/lighter.d.ts +611 -39
- package/dist/exchanges/lighter.js +1890 -649
- package/dist/exchanges/ondo/adapter.d.ts +166 -0
- package/dist/exchanges/ondo/adapter.js +835 -0
- package/dist/exchanges/ondo/agent.d.ts +31 -0
- package/dist/exchanges/ondo/agent.js +101 -0
- package/dist/exchanges/ondo/client.d.ts +60 -0
- package/dist/exchanges/ondo/client.js +297 -0
- package/dist/exchanges/ondo/funds.d.ts +122 -0
- package/dist/exchanges/ondo/funds.js +290 -0
- package/dist/exchanges/ondo/public.d.ts +95 -0
- package/dist/exchanges/ondo/public.js +214 -0
- package/dist/exchanges/ondo/spot.d.ts +127 -0
- package/dist/exchanges/ondo/spot.js +392 -0
- package/dist/exchanges/outcome-interface.d.ts +140 -0
- package/dist/exchanges/outcome-interface.js +16 -0
- package/dist/exchanges/pacifica-spot.d.ts +83 -0
- package/dist/exchanges/pacifica-spot.js +324 -0
- package/dist/exchanges/pacifica-typed-data.d.ts +30 -13
- package/dist/exchanges/pacifica-typed-data.js +57 -9
- package/dist/exchanges/pacifica.d.ts +288 -4
- package/dist/exchanges/pacifica.js +1013 -76
- package/dist/exchanges/precision.d.ts +47 -0
- package/dist/exchanges/precision.js +209 -0
- package/dist/exchanges/qfex/adapter.d.ts +341 -0
- package/dist/exchanges/qfex/adapter.js +1383 -0
- package/dist/exchanges/qfex/agent.d.ts +58 -0
- package/dist/exchanges/qfex/agent.js +188 -0
- package/dist/exchanges/qfex/client.d.ts +54 -0
- package/dist/exchanges/qfex/client.js +138 -0
- package/dist/exchanges/qfex/errors.d.ts +70 -0
- package/dist/exchanges/qfex/errors.js +236 -0
- package/dist/exchanges/qfex/public.d.ts +122 -0
- package/dist/exchanges/qfex/public.js +268 -0
- package/dist/exchanges/qfex/signing.d.ts +160 -0
- package/dist/exchanges/qfex/signing.js +283 -0
- package/dist/exchanges/qfex/ws-transport.d.ts +294 -0
- package/dist/exchanges/qfex/ws-transport.js +798 -0
- package/dist/exchanges/rate-limiter.d.ts +12 -0
- package/dist/exchanges/rate-limiter.js +64 -0
- package/dist/exchanges/registry.d.ts +14 -2
- package/dist/exchanges/registry.js +20 -32
- package/dist/exchanges/slippage.d.ts +37 -0
- package/dist/exchanges/slippage.js +70 -0
- package/dist/exchanges/spot-factory.d.ts +166 -0
- package/dist/exchanges/spot-factory.js +431 -0
- package/dist/exchanges/spot-interface.d.ts +98 -4
- package/dist/exchanges/spot-interface.js +27 -1
- package/dist/exchanges/spot-result.d.ts +79 -0
- package/dist/exchanges/spot-result.js +273 -0
- package/dist/exchanges/trading-v2.d.ts +117 -0
- package/dist/exchanges/trading-v2.js +301 -0
- package/dist/exchanges/venue-types.d.ts +231 -0
- package/dist/exchanges/venue-types.js +87 -0
- package/dist/exchanges/venue.d.ts +211 -0
- package/dist/exchanges/venue.js +132 -0
- package/dist/exchanges/venues/arcus.d.ts +8 -0
- package/dist/exchanges/venues/arcus.js +109 -0
- package/dist/exchanges/venues/aster.d.ts +49 -0
- package/dist/exchanges/venues/aster.js +176 -0
- package/dist/exchanges/venues/create-helpers.d.ts +18 -0
- package/dist/exchanges/venues/create-helpers.js +199 -0
- package/dist/exchanges/venues/hyperliquid.d.ts +23 -0
- package/dist/exchanges/venues/hyperliquid.js +126 -0
- package/dist/exchanges/venues/index.d.ts +16 -0
- package/dist/exchanges/venues/index.js +26 -0
- package/dist/exchanges/venues/lighter-family.d.ts +92 -0
- package/dist/exchanges/venues/lighter-family.js +166 -0
- package/dist/exchanges/venues/lighter-rh.d.ts +7 -0
- package/dist/exchanges/venues/lighter-rh.js +58 -0
- package/dist/exchanges/venues/lighter.d.ts +6 -0
- package/dist/exchanges/venues/lighter.js +55 -0
- package/dist/exchanges/venues/ondo.d.ts +34 -0
- package/dist/exchanges/venues/ondo.js +140 -0
- package/dist/exchanges/venues/pacifica.d.ts +8 -0
- package/dist/exchanges/venues/pacifica.js +95 -0
- package/dist/exchanges/venues/qfex.d.ts +28 -0
- package/dist/exchanges/venues/qfex.js +132 -0
- package/dist/execution-log.js +10 -2
- package/dist/funding/legacy-public.d.ts +31 -0
- package/dist/funding/legacy-public.js +369 -0
- package/dist/funding/normalize.d.ts +28 -16
- package/dist/funding/normalize.js +61 -29
- package/dist/funding/rates.d.ts +46 -11
- package/dist/funding/rates.js +228 -277
- package/dist/guardrail/perp-guardrail.js +0 -0
- package/dist/index.js +157 -682
- package/dist/jobs.d.ts +84 -6
- package/dist/jobs.js +239 -41
- package/dist/landing.d.ts +14 -0
- package/dist/landing.js +36 -0
- package/dist/mcp-server.d.ts +14 -4
- package/dist/mcp-server.js +820 -402
- package/dist/mcp-trade-guard.d.ts +16 -0
- package/dist/mcp-trade-guard.js +59 -0
- package/dist/pacifica/client.d.ts +41 -10
- package/dist/pacifica/client.js +167 -63
- package/dist/pacifica/constants.d.ts +0 -1
- package/dist/pacifica/constants.js +0 -5
- package/dist/pacifica/deposit.d.ts +30 -3
- package/dist/pacifica/deposit.js +119 -2
- package/dist/pacifica/faucet.d.ts +29 -0
- package/dist/pacifica/faucet.js +100 -0
- package/dist/pacifica/sign-tx.d.ts +15 -0
- package/dist/pacifica/sign-tx.js +41 -0
- package/dist/pacifica/types/account.d.ts +28 -4
- package/dist/pacifica/types/lake.d.ts +20 -5
- package/dist/pacifica/types/lake.js +4 -0
- package/dist/pacifica/types/market.d.ts +5 -0
- package/dist/pacifica/types/order.d.ts +4 -1
- package/dist/pacifica/types/position.d.ts +9 -1
- package/dist/plan-executor.d.ts +10 -5
- package/dist/plan-executor.js +165 -54
- package/dist/position-history.js +13 -0
- package/dist/rebalance.d.ts +26 -2
- package/dist/rebalance.js +86 -7
- package/dist/relay-swap.d.ts +232 -0
- package/dist/relay-swap.js +630 -0
- package/dist/risk.js +5 -1
- package/dist/secret-env.d.ts +15 -0
- package/dist/secret-env.js +36 -0
- package/dist/settings.d.ts +169 -6
- package/dist/settings.js +219 -38
- package/dist/signer/ows-evm.d.ts +13 -0
- package/dist/signer/ows-evm.js +22 -0
- package/dist/smart-order.d.ts +9 -0
- package/dist/smart-order.js +53 -8
- package/dist/strategies/dca.d.ts +6 -2
- package/dist/strategies/dca.js +66 -26
- package/dist/strategies/funding-arb.d.ts +11 -1
- package/dist/strategies/funding-arb.js +202 -89
- package/dist/strategies/grid.d.ts +31 -0
- package/dist/strategies/grid.js +89 -11
- package/dist/strategies/pending-stop.d.ts +8 -0
- package/dist/strategies/pending-stop.js +12 -0
- package/dist/strategies/split-order.d.ts +45 -17
- package/dist/strategies/split-order.js +157 -91
- package/dist/strategies/trailing-stop.d.ts +2 -1
- package/dist/strategies/trailing-stop.js +52 -6
- package/dist/strategies/twap.d.ts +6 -1
- package/dist/strategies/twap.js +39 -11
- package/dist/trade-validator.d.ts +22 -0
- package/dist/trade-validator.js +119 -15
- package/dist/utils/numeric.d.ts +46 -0
- package/dist/utils/numeric.js +79 -0
- package/dist/utils.d.ts +19 -0
- package/dist/utils.js +96 -19
- package/dist/withdraw-gate.d.ts +49 -0
- package/dist/withdraw-gate.js +131 -0
- package/package.json +15 -6
- package/skills/perp-cli/SKILL.md +338 -134
- package/skills/perp-cli/references/agent-operations.md +181 -92
- package/skills/perp-cli/references/commands.md +475 -132
- package/skills/perp-cli/references/strategies.md +44 -38
- package/skills/perp-cli/scripts/arb-monitor.sh +22 -17
- package/skills/perp-cli/scripts/funding-analysis.sh +20 -10
- package/skills/perp-cli/scripts/preflight.sh +21 -14
- package/skills/perp-cli/scripts/spot-perp-scan.sh +12 -7
- package/skills/perp-cli/scripts/validate-arb.sh +33 -16
- package/vendor/lighter-signer/SHA256SUMS +2 -0
- package/vendor/lighter-signer/VERSION +8 -0
- package/vendor/lighter-signer/lighter-signer.wasm +0 -0
- package/vendor/lighter-signer/wasm_exec.js +575 -0
- package/dist/bot/strategies/funding-arb-v2-strategy.d.ts +0 -42
- package/dist/bot/strategies/funding-arb-v2-strategy.js +0 -864
|
@@ -2,74 +2,183 @@
|
|
|
2
2
|
|
|
3
3
|
All commands support `--json` for structured output. Always use `--json` when calling from an agent.
|
|
4
4
|
|
|
5
|
+
## Global Flags
|
|
6
|
+
|
|
7
|
+
`--json` (required for agents) | `-e <venue>` | `-n mainnet|testnet` | `--dry-run` (only commands whose `--help` says "supports --dry-run"; others refuse with `INVALID_PARAMS`) | `--fields <f1,f2>` | `--ndjson` | `-w, --wallet <name>` | `--ows <name>` (OWS wallet) | `--no-agent` (skip agent-key routing) | `--no-builder` | `--dex <name>` (HIP-3, Hyperliquid)
|
|
8
|
+
|
|
9
|
+
Venues (`-e`, id | aliases): `pacifica|pac`, `hyperliquid|hl`, `lighter|lt`, `lighter-rh|lrh|rh`, `aster|ast`, `ondo|ondo-perps`, `arcus`, `qfex|qf`. Default = `settings.defaultExchange`, else `pacifica` — always pass `-e`.
|
|
10
|
+
`-k <key>` is rejected (keys only via stdin / OWS vault). `--passphrase` is deprecated → `OWS_PASSPHRASE` env or stdin.
|
|
11
|
+
|
|
5
12
|
## Market Data (read-only, safe)
|
|
6
13
|
```bash
|
|
7
|
-
perp --json market list
|
|
8
|
-
perp --json market prices
|
|
9
|
-
perp --json market mid <SYMBOL>
|
|
10
|
-
perp --json market info <SYMBOL>
|
|
11
|
-
perp --json market book <SYMBOL>
|
|
12
|
-
perp --json market trades <SYMBOL>
|
|
13
|
-
perp --json market funding <SYMBOL>
|
|
14
|
-
perp --json market kline <SYM> <
|
|
15
|
-
perp --json market hip3
|
|
14
|
+
perp --json -e <EX> market list # all markets with prices, funding, volume
|
|
15
|
+
perp --json market prices # cross-exchange price comparison
|
|
16
|
+
perp --json -e <EX> market mid <SYMBOL> # mid price (fast)
|
|
17
|
+
perp --json -e <EX> market info <SYMBOL> # mark/index price, funding, volume, OI, max leverage
|
|
18
|
+
perp --json -e <EX> market book <SYMBOL> # orderbook (bids/asks)
|
|
19
|
+
perp --json -e <EX> market trades <SYMBOL> # recent trades
|
|
20
|
+
perp --json -e <EX> market funding <SYMBOL> # funding rate history
|
|
21
|
+
perp --json -e <EX> market kline <SYM> <INT> # OHLCV candles (1m,5m,15m,1h,4h,1d)
|
|
22
|
+
perp --json market hip3 # list HIP-3 deployed perp dexes (Hyperliquid)
|
|
16
23
|
```
|
|
17
24
|
|
|
18
25
|
## Account (read-only, safe)
|
|
19
26
|
```bash
|
|
20
|
-
perp --json
|
|
21
|
-
perp --json account positions
|
|
22
|
-
perp --json account orders
|
|
23
|
-
perp --json account history
|
|
24
|
-
perp --json account trades
|
|
25
|
-
perp --json account funding-history
|
|
26
|
-
perp --json account
|
|
27
|
-
perp --json account margin <SYMBOL>
|
|
28
|
-
perp --json
|
|
27
|
+
perp --json portfolio -e <VENUE_ID> # perp balance + spot holdings + 24h funding; full venue id only (hl → INVALID_PARAMS)
|
|
28
|
+
perp --json -e <EX> account positions # open positions
|
|
29
|
+
perp --json -e <EX> account orders # open/pending orders
|
|
30
|
+
perp --json -e <EX> account history # order history
|
|
31
|
+
perp --json -e <EX> account trades # trade fill history
|
|
32
|
+
perp --json -e <EX> account funding-history # funding payments
|
|
33
|
+
perp --json -e <EX> account settings # per-market leverage & margin mode
|
|
34
|
+
perp --json -e <EX> account margin <SYMBOL> # position margin info
|
|
35
|
+
perp --json -e <EX> account pnl # realized + unrealized + funding
|
|
36
|
+
perp --json -e <EX> account twap-orders # active TWAP orders
|
|
37
|
+
perp --json portfolio # cross-exchange unified view
|
|
38
|
+
perp --json portfolio --arb # full dashboard with arb top 5
|
|
29
39
|
```
|
|
30
40
|
|
|
31
41
|
## Trading (requires user confirmation)
|
|
32
42
|
```bash
|
|
33
43
|
# Market orders
|
|
34
|
-
perp --json trade market <SYMBOL> <buy|sell> <SIZE>
|
|
35
|
-
perp --json trade buy <SYMBOL> <SIZE>
|
|
36
|
-
perp --json trade sell <SYMBOL> <SIZE>
|
|
44
|
+
perp --json -e <EX> trade market <SYMBOL> <buy|sell> <SIZE>
|
|
45
|
+
perp --json -e <EX> trade buy <SYMBOL> <SIZE> # shorthand market buy
|
|
46
|
+
perp --json -e <EX> trade sell <SYMBOL> <SIZE> # shorthand market sell
|
|
47
|
+
perp --json -e <EX> trade buy <SYM> <SIZE> --smart # IOC limit at best ask + 1 tick — pacifica/hyperliquid/lighter/aster only; not with --tp/--sl or a client id
|
|
48
|
+
perp --json -e <EX> trade buy <SYM> <SIZE> --client-id <id> # reused id → ok:true, data.duplicate:true (local ~/.perp/client-ids.jsonl; nothing sent)
|
|
49
|
+
# id formats: pacifica full UUID; hyperliquid 0x+32 hex; lighter(-rh) integer; qfex refuses --client-id (use --auto-id)
|
|
50
|
+
# Opening orders: --force bypasses the local risk limits (user consent only; never quarantine)
|
|
37
51
|
|
|
38
|
-
#
|
|
39
|
-
perp --json trade
|
|
52
|
+
# Split execution (orderbook-aware, for large orders)
|
|
53
|
+
perp --json -e <EX> trade split <SYMBOL> <buy|sell> <USD>
|
|
54
|
+
perp --json -e <EX> trade split <SYM> buy 5000 --max-slippage 0.5 --max-slices 5 --delay 2000 --min-slice 200
|
|
55
|
+
perp --json -e <EX> trade market <SYM> buy <SIZE> --split # split via flag
|
|
40
56
|
|
|
41
|
-
#
|
|
42
|
-
perp --json trade
|
|
43
|
-
perp --json trade
|
|
57
|
+
# Limit / stop / TPSL
|
|
58
|
+
perp --json -e <EX> trade limit <SYMBOL> <buy|sell> <PRICE> <SIZE> [--tif GTC|IOC|FOK|ALO] # default GTC on every venue; off-grid price → INVALID_TICK (never rounded)
|
|
59
|
+
perp --json -e <EX> trade stop <SYMBOL> <SIDE> <SIZE> <STOP_PRICE> # reduce-only by default; --no-reduce-only to open (refused on ondo / qfex)
|
|
60
|
+
perp --json -e <EX> trade tpsl <SYMBOL> <long|short> --tp <P> --sl <P> # positionSide = the open position's side
|
|
61
|
+
perp --json -e <EX> trade buy <SYMBOL> <SIZE> --tp <P> --sl <P> # entry protected by TP/SL (verified fill)
|
|
44
62
|
|
|
45
63
|
# Order management
|
|
46
|
-
perp --json trade edit <SYMBOL> <ORDER_ID> <PRICE> <SIZE>
|
|
47
|
-
perp --json trade cancel <
|
|
48
|
-
perp --json trade cancel-all
|
|
49
|
-
perp --json trade
|
|
50
|
-
perp --json
|
|
64
|
+
perp --json -e <EX> trade edit <SYMBOL> <ORDER_ID> <PRICE> <SIZE>
|
|
65
|
+
perp --json -e <EX> trade cancel <SYMBOL_OR_ORDER_ID> [orderId]
|
|
66
|
+
perp --json -e <EX> trade cancel-all
|
|
67
|
+
perp --json -e <EX> trade cancel-stop <SYMBOL> <STOP_ORDER_ID> # pacifica / qfex only; other venues: trade cancel
|
|
68
|
+
perp --json -e <EX> trade cancel-twap <SYMBOL> <TWAP_ORDER_ID>
|
|
69
|
+
perp --json -e <EX> trade status <ORDER_ID|c:<CLIENT_ID>> [--symbol <SYM>]
|
|
70
|
+
# --symbol required on ondo / arcus / qfex, and for c:<id> on lighter / lighter-rh / aster
|
|
71
|
+
perp --json -e <EX> trade fills [SYMBOL] # recent fills
|
|
72
|
+
|
|
73
|
+
# Pre-flight validation
|
|
74
|
+
perp --json -e <EX> trade check <SYMBOL> <SIDE> <SIZE>
|
|
75
|
+
perp --json -e <EX> trade check <SYM> <SIDE> <SIZE> --leverage 3
|
|
51
76
|
# NOTE: trade check does NOT read exchange-set leverage. Always pass --leverage explicitly.
|
|
52
77
|
|
|
53
78
|
# Position management
|
|
54
|
-
perp --json trade close <SYMBOL>
|
|
55
|
-
perp --json trade close-all
|
|
56
|
-
perp --json trade flatten
|
|
57
|
-
perp --json trade reduce <SYMBOL> <PCT>
|
|
58
|
-
perp --json trade leverage <SYMBOL> <N>
|
|
79
|
+
perp --json -e <EX> trade close <SYMBOL> # close single position
|
|
80
|
+
perp --json -e <EX> trade close-all # close all positions
|
|
81
|
+
perp --json -e <EX> trade flatten # cancel all orders + close all positions
|
|
82
|
+
perp --json -e <EX> trade reduce <SYMBOL> <PCT> # reduce by percentage
|
|
83
|
+
perp --json -e <EX> trade leverage <SYMBOL> <N> [--isolated]
|
|
59
84
|
|
|
60
85
|
# Advanced orders
|
|
61
|
-
perp --json trade scale-tp <SYMBOL> --levels '<
|
|
62
|
-
perp --json trade scale-in <SYMBOL> <SIDE> --levels '<
|
|
63
|
-
perp --json trade pnl-track
|
|
86
|
+
perp --json -e <EX> trade scale-tp <SYMBOL> --levels '<P1>:<PCT>,<P2>:<PCT>'
|
|
87
|
+
perp --json -e <EX> trade scale-in <SYMBOL> <SIDE> --levels '<P1>:<PCT>,<P2>:<PCT>' (--size-usd <USD> | --size <BASE>) # percents sum to 100
|
|
88
|
+
perp --json -e <EX> trade pnl-track # real-time PnL tracker
|
|
89
|
+
perp --json -e <EX> trade twap <SYMBOL> <SIDE> <SIZE> <DURATION> # Pacifica: seconds (native), HL: minutes (native, min $100); others client-side: --background [--slices <n>]
|
|
90
|
+
|
|
91
|
+
# Spot helpers (any venue with spot)
|
|
92
|
+
perp --json -e <EX> trade spot-buy <SYMBOL> <SIZE>
|
|
93
|
+
perp --json -e <EX> trade spot-sell <SYMBOL> <SIZE>
|
|
94
|
+
perp --json -e <EX> trade spot-limit <SYMBOL> <SIDE> <PRICE> <SIZE> [--tif <tif>]
|
|
95
|
+
perp --json -e <EX> trade spot-cancel <SYMBOL> <ORDER_ID>
|
|
96
|
+
perp --json -e <EX> trade spot-orders [SYMBOL]
|
|
97
|
+
perp --json -e <EX> trade spot-transfer <to-spot|to-perp> <AMOUNT>
|
|
98
|
+
perp --json -e <EX> trade spot-balance
|
|
64
99
|
|
|
65
|
-
#
|
|
66
|
-
perp --json trade
|
|
67
|
-
perp --json trade split <SYM> buy 5000 --max-slippage 0.5 --max-slices 5 --delay 2000 --min-slice 200
|
|
68
|
-
perp --json trade market <SYM> buy <SIZE> --split # split via market command flag
|
|
69
|
-
perp --json trade market <SYM> buy <SIZE> --split --max-slippage 0.5
|
|
100
|
+
# Multi-leg execution (legs exchange:symbol:side:size; failed legs rolled back; unconfirmed leg → quarantined; no --dry-run)
|
|
101
|
+
perp --json trade multi <legs...>
|
|
70
102
|
```
|
|
71
103
|
|
|
72
|
-
##
|
|
104
|
+
## Outcome Markets (Hyperliquid HIP-4)
|
|
105
|
+
|
|
106
|
+
Fully-collateralized binary/range contracts on Hyperliquid. Each outcome's quote token comes from `outcomeMeta.quoteToken` (`outcome list` shows it; USDC on every listed outcome as of 2026-10-12), held on Hyperliquid spot. No leverage / no liquidation. Minimum order value 10 quote tokens (price × shares ≥ 10). Sizes are whole shares.
|
|
107
|
+
|
|
108
|
+
```bash
|
|
109
|
+
# List active outcome markets — parses the description string into
|
|
110
|
+
# class / underlying / expiry / targetPrice / period and lists each side
|
|
111
|
+
# with mid + assetId.
|
|
112
|
+
perp --json outcome list
|
|
113
|
+
|
|
114
|
+
# COMBINED VIEW — all sides' books in parallel + underlying mark price
|
|
115
|
+
# (HL perp mid for `description.underlying`) + gap vs targetPrice + ms
|
|
116
|
+
# until expiry + per-side implied probability. For a binary market the
|
|
117
|
+
# symmetric structure means Yes BID + No ASK ≈ 1.0; this is the
|
|
118
|
+
# preferred entry point for agents that need a single snapshot.
|
|
119
|
+
perp --json outcome view <outcome> [--depth N=10]
|
|
120
|
+
|
|
121
|
+
# Orderbook for ONE side only (use `view` if you want both at once).
|
|
122
|
+
# <side> accepts: 0/1, Yes/No, or #<enc> / +<enc> (the encoded form
|
|
123
|
+
# must match the outcome arg — mismatch throws INVALID_PARAMS).
|
|
124
|
+
perp --json outcome book <outcome> <side> [--depth N=10]
|
|
125
|
+
|
|
126
|
+
# Holdings + open orders.
|
|
127
|
+
perp --json outcome positions
|
|
128
|
+
perp --json outcome orders
|
|
129
|
+
|
|
130
|
+
# Place orders. ALWAYS dry-run first. [usd] = notional in the quote token, or --size <shares>; sell also --all.
|
|
131
|
+
perp --json --dry-run outcome buy <outcome> <side> <usd>
|
|
132
|
+
perp --json --dry-run outcome sell <outcome> <side> --all
|
|
133
|
+
|
|
134
|
+
# Live execution. --limit makes it GTC; without --limit it's IoC at best ask +5% (cap 1) / best bid -5%.
|
|
135
|
+
perp --json outcome buy <outcome> <side> [<usd> | --size <shares>] [--limit <px>] [--tif gtc|ioc|alo]
|
|
136
|
+
perp --json outcome sell <outcome> <side> [<usd> | --size <shares> | --all] [--limit <px>] [--tif gtc|ioc|alo]
|
|
137
|
+
|
|
138
|
+
# Cancel a resting order.
|
|
139
|
+
perp --json outcome cancel <outcome> <side> <oid>
|
|
140
|
+
```
|
|
141
|
+
|
|
142
|
+
### Identifier model
|
|
143
|
+
|
|
144
|
+
Same outcome side can be referenced 5 ways — the CLI normalises:
|
|
145
|
+
|
|
146
|
+
| Form | Example (BTC daily Yes) |
|
|
147
|
+
|---|---|
|
|
148
|
+
| `<outcome>, <side>` integer | `1, 0` |
|
|
149
|
+
| `<outcome>, <side>` name | `1, yes` |
|
|
150
|
+
| `#<enc>` (l2Book / candle / allMids coin) | `#10` |
|
|
151
|
+
| `+<enc>` (spotClearinghouseState balance coin) | `+10` |
|
|
152
|
+
| asset id (HL `/exchange` payload) | `100000010` |
|
|
153
|
+
|
|
154
|
+
Encoding formula: `enc = 10 * outcome + side`; asset id = `100,000,000 + enc`.
|
|
155
|
+
|
|
156
|
+
### Foot-guns enforced (Rule #2)
|
|
157
|
+
|
|
158
|
+
- **Min notional:** `price * size < 10` quote tokens → `INVALID_PARAMS`. Enforced in dry-run too. A trade leaving a remainder worth < 10 warns (it cannot be sold alone — use `sell --all`); selling more than held → `SIZE_TOO_LARGE`.
|
|
159
|
+
- **Encoded-side mismatch:** `outcome buy 2 #10` (where `#10` decodes to outcome=1) → `INVALID_PARAMS`, never silently routes to outcome 2.
|
|
160
|
+
- **Insufficient quote token:** pre-checked before order send → `INSUFFICIENT_BALANCE` (hold the outcome's quote token on Hyperliquid spot).
|
|
161
|
+
- **Venue rejection:** HL returns HTTP 200 with `statuses[0].error` even when an order is rejected; the CLI raises `ORDER_REJECTED` (or `INSUFFICIENT_BALANCE`) so a "placed" message never masks a failure.
|
|
162
|
+
|
|
163
|
+
### Agent workflow recommendation
|
|
164
|
+
|
|
165
|
+
```
|
|
166
|
+
1. perp --json outcome list # discover markets, parse description
|
|
167
|
+
2. perp --json outcome view <outcome> # full snapshot: both books +
|
|
168
|
+
# underlying mark + gap vs target +
|
|
169
|
+
# implied probabilities + time to expiry
|
|
170
|
+
3. perp --json --dry-run outcome buy <outcome> <side> <usd>
|
|
171
|
+
# validate notional, get user approval
|
|
172
|
+
4. perp --json outcome buy <outcome> <side> <usd> [--limit <px>] [--tif ...]
|
|
173
|
+
# execute (only after explicit user OK)
|
|
174
|
+
5. perp --json outcome positions # confirm fill / monitor
|
|
175
|
+
```
|
|
176
|
+
|
|
177
|
+
`outcome view` replaces the old multi-call pattern (separate `book` + `market mid` lookups). One round-trip returns everything an agent needs to decide direction.
|
|
178
|
+
|
|
179
|
+
Settlement at `expiryMs` is venue-side: winning side → 1 quote token per share, losing → 0. Decide before expiry whether to self-close or let the venue settle.
|
|
180
|
+
|
|
181
|
+
## Funds (deposit, withdraw, transfer, bridge, rebalance)
|
|
73
182
|
|
|
74
183
|
All fund movement lives under `perp funds`.
|
|
75
184
|
|
|
@@ -80,126 +189,360 @@ perp --json funds deposit hyperliquid <AMOUNT>
|
|
|
80
189
|
perp --json funds deposit lighter ethereum <AMOUNT> # L1 direct (min 1 USDC)
|
|
81
190
|
perp --json funds deposit lighter cctp arbitrum <AMOUNT> # CCTP (min 5 USDC)
|
|
82
191
|
perp --json funds deposit lighter info # all Lighter deposit routes
|
|
83
|
-
perp --json funds withdraw pacifica <AMOUNT>
|
|
84
|
-
perp --json funds withdraw hyperliquid <AMOUNT>
|
|
85
|
-
|
|
86
|
-
|
|
192
|
+
perp --json funds withdraw pacifica <AMOUNT> # to your own Solana wallet
|
|
193
|
+
perp --json funds withdraw hyperliquid <AMOUNT> [--chain arbitrum|ethereum|base] [--to <allowlisted addr>]
|
|
194
|
+
# CCTP (native USDC) to your wallet (default arbitrum; 0.2 USDC forwarding fee on Arbitrum).
|
|
195
|
+
# --to another address only if it is on settings withdraw.hyperliquid (else POLICY_DENIED).
|
|
196
|
+
perp --json funds withdraw lighter <AMOUNT> # -e lighter: USDC → Ethereum; -e lighter-rh: USDG → Robinhood Chain
|
|
197
|
+
perp --json funds deposit lighter-rh <AMOUNT> # USDG on Robinhood Chain (min 1, mainnet only)
|
|
198
|
+
perp --json funds withdraw ondo <AMOUNT> --to <ADDRESS> # USDC → Ethereum (address-book destination)
|
|
199
|
+
perp --json funds withdraw arcus <AMOUNT> # USDG → the account owner (min 1)
|
|
200
|
+
perp --json funds deposit qfex # prints the USDC / Arbitrum One deposit address (sends nothing)
|
|
201
|
+
perp --json --dry-run funds withdraw qfex <AMOUNT> --to <0x> # plan + local gate verdict (settings withdraw.qfex; user-only, terminal)
|
|
202
|
+
perp --json -e qfex funds transfer <AMOUNT> primary --from <account-uuid> # between your QFEX accounts
|
|
203
|
+
perp --json funds deposit aster <AMOUNT> [--chain bsc|arbitrum] [--asset USDT|USDC] # vault approve + deposit (mainnet; default BNB Chain USDT)
|
|
204
|
+
perp --json funds withdraw aster <AMOUNT> [--chain bsc|arbitrum] [--asset USDT|USDC] # → the account's own address (default USDT; mainnet; agent approved with --can-withdraw --ip-whitelist)
|
|
205
|
+
perp --json funds deposit ondo <AMOUNT> [--chain arbitrum|ethereum] [--probe <AMT>] # USDC transfer to the account's funding address (mainnet)
|
|
206
|
+
perp --json funds address-book add ondo <MASTER_ADDRESS> # SIWE challenge → Ondo withdrawal address book (own address only)
|
|
207
|
+
perp --json funds transfer <AMOUNT> <ADDRESS> # HL internal transfer (instant); destination must be on settings withdraw.hyperliquid
|
|
208
|
+
# settings withdraw.<venue> (allowlist + limits) is set ONLY by the user in an interactive terminal
|
|
209
|
+
# (--json / piped → POLICY_DENIED). Agents never set or change it.
|
|
87
210
|
perp --json funds info # combined routes & limits
|
|
88
211
|
```
|
|
89
212
|
|
|
90
213
|
### Cross-chain bridge (multi-provider router: cctp / relay / debridge — auto-cheapest)
|
|
91
214
|
```bash
|
|
92
|
-
perp --json funds bridge chains
|
|
215
|
+
perp --json funds bridge chains # supported chains
|
|
93
216
|
perp --json funds bridge quote --from <CHAIN> --to <CHAIN> --amount <AMT>
|
|
94
|
-
perp --json funds bridge send --from <CHAIN> --to <CHAIN> --amount <AMT>
|
|
95
|
-
perp --json funds bridge send --from <CHAIN> --to <CHAIN> --amount <AMT> --provider cctp
|
|
96
|
-
|
|
217
|
+
perp --json funds bridge send --from <CHAIN> --to <CHAIN> --amount <AMT>
|
|
218
|
+
perp --json funds bridge send --from <CHAIN> --to <CHAIN> --amount <AMT> --provider cctp [--fast]
|
|
219
|
+
# exactly --amount leaves the wallet; deBridge nativeFee (ETH/SOL) is shown separately;
|
|
220
|
+
# Solana-origin deBridge → NO_BRIDGE_ROUTE (use --provider cctp)
|
|
221
|
+
# Relay swaps (chains: robinhood, arbitrum, bsc, base, solana as destination; EVM origin; OWS master signs; recipient = your own address)
|
|
222
|
+
perp --json --dry-run funds bridge send --from robinhood --to arbitrum --from-asset USDG --to-asset USDC --amount <AMT> # verified quote only
|
|
223
|
+
perp --json funds bridge send --from robinhood --to solana --from-asset USDG --to-asset SOL --amount <AMT> --min-out <SOL> # stable → native needs --min-out
|
|
224
|
+
perp --json funds bridge send --from arbitrum --to robinhood --from-asset ETH --to-asset ETH --amount <ETH> # native gas to Robinhood Chain
|
|
225
|
+
perp --json funds bridge exchange --from <EX> --to <EX> --amount <AMT> # pacifica|hyperliquid|lighter
|
|
226
|
+
# wallet → wallet: bridges the master's OWN USDC between the venues' chains (pacifica → solana,
|
|
227
|
+
# lighter → arbitrum); no venue withdraw/deposit. hyperliquid: --from spends HyperCore spot USDC,
|
|
228
|
+
# --to credits HyperCore perps. HyperCore → Solana → NO_BRIDGE_ROUTE.
|
|
97
229
|
perp --json funds bridge status <ORDER_ID>
|
|
98
230
|
```
|
|
99
231
|
|
|
100
|
-
### Inter-exchange rebalance (
|
|
232
|
+
### Inter-exchange rebalance (withdraw → bridge; deposit is manual)
|
|
101
233
|
```bash
|
|
102
234
|
perp --json funds rebalance check # balances across exchanges
|
|
103
235
|
perp --json funds rebalance plan # compute optimal moves
|
|
104
|
-
perp --json funds rebalance execute --auto-bridge
|
|
236
|
+
perp --json --dry-run funds rebalance execute --auto-bridge # status "simulated" (moves[].status "dry_run") or "balanced"
|
|
237
|
+
perp --json funds rebalance execute --auto-bridge # withdraw → bridge only (NO deposit)
|
|
105
238
|
perp --json funds rebalance execute --withdraw-only # only withdraw, manual rest
|
|
106
239
|
```
|
|
240
|
+
`ok:true` even if a move failed — check every `moves[].status`: `withdrawn` | `bridged` | `same_chain` | `needs_bridge` | `withdraw_failed` | `bridge_failed`. Then deposit by hand after arrival (`funds deposit <venue> <amt>`).
|
|
107
241
|
|
|
108
242
|
## Arbitrage
|
|
243
|
+
|
|
244
|
+
All scan modes are routed through `arb scan`. Legacy aliases (`arb rates`, `arb prices`, `arb dex`, `arb spot-exec`, `arb spot-close`) are removed.
|
|
245
|
+
|
|
109
246
|
```bash
|
|
110
|
-
#
|
|
111
|
-
perp --json arb scan --
|
|
112
|
-
perp --json arb
|
|
113
|
-
perp --json arb
|
|
114
|
-
perp --json arb
|
|
115
|
-
perp --json arb
|
|
247
|
+
# Scan (read-only, safe)
|
|
248
|
+
perp --json arb scan # default --mode all (perp-perp + spot-perp)
|
|
249
|
+
perp --json arb scan --mode perp-perp --min 10 # perp-only with min annual %
|
|
250
|
+
perp --json arb scan --mode spot-perp --min 10 # spot+perp only
|
|
251
|
+
perp --json arb scan --rates # funding rates across exchanges
|
|
252
|
+
perp --json arb scan --basis [SYMBOL] # cross-exchange basis
|
|
253
|
+
perp --json arb scan --gaps # cross-exchange price gaps
|
|
254
|
+
perp --json arb scan --hip3 # HIP-3 cross-dex spreads
|
|
255
|
+
perp --json arb scan --history [SYMBOL] # historical funding
|
|
256
|
+
perp --json arb scan --compare <SYMBOL> # compare a symbol across exchanges
|
|
257
|
+
perp --json arb scan --positions # position funding impact
|
|
258
|
+
perp --json arb scan --live --interval 60 # continuous monitoring
|
|
259
|
+
perp --json arb scan --top 10 --hold-days 7 --bridge-cost 0 --size 100 # cost-aware filtering
|
|
260
|
+
perp --json arb scan --rates --include-unverified # also show QFEX (unverified funding; display only, never ranked)
|
|
261
|
+
# netSpread / grossSpread = annualized % (netSpread = gross minus round-trip costs amortized over --hold-days)
|
|
262
|
+
# spot-perp rows: netSpreadPct / grossSpreadPct, spotExchanges[], perpExchange, direction
|
|
263
|
+
|
|
264
|
+
# Execute (perp-perp or spot+perp via spot:<venue>; spot venues: hl, lt, lrh, aster, ondo)
|
|
265
|
+
# Sequential: long first, then the short sized to the verified long fill; reconcile always on;
|
|
266
|
+
# an unconfirmed leg quarantines the symbol. Supports --dry-run.
|
|
267
|
+
perp --json arb exec <SYM> <longEx> <shortEx> <USD> # perp-perp dual-leg entry
|
|
268
|
+
perp --json arb exec <SYM> spot:hl hl <USD> # spot+perp via HL spot
|
|
269
|
+
perp --json arb exec <SYM> spot:lt pac <USD> # spot+perp via LT spot
|
|
270
|
+
perp --json arb exec <SYM> <longEx> <shortEx> <USD> \
|
|
271
|
+
--leverage 2 --isolated --smart --max-slippage 0.5
|
|
116
272
|
|
|
117
|
-
#
|
|
118
|
-
perp --json arb
|
|
119
|
-
perp --json arb
|
|
120
|
-
perp --json arb
|
|
121
|
-
perp --json arb
|
|
122
|
-
#
|
|
123
|
-
|
|
273
|
+
# Close
|
|
274
|
+
perp --json arb close <SYM> # close perp-perp arb
|
|
275
|
+
perp --json arb close <SYM> --pair <longEx>:<shortEx> # disambiguate by pair
|
|
276
|
+
perp --json arb close <SYM> --spot-exch hl --perp-exch hl # close spot+perp legs
|
|
277
|
+
perp --json arb close <SYM> --smart # IOC limits at best price
|
|
278
|
+
perp --json arb close <SYM> --force # quarantined symbol — only after the user checked positions
|
|
279
|
+
perp --json arb close <SYM> --state-only --yes # drop a stale state entry (no order sent)
|
|
124
280
|
|
|
125
|
-
#
|
|
126
|
-
perp --json arb
|
|
127
|
-
perp --json arb
|
|
128
|
-
perp --json arb
|
|
129
|
-
|
|
281
|
+
# Status / history / config / rebalance
|
|
282
|
+
perp --json arb status # open arb positions + PnL + funding; check unconfirmedPairs, staleStateEntries
|
|
283
|
+
perp --json arb status --period 7 --symbol BTC # filter funding lookback / symbol
|
|
284
|
+
perp --json arb history # alias: arb log
|
|
285
|
+
perp --json arb history --period 30 # past arb trade performance
|
|
286
|
+
perp --json arb config # show arb defaults
|
|
287
|
+
perp --json arb rebalance --check # cross-exchange balance distribution (read-only)
|
|
288
|
+
perp --json arb rebalance --target 50:50 --amount 1000 # plan only; execute with funds rebalance execute
|
|
289
|
+
|
|
290
|
+
# Auto-execute daemon
|
|
291
|
+
perp --json arb auto --min-spread 30 --close-spread 5 --size 100 --max-positions 5
|
|
292
|
+
perp --json arb auto --background # tmux session
|
|
293
|
+
perp --json arb auto --hip3 --min-oi 50000 --min-grade C # HIP-3 mode
|
|
294
|
+
perp --json --dry-run arb auto # simulate (--background inherits it)
|
|
130
295
|
```
|
|
131
296
|
|
|
132
297
|
## Wallet Management
|
|
133
298
|
```bash
|
|
134
|
-
perp --json wallet
|
|
135
|
-
perp --json wallet
|
|
136
|
-
perp --json wallet
|
|
137
|
-
perp --json wallet set hl
|
|
138
|
-
perp --json wallet
|
|
139
|
-
perp --json wallet
|
|
140
|
-
perp --json wallet
|
|
141
|
-
perp --json wallet
|
|
299
|
+
perp --json wallet generate evm # generate EVM wallet
|
|
300
|
+
perp --json wallet generate solana # generate Solana wallet
|
|
301
|
+
printf '%s' "$KEY" | OWS_PASSPHRASE=<pp> perp --json wallet import --name <n> [--chain evm|solana|dual] [--mnemonic] # import a key (stdin / hidden prompt; argv key, --evm/--solana <key>, --legacy rejected)
|
|
302
|
+
printf '%s' "$KEY" | OWS_PASSPHRASE=<pp> perp --json wallet set hl # import key (stdin / hidden prompt; argv key rejected) into OWS vault → active wallet
|
|
303
|
+
perp --json wallet set pac --name pac # Solana key, hidden prompt (TTY)
|
|
304
|
+
perp --json wallet set hl --default # also make hyperliquid the default exchange
|
|
305
|
+
perp --json wallet show # public addresses for active wallet
|
|
306
|
+
perp --json wallet list # all named wallets
|
|
307
|
+
perp --json wallet use <name> # set active wallet
|
|
308
|
+
perp --json wallet rename <old> <new>
|
|
309
|
+
perp --json wallet remove <name>
|
|
310
|
+
perp --json wallet balance # on-chain USDC balances
|
|
311
|
+
perp --json wallet solana <address> # check arbitrary Solana address
|
|
312
|
+
perp --json wallet arbitrum <address> # check arbitrary Arbitrum address
|
|
313
|
+
perp --json wallet migrate # migrate legacy ~/.perp/.env config
|
|
314
|
+
perp --json wallet rotate --from <name> --to <name> [--chain evm] # MUTATING: new wallet + transfers assets; no --dry-run — only on explicit user request
|
|
315
|
+
perp --json wallet backup # encrypted backup
|
|
316
|
+
perp --json wallet restore <file> # restore from backup
|
|
317
|
+
perp --json wallet deposit <walletName> [--for <ex>|-c <chain>] # MoonPay multi-chain deposit (auto-converts to USDC)
|
|
318
|
+
perp --json wallet setup --name <n> --max-tx-usd <usd> --max-daily-usd <usd> [--skip-key]
|
|
319
|
+
# one-click: wallet + policy + agent key.
|
|
320
|
+
# Passphrase prompt unless OWS_PASSPHRASE env is set.
|
|
321
|
+
```
|
|
322
|
+
|
|
323
|
+
### Agent wallet (DEX-side delegation)
|
|
324
|
+
```bash
|
|
325
|
+
# Register an agent (master-signed: user consent; passphrase via OWS_PASSPHRASE / stdin; no --dry-run).
|
|
326
|
+
# Default expires-in is 90d — then AGENT_EXPIRED; pass --expires-in 1y / 180d / etc to extend.
|
|
327
|
+
perp --json wallet agent approve <exchange> \
|
|
328
|
+
[--master <name>] \
|
|
329
|
+
[--agent-name <name>] \
|
|
330
|
+
[--expires-in 30d|90d|180d|1y|<ISO-8601>] \
|
|
331
|
+
[--can-perp|--no-perp] [--can-spot|--no-spot] [--can-withdraw|--no-withdraw] \
|
|
332
|
+
[--rotate] \
|
|
333
|
+
[--ip-whitelist <list>] \
|
|
334
|
+
[--account-index <0-9|255>] # Arcus subaccount
|
|
335
|
+
[--api-key-index <n>] # Lighter slot 4-254 (default: first slot free locally AND on-chain)
|
|
336
|
+
[--force] # Lighter: overwrite an --api-key-index slot that already holds an on-chain key
|
|
337
|
+
|
|
338
|
+
# Import a key the USER created on the exchange WEBSITE (master wallet not needed here).
|
|
339
|
+
# Key on stdin only (one line; ondo: key id + secret; qfex: public key + secret) — an argv key is rejected (INVALID_PARAMS).
|
|
340
|
+
# Verified against the venue before storing (refused → nothing stored); pacifica → "unverified".
|
|
341
|
+
printf '%s' "$AGENT_KEY" | perp --json wallet agent import <exchange> \
|
|
342
|
+
[--master-address <addr>] # aster / pacifica / arcus: required; hyperliquid / lighter: cross-check
|
|
343
|
+
[--account-index <n>] [--api-key-index <n>] # lighter / lighter-rh: required (arcus: optional cross-check)
|
|
344
|
+
[--account-id <uuid>] # qfex: the account the key trades (default primary; required when piped — it confirms the binding)
|
|
345
|
+
[--agent-name <name>] [--expires-in <dur>] [--replace]
|
|
346
|
+
# → data: { source: "imported", masterAddress, agentAddress|publicKey, accountIndex, apiKeyIndex,
|
|
347
|
+
# expiresAt|null, storage, verification: { status: "verified"|"unverified", method } }
|
|
348
|
+
|
|
349
|
+
perp --json wallet agent list [exchange] # rows carry source: "approved" | "imported"
|
|
350
|
+
perp --json wallet agent revoke <exchange> <agentName> [--local-only]
|
|
351
|
+
# imported key: refused unless --local-only (deletes local key + record; still authorized on the
|
|
352
|
+
# exchange — revoke it on the website). --local-only on an approved agent = --force.
|
|
353
|
+
perp --json wallet agent rotate <exchange> [oldAgentName]
|
|
354
|
+
# imported key: refused — create a new key on the website, then import --agent-name <name> --replace
|
|
355
|
+
# verify: --master (Aster/PAC; passphrase via OWS_PASSPHRASE) / --master-address (HL only) / --account-index (Lighter only).
|
|
356
|
+
# Aster: NOT_IMPLEMENTED (no venue endpoint lists agents) — use wallet agent list aster.
|
|
357
|
+
perp --json wallet agent verify [exchange] [agentName] \
|
|
358
|
+
[--master <name>] [--master-address <addr>] [--account-index <n>]
|
|
359
|
+
```
|
|
360
|
+
|
|
361
|
+
### Builder fees (`wallet builder`) — OFF by default
|
|
362
|
+
```bash
|
|
363
|
+
# Nothing is attached unless the user configures it explicitly (strict: format, cap, increment):
|
|
364
|
+
perp --json settings set builder.<venue> <address|code>,<feeBps> --yes # hyperliquid/aster: address; pacifica/ondo: code; --yes required non-interactively
|
|
365
|
+
perp --json settings unset builder.<venue>
|
|
366
|
+
perp --json wallet builder status [venue] # support, config, venue approval, attaches?
|
|
367
|
+
perp --json [--dry-run] wallet builder approve <venue> [--master <name>] [--yes] # master-signed; y/N or --yes
|
|
368
|
+
perp --json [--dry-run] wallet builder revoke <venue> [--master <name>] [--yes] # pacifica / aster
|
|
369
|
+
perp --json --no-builder -e <EX> trade market BTC buy 0.1 # never attach on this run
|
|
370
|
+
# Caps: hyperliquid 10 bps (never HIP-3), pacifica 10 bps max (perp-cli cap; never spot), aster 10 bps (mainnet),
|
|
371
|
+
# ondo 10 bps (no approval; also on position stops). lighter / lighter-rh / arcus → CAPABILITY_UNSUPPORTED.
|
|
372
|
+
# Approval missing/unknown → order sent WITHOUT the fee; execution.notes says why. execution.builderFee records it.
|
|
373
|
+
# No master on this computer → NO_SIGNER_AVAILABLE: approve on the venue website.
|
|
374
|
+
```
|
|
375
|
+
|
|
376
|
+
### Exchange settings (`wallet manage`)
|
|
377
|
+
```bash
|
|
378
|
+
perp --json -e <EX> wallet manage margin <SYMBOL> <cross|isolated>
|
|
379
|
+
perp --json wallet manage account-mode [unified|standard|portfolio] # Hyperliquid only; no arg = show current
|
|
380
|
+
perp --json wallet manage sub create <name> # not supported (CAPABILITY_UNSUPPORTED): the subaccount wallet must co-sign — use the web app
|
|
381
|
+
perp --json wallet manage sub list
|
|
382
|
+
perp --json wallet manage sub transfer <from> <to> <amount> # <from> must be the signing account
|
|
383
|
+
perp --json wallet manage lake create [--manager <address>] [--nickname <name>] [--initial-deposit <amount>]
|
|
384
|
+
perp --json wallet manage lake deposit <lake> <amount> # <lake> = vault address
|
|
385
|
+
perp --json wallet manage lake withdraw <lake> <shares> # shares to redeem, not USDC
|
|
386
|
+
perp --json wallet manage builder overview # Pacifica builder-OWNER tools only (user approvals: wallet builder)
|
|
387
|
+
perp --json wallet manage builder trades <code>
|
|
388
|
+
perp --json wallet manage builder leaderboard <code>
|
|
389
|
+
perp --json wallet manage builder update-fee <code> <feeRate>
|
|
390
|
+
perp --json wallet manage referral claim <code> # Pacifica
|
|
391
|
+
perp --json -e hyperliquid wallet manage referral set [code] # HL / Lighter (-e lighter): signs + sends one referral action; supports --dry-run
|
|
392
|
+
perp --json wallet manage apikey create
|
|
393
|
+
perp --json wallet manage apikey list
|
|
394
|
+
perp --json wallet manage apikey revoke <key>
|
|
395
|
+
```
|
|
396
|
+
|
|
397
|
+
### OWS (Open Wallet Standard) API key + policy — optional, scoped agent tokens
|
|
398
|
+
```bash
|
|
399
|
+
perp --json wallet key create
|
|
400
|
+
perp --json wallet key list
|
|
401
|
+
perp --json wallet key revoke <id>
|
|
402
|
+
perp --json wallet policy create
|
|
403
|
+
perp --json wallet policy list
|
|
404
|
+
perp --json wallet policy show <id>
|
|
405
|
+
perp --json wallet policy delete <id>
|
|
142
406
|
```
|
|
143
407
|
|
|
144
408
|
## Risk & Analytics
|
|
145
409
|
```bash
|
|
146
|
-
perp --json risk status
|
|
147
|
-
perp --json
|
|
148
|
-
perp --json risk
|
|
149
|
-
perp --json risk limits
|
|
150
|
-
perp --json risk
|
|
151
|
-
|
|
152
|
-
|
|
153
|
-
perp --json
|
|
154
|
-
|
|
155
|
-
|
|
156
|
-
|
|
157
|
-
|
|
158
|
-
perp --json history list
|
|
159
|
-
|
|
160
|
-
|
|
161
|
-
|
|
162
|
-
|
|
163
|
-
perp --json
|
|
164
|
-
perp --json
|
|
165
|
-
perp --json
|
|
166
|
-
perp --json
|
|
167
|
-
perp --json
|
|
168
|
-
perp --json
|
|
169
|
-
perp --json
|
|
170
|
-
perp --json
|
|
171
|
-
|
|
410
|
+
perp --json risk status # portfolio risk overview (level, violations, canTrade)
|
|
411
|
+
perp --json health # adapter health: ping venue REST endpoints (connectivity + latency)
|
|
412
|
+
perp --json risk liquidation-distance # % distance from liquidation for ALL positions
|
|
413
|
+
perp --json risk limits # view current risk limits
|
|
414
|
+
perp --json risk limits --min-liq-distance 30 --max-leverage 5 # set risk limits (also --max-position[-pct], --max-exposure[-pct], --max-positions, --daily-loss[-pct], --max-drawdown[-pct], --max-margin, --reset)
|
|
415
|
+
# The order gate (trade market/buy/sell/limit/split/scale-in/twap/multi, stop --no-reduce-only) enforces
|
|
416
|
+
# max position / total exposure / max positions; reduce-only exempt; --force bypasses (user consent only).
|
|
417
|
+
perp --json risk check --notional 1000 --leverage 3 # pre-trade risk check
|
|
418
|
+
```
|
|
419
|
+
|
|
420
|
+
## History (execution log + analytics)
|
|
421
|
+
```bash
|
|
422
|
+
perp --json history list # execution audit trail
|
|
423
|
+
perp --json history positions # position lifetime tracking
|
|
424
|
+
perp --json history prune # purge old entries
|
|
425
|
+
perp --json history summary # trading performance summary (replaces former 'stats')
|
|
426
|
+
perp --json history pnl # P&L breakdown by exchange
|
|
427
|
+
perp --json history funding # funding payment aggregation
|
|
428
|
+
perp --json history report # full performance report (summary + pnl + funding)
|
|
429
|
+
perp --json history compare # compare strategies / accounts
|
|
430
|
+
perp --json history snapshot # equity snapshot
|
|
431
|
+
perp --json history track # PnL tracking helper
|
|
432
|
+
perp --json history perf --period daily # daily PnL breakdown
|
|
433
|
+
perp --json history perf --period weekly # weekly PnL breakdown
|
|
434
|
+
perp --json history perf --period summary # performance summary stats
|
|
435
|
+
```
|
|
436
|
+
|
|
437
|
+
## Strategies (`perp strategy` — 20 algorithms + nested scripted plans)
|
|
438
|
+
```bash
|
|
439
|
+
perp --json strategy list-strategies # list all 20 strategies
|
|
440
|
+
perp --json strategy run <STRATEGY> [SYMBOL] [--exchanges <list>] # multi-venue strategies: --exchanges must include the -e venue
|
|
441
|
+
perp --json --dry-run strategy run <STRATEGY> [SYMBOL] # simulate (actions logged, never sent)
|
|
442
|
+
perp --json strategy run funding-auto # multi-exchange funding arb
|
|
443
|
+
perp --json strategy apex [SYMBOL] # APEX orchestrator
|
|
444
|
+
perp --json strategy reflect # performance analysis
|
|
445
|
+
perp --json strategy preset-list
|
|
446
|
+
perp --json strategy preset <NAME> [SYMBOL] [--size <n>] # grid: total base; DCA: base per order; arb: $ per leg
|
|
447
|
+
perp --json strategy start <CONFIG.yaml> # YAML/JSON config-driven
|
|
448
|
+
perp --json strategy quick-grid <SYMBOL>
|
|
449
|
+
perp --json strategy quick-dca <SYMBOL> <SIDE> <AMOUNT> <INTERVAL_SEC> [--orders <n>] # 0 = unlimited
|
|
450
|
+
perp --json strategy quick-arb
|
|
451
|
+
perp --json strategy delta-neutral
|
|
452
|
+
perp --json strategy twap <SYMBOL> <SIDE> <SIZE> <DURATION>
|
|
453
|
+
perp --json strategy grid <SYMBOL> --upper <PRICE> --lower <PRICE> --grids <N> --size <BASE> [--close-on-stop]
|
|
454
|
+
# at stop: orders cancelled; the grid's inventory stays OPEN (warning) unless --close-on-stop
|
|
172
455
|
perp --json strategy dca <SYMBOL> <SIDE> <AMOUNT> <INTERVAL>
|
|
173
|
-
perp --json strategy trailing-stop <SYMBOL>
|
|
174
|
-
perp --json strategy funding-arb
|
|
175
|
-
|
|
176
|
-
|
|
456
|
+
perp --json strategy trailing-stop <SYMBOL>
|
|
457
|
+
perp --json strategy funding-arb [--auto-execute] # monitor only unless --auto-execute
|
|
458
|
+
|
|
459
|
+
# Quarantine (unknown / unhedged outcome): global per symbol, network-scoped; blocks opening orders,
|
|
460
|
+
# arb exec / arb auto and bots (reduce-only passes). Clear only after the USER verified positions.
|
|
461
|
+
perp --json strategy quarantine
|
|
462
|
+
perp --json strategy quarantine-clear <SYMBOL> [--strategy <source>]
|
|
177
463
|
|
|
178
464
|
# Scripted execution plans (one-shot multi-step)
|
|
179
|
-
perp --json strategy plan example
|
|
180
|
-
perp --json strategy plan validate <FILE>
|
|
181
|
-
perp --json strategy plan execute <FILE>
|
|
465
|
+
perp --json strategy plan example
|
|
466
|
+
perp --json strategy plan validate <FILE>
|
|
467
|
+
perp --json --dry-run strategy plan execute <FILE>
|
|
468
|
+
# No --dry-run (refused with INVALID_PARAMS): strategy start / preset / quick-* / grid / dca / twap / funding-arb / apex
|
|
469
|
+
```
|
|
470
|
+
|
|
471
|
+
### Available Strategies (20)
|
|
472
|
+
- **Market Making:** `simple-mm`, `engine-mm`, `avellaneda-mm`, `regime-mm`, `grid-mm`, `liquidation-mm`
|
|
473
|
+
- **Signal/Directional:** `momentum-breakout`, `mean-reversion`, `aggressive-taker`
|
|
474
|
+
- **Arbitrage:** `funding-arb`, `funding-arb-v2`, `funding-auto`, `basis-arb`, `spot-perp-arb`
|
|
475
|
+
- **Infrastructure:** `hedge-agent`, `rfq-agent`, `claude-agent`
|
|
476
|
+
- **Classic:** `grid`, `dca`, `apex`
|
|
477
|
+
|
|
478
|
+
## Background Process Supervisor (tmux)
|
|
479
|
+
```bash
|
|
480
|
+
perp --json background list # list running jobs (default subcommand)
|
|
481
|
+
perp --json background stop <ID> [--timeout <sec>] # graceful: SIGINT (job cancels its orders, saves state), waits (default 90s), then kills; reports what is left on the venue
|
|
482
|
+
perp --json background logs <ID> # view logs (use -f to follow)
|
|
483
|
+
perp --json background remove <ID> # remove a job entry
|
|
484
|
+
perp --json background clean # purge all stopped/done jobs
|
|
485
|
+
```
|
|
182
486
|
|
|
183
|
-
|
|
184
|
-
|
|
185
|
-
perp --json
|
|
186
|
-
perp --json
|
|
187
|
-
|
|
188
|
-
|
|
487
|
+
## Backtest
|
|
488
|
+
```bash
|
|
489
|
+
perp --json backtest funding-arb # backtest funding arb on historical data
|
|
490
|
+
perp --json backtest grid # backtest grid strategy
|
|
491
|
+
```
|
|
492
|
+
|
|
493
|
+
## Alerts (Telegram / Discord)
|
|
494
|
+
```bash
|
|
495
|
+
perp alerts setup # interactive setup wizard
|
|
496
|
+
perp --json alerts test # send test message
|
|
497
|
+
perp --json alerts add <SYMBOL> <PCT> [--exchange <venue>] [--below] # annual funding % threshold (default: above)
|
|
498
|
+
perp --json alerts add --all <PCT> # alert for any symbol
|
|
499
|
+
perp --json alerts list # list active rules
|
|
500
|
+
perp --json alerts remove <SYMBOL|all> # remove a rule
|
|
501
|
+
perp alerts start [--background] # run daemon (tmux for background)
|
|
502
|
+
perp alerts stop # stop background daemon
|
|
189
503
|
```
|
|
190
504
|
|
|
191
|
-
|
|
192
|
-
|
|
193
|
-
|
|
194
|
-
|
|
195
|
-
|
|
196
|
-
|
|
505
|
+
## Settings
|
|
506
|
+
```bash
|
|
507
|
+
perp --json settings show # show current CLI settings
|
|
508
|
+
perp --json settings set <key> <value> # set a CLI default
|
|
509
|
+
# keys: default-exchange, defaultSlippageBps, slippageBps.<venue>, referralCodes.{hyperliquid,lighter},
|
|
510
|
+
# builder.<venue> "<address|code>,<feeBps>" (off unless set), bridge.debridgeAffiliate.{referralCode,fee}
|
|
511
|
+
perp --json settings unset <key> # slippageBps.<venue> | defaultSlippageBps | builder.<venue> | withdraw.<venue> | bridge.debridgeAffiliate
|
|
512
|
+
# withdraw.<venue> (withdraw / HL transfer allowlist + limits): USER ONLY, interactive terminal; agents never set it (POLICY_DENIED)
|
|
513
|
+
perp --json settings fees show # cached exchange fee table
|
|
514
|
+
perp --json settings fees sync # refresh fee cache
|
|
515
|
+
perp --json settings env show # show ~/.perp/.env values
|
|
516
|
+
perp --json settings env set <name> <value> # non-secret values only (keys / *_PRIVATE_KEY / secrets → INVALID_PARAMS; use wallet set)
|
|
517
|
+
perp --json settings env remove <name>
|
|
518
|
+
perp --json settings env path # config file path
|
|
519
|
+
```
|
|
197
520
|
|
|
198
|
-
##
|
|
521
|
+
## Init / Setup
|
|
199
522
|
```bash
|
|
200
|
-
|
|
201
|
-
perp
|
|
202
|
-
perp
|
|
203
|
-
|
|
204
|
-
|
|
523
|
+
# Interactive default — DO NOT use from agent without flags (will hang on prompts).
|
|
524
|
+
perp setup # alias: perp init
|
|
525
|
+
perp init
|
|
526
|
+
|
|
527
|
+
# Agent-safe non-interactive variant (writes settings; signs nothing by default):
|
|
528
|
+
OWS_PASSPHRASE=<pp> perp --json [-n testnet] setup --non-interactive \
|
|
529
|
+
(--wallet <existing-ows-wallet> | --wallet-name <new-name>) \
|
|
530
|
+
[--venues <list>] [--default-venue <venue>] \
|
|
531
|
+
[--slippage-bps <n>] [--slippage <venue>=<bps> ...]
|
|
532
|
+
# Agent registration (signs with the master wallet — get user consent first):
|
|
533
|
+
# --approve-agents --yes [--aster-can-spot] [--lighter-api-key-index <n>]
|
|
534
|
+
# [--lighter-rh-api-key-index <n>] [--arcus-account-index <0-9|255>]
|
|
535
|
+
# [--ondo-secret-stdin] # Ondo key id + secret as 2 stdin lines; passphrase then via OWS_PASSPHRASE
|
|
536
|
+
# Keys created on the exchange WEBSITES (no master wallet needed when every venue is imported —
|
|
537
|
+
# then omit --wallet / --wallet-name; owsActiveWallet is left unchanged):
|
|
538
|
+
# --import-agents <venues> --yes # subset of --venues; keys on stdin, ONE LINE PER VENUE IN THIS ORDER
|
|
539
|
+
# # (ondo: 2 lines — key id, then secret; qfex: 2 lines — public key, then secret)
|
|
540
|
+
# [--master-address <venue>=<addr> ...] # required for aster, pacifica, arcus
|
|
541
|
+
# [--allow-unverified pacifica] # required for pacifica (no read-only check exists)
|
|
542
|
+
# [--qfex-account-id <uuid>] # required for qfex (confirms the bound account)
|
|
543
|
+
# [--lighter-account-index <n>] [--lighter-api-key-index <n>]
|
|
544
|
+
# [--lighter-rh-account-index <n>] [--lighter-rh-api-key-index <n>] [--arcus-account-index <n>]
|
|
545
|
+
# agents[] entries: { venue, status: "imported", agentName, verification }
|
|
205
546
|
```
|
|
547
|
+
|
|
548
|
+
For per-exchange key registration without the wizard, use `printf '%s' "$KEY" | OWS_PASSPHRASE=<pp> perp wallet set <ex>` — also agent-safe (key on stdin, never argv).
|