bullpen hyperliquid stop-loss¶
Last updated: July 13, 2026
Place a reduce-only stop-loss order for an existing position (requires hyperliquid_trading feature)
Usage¶
Live Help¶
Place a reduce-only stop-loss order for an existing position (requires hyperliquid_trading feature)
Usage: bullpen hyperliquid stop-loss [OPTIONS] --trigger-price <TRIGGER_PRICE> <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]
--trigger-price <TRIGGER_PRICE>
Trigger price
--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.
--size <SIZE>
Legacy size flag. Defaults to base-token units for TP/SL; pair with --size-unit usd to interpret as USD notional. Omit to cover the full open position
--size-unit <SIZE_UNIT>
Explicit unit for legacy --size. Valid only with --size
Possible values:
- usd: Interpret --size as USD notional
- base: Interpret --size as base-token size
--base-size <BASE_SIZE>
Position size in base-token units, not USD notional. Omit to cover the full open position
--notional <NOTIONAL>
USD notional size. Omit size flags to cover the full open position
--limit <LIMIT>
Submit a trigger-limit order instead of a market-style SL child order
--read-only
Enable read-only mode: blocks all mutating commands
--builder-address <BUILDER_ADDRESS>
Debug-only builder attribution override. Requires --builder-fee-bps and BULLPEN_HYPERLIQUID_ALLOW_BUILDER_OVERRIDE=1
--non-interactive
Suppress interactive prompts; does NOT imply --yes for money-moving commands
[env: BULLPEN_NON_INTERACTIVE=]
--builder-fee-bps <BUILDER_FEE_BPS>
Debug-only builder fee cap override in basis points. Requires --builder-address and BULLPEN_HYPERLIQUID_ALLOW_BUILDER_OVERRIDE=1
--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
-y, --yes
Skip confirmation prompt
--preview
Show trigger side, PnL, ROI, and fee estimates without signing or submitting
-h, --help
Print help (see a summary with '-h')
EXAMPLES:
# Preview a reduce-only stop-loss without signing or submitting
bullpen hyperliquid stop-loss BTC --trigger-price 55000 --base-size 0.25 --preview
# Export the stop-loss preview as JSON
bullpen hyperliquid stop-loss BTC --trigger-price 55000 --base-size 0.25 --preview --output json
SIZING:
Prefer --base-size for partial TP/SL size, or --notional when you want to
size the TP/SL by USD notional. Legacy --size remains supported as a
base-token-size alias unless paired with --size-unit usd. Omit size flags to
target the full open position.
ACCOUNT SCOPE:
Without --subaccount or --vault, this targets the active EVM master account.
With --subaccount or --vault, Hyperliquid uses that execution context but
Bullpen still signs with the active EVM master wallet. Normal Hyperliquid
trades do not create, approve, or consume Hyperliquid API/agent wallet slots.
Example Commands¶
bullpen hyperliquid stop-loss BTC --trigger-price 55000 --base-size 0.25 --preview
bullpen hyperliquid stop-loss BTC --trigger-price 55000 --base-size 0.25 --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. Live submit output uses the standard Hyperliquid mutation-report schema instead.
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 | no | Always 1 for trigger preview output |
kind |
string | no | Always hyperliquid_trigger_preview for preview output |
action |
string | no | take-profit or stop-loss |
coin |
string | no | Hyperliquid market symbol |
side |
string | no | Reduce direction: sell for long positions, buy for short positions |
reduce_only |
boolean | no | Always true for trigger previews |
trigger_kind |
string | no | Trigger kind matching the command |
trigger_px |
string | no | Effective trigger price after Hyperliquid price precision |
limit_px |
string | yes | Optional effective trigger-limit child price after Hyperliquid price precision; omitted for market-style trigger children |
requested_base_size |
string | no | Base-unit size requested by --base-size or legacy --size, or the full open position when omitted |
effective_base_size |
string | no | Base-unit size used for the preview after Hyperliquid size precision |
base_unit_symbol |
string | no | Base asset symbol, included to make TP/SL base-unit sizing explicit |
position_size |
string | no | Signed open position size; positive is long, negative is short |
position_direction |
string | no | long or short |
mark_px |
string | no | Current mark price used for side-of-mark validation |
entry_px |
string | no | Position entry price used for PnL and ROI |
leverage |
integer | no | Current position leverage used for ROI |
pnl_at_trigger_usd |
string | no | Estimated PnL at trigger as a signed USD decimal string |
price_change_pct |
string | no | Unlevered percent move from entry to trigger |
roi_pct |
string | no | Leveraged ROI percent at trigger |
risk_reward_ratio |
string | yes | Omitted for single-leg previews; reserved for future bracket previews |
estimated_taker_fee_usd |
string | no | Estimated taker fee at trigger notional |
estimated_builder_fee_usd |
string | no | Estimated builder fee from configured or per-command override builder attribution; 0 when no builder fee is configured |
builder_address |
string | yes | Configured or override builder address used for the preview; omitted/null when no builder attribution applies |
builder_fee_bps |
number | yes | Configured or override builder fee cap in basis points; omitted/null when no builder attribution applies |
builder_override_active |
boolean | yes | true only when env-gated per-command builder override flags were used |
estimated_total_fee_usd |
string | no | Sum of estimated taker and builder fees |
would_submit |
boolean | no | Always false in preview output |
signature_requested |
boolean | no | Always false in preview output |
exchange_request_submitted |
boolean | no | Always false in preview output |
warning |
string | yes | Optional warning, such as a trigger very close to mark price |
request |
object | no | Echo of the preview request |
Live --yes stop-loss submissions attach configured builder attribution, or an env-gated per-command override when supplied, and may perform the one-time builder approval before order placement.
Example¶
Example JSON output
{
"schema_version": 1,
"kind": "hyperliquid_trigger_preview",
"action": "stop-loss",
"coin": "BTC",
"side": "sell",
"reduce_only": true,
"trigger_kind": "stop-loss",
"trigger_px": "55000",
"requested_base_size": "0.25",
"effective_base_size": "0.25",
"base_unit_symbol": "BTC",
"position_size": "0.5",
"position_direction": "long",
"mark_px": "65000",
"entry_px": "60000",
"leverage": 5,
"pnl_at_trigger_usd": "-1250",
"price_change_pct": "-8.333333333333333333333333333",
"roi_pct": "-41.666666666666666666666666665",
"estimated_taker_fee_usd": "4.8125",
"estimated_builder_fee_usd": "0",
"builder_address": null,
"builder_fee_bps": null,
"builder_override_active": null,
"estimated_total_fee_usd": "4.8125",
"would_submit": false,
"signature_requested": false,
"exchange_request_submitted": false,
"request": {
"action": "stop-loss",
"coin": "BTC",
"trigger_kind": "stop-loss",
"trigger_px": "55000",
"size_base": "0.25"
}
}
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.