bullpen hyperliquid tpsl clear¶
Last updated: July 13, 2026
Preview or submit canceling existing TP/SL legs without manual OID lookup
Usage¶
Live Help¶
Preview or submit canceling existing TP/SL legs without manual OID lookup
Usage: bullpen hyperliquid tpsl clear [OPTIONS] <--take-profit|--stop-loss|--all> <COIN>
Arguments:
<COIN>
Coin/market (e.g. "ETH", "BTC")
Options:
--dex <DEX>
HIP-3 perpetual DEX id (for example, `xyz` for TradeXYZ). If COIN is prefixed as `dex:symbol`, the prefix infers this value
--no-multi-wallet-warning
Suppress the table-mode warning shown when multiple EVM wallet accounts exist
--output <OUTPUT>
Output format for command results
[possible values: table, json]
--env <ENV>
Target environment to connect to (overrides config.toml)
[env: BULLPEN_ENV=]
[possible values: staging, production]
--take-profit
Preview clearing the current take-profit leg
--config <CONFIG>
Path to a custom config.toml file (overrides $BULLPEN_CONFIG and the default location).
Explicit --config and BULLPEN_CONFIG paths fail closed: if the file is missing, the CLI exits validation instead of silently loading defaults. Credentials still resolve via BULLPEN_HOME, so set BULLPEN_HOME too when isolating a session.
--stop-loss
Preview clearing the current stop-loss leg
--all
Preview clearing all current TP/SL legs for the coin
--subaccount <SUBACCOUNT>
Target a Hyperliquid subaccount execution context. Without --subaccount or --vault, the command targets the active EVM master account. Scoped submits still sign with the active EVM master wallet. Mutually exclusive with --vault
--vault <VAULT>
Target a Hyperliquid vault execution context. Without --subaccount or --vault, the command targets the active EVM master account. Scoped submits still sign with the active EVM master wallet. Mutually exclusive with --subaccount
--read-only
Enable read-only mode: blocks all mutating commands
-y, --yes
Skip confirmation prompt and submit after re-reading current TP/SL orders
--non-interactive
Suppress interactive prompts; does NOT imply --yes for money-moving commands
[env: BULLPEN_NON_INTERACTIVE=]
--preview
Show the planned lifecycle changes without signing or submitting
-h, --help
Print help (see a summary with '-h')
EXAMPLES:
# Preview clearing the current BTC take-profit
bullpen hyperliquid tpsl clear BTC --take-profit --preview
# Submit a confirmed clear for the current BTC take-profit
bullpen hyperliquid tpsl clear BTC --take-profit --yes
# Preview clearing both current BTC TP/SL legs
bullpen hyperliquid tpsl clear BTC --all --preview --output json
SAFETY:
--preview reads frontendOpenOrders and prints planned cancel/no-op rows
without signing or submitting /exchange. Live --yes re-reads current TP/SL
orders before signing. Clearing missing legs is reported as a no-op. Builder
approval is never used for clear/cancel legs.
VALIDATION NOTE: Live validation covers disposable-position take-profit create/show/clear
and final flatness. Full positionTpsl replacement remains validation/deferral gated.
Example Commands¶
bullpen hyperliquid tpsl clear BTC --take-profit --preview
bullpen hyperliquid tpsl clear BTC --take-profit --yes
bullpen hyperliquid tpsl clear BTC --all --preview --output json
JSON Output¶
Contract: JSON Output Contract.
Preview (--preview --output json)¶
Preview output is a single JSON document emitted only when --preview --output json is passed. It includes explicit no-submit safety fields; live submit output uses the corresponding Hyperliquid mutation-report schema.
Schema version: 1 when a command emits schema_version; otherwise treat the current command shape as contract version 1.
Top-level Keys¶
| key | type | nullable | notes |
|---|---|---|---|
schema_version |
integer | yes | TP/SL lifecycle preview/report schema version when emitted |
kind |
string | yes | hyperliquid_tpsl_preview for preview JSON |
action |
string | no | tpsl-modify or tpsl-clear |
account |
string | no | Active Hyperliquid master account |
coin |
string | no | Hyperliquid market symbol |
planned_legs |
array | no | Planned modify/create/cancel/no-op legs |
planned_modify_count |
integer | yes | Planned batchModify leg count |
planned_create_count |
integer | yes | Planned replacement create leg count |
planned_cancel_count |
integer | yes | Planned cancel leg count |
would_submit |
boolean | no | False in preview output |
signature_requested |
boolean | no | False in preview output |
exchange_request_submitted |
boolean | no | False in preview output |
builder_fee_approval_submitted |
boolean | no | False in preview output |
builder_approval_requested |
boolean | no | False in preview output |
Example¶
Example JSON output
{
"schema_version": 1,
"kind": "hyperliquid_tpsl_preview",
"action": "tpsl-clear",
"account": "0x1111111111111111111111111111111111111111",
"coin": "BTC",
"planned_modify_count": 0,
"planned_create_count": 0,
"planned_cancel_count": 2,
"would_submit": false,
"signature_requested": false,
"exchange_request_submitted": false,
"builder_fee_approval_submitted": false,
"builder_approval_requested": false,
"planned_legs": [
{
"trigger_kind": "take-profit",
"action": "cancel"
},
{
"trigger_kind": "stop-loss",
"action": "cancel"
}
]
}
Stability¶
Patch releases may add nullable or optional fields. Minor releases may add required fields or increment schema_version. Major releases may remove or rename fields.