Skip to content

bullpen hyperliquid pair open

Last updated: July 13, 2026

Open a Pear pair position

Usage

bullpen hyperliquid pair open [OPTIONS] --long <LONG> --short <SHORT> --size-usd <SIZE_USD>

Live Help

Open a Pear pair position

Usage: bullpen hyperliquid pair open [OPTIONS] --long <LONG> --short <SHORT> --size-usd <SIZE_USD>

Options:
      --long <LONG>
          Long leg. Repeatable. Use ASSET or ASSET=WEIGHT; weights are portfolio weights across long and short legs

      --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]

      --short <SHORT>
          Short leg. Repeatable. Use ASSET or ASSET=WEIGHT; weights are portfolio weights across long and short legs

      --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.

      --rebalance
          Ignore explicit leg weights and submit a 50% long / 50% short portfolio, equal within each side

      --size-usd <SIZE_USD>
          Total pair position size in USD

      --leverage <LEVERAGE>
          Pair leverage, 1-100

          [default: 1]

      --slippage <SLIPPAGE>
          Slippage as a decimal fraction, 0.001-0.1 (0.1%-10%)

          [default: 0.01]

      --read-only
          Enable read-only mode: blocks all mutating commands

      --twap-minutes <TWAP_MINUTES>
          Use Pear TWAP execution over this many minutes instead of market execution

      --non-interactive
          Suppress interactive prompts; does NOT imply --yes for money-moving commands

          [env: BULLPEN_NON_INTERACTIVE=]

      --twap-interval-seconds <TWAP_INTERVAL_SECONDS>
          TWAP interval in seconds. Pear defaults to 30 seconds when omitted

      --randomize
          Randomize TWAP execution timing

      --take-profit <TAKE_PROFIT>
          Initial take-profit threshold value. Not valid for TWAP orders

      --take-profit-type <TAKE_PROFIT_TYPE>
          Initial take-profit threshold type

          [default: percentage]
          [possible values: percentage, dollar, position-value, price, price-ratio, weighted-ratio]

      --stop-loss <STOP_LOSS>
          Initial stop-loss threshold value. Not valid for TWAP orders

      --stop-loss-type <STOP_LOSS_TYPE>
          Initial stop-loss threshold type

          [default: percentage]
          [possible values: percentage, dollar, position-value, price, price-ratio, weighted-ratio]

      --trailing-stop
          Make the initial stop-loss a trailing stop

      --trailing-delta <TRAILING_DELTA>
          Trailing-stop delta value. Required when --trailing-stop is set

      --trailing-activation <TRAILING_ACTIVATION>
          Optional trailing-stop activation value

      --preview
          Show the Pear order body and setup status without signing/submitting

  -y, --yes
          Required confirmation flag for live Pear order submission

  -h, --help
          Print help (see a summary with '-h')

EXAMPLES:
  # Preview a BTC-vs-ETH pair trade
  bullpen hyperliquid pair open --long BTC=0.5 --short ETH=0.5 --size-usd 22 --preview

  # Submit a confirmed market pair trade
  bullpen hyperliquid pair open --long BTC=0.5 --short ETH=0.5 --size-usd 22 --leverage 3 --yes

  # Preview a market pair trade with initial TP/SL thresholds
  bullpen hyperliquid pair open --long BTC=0.5 --short ETH=0.5 --size-usd 22 --take-profit 10 --stop-loss 5 --preview

  # Submit a TWAP pair trade over 30 minutes
  bullpen hyperliquid pair open --long BTC=0.5 --short ETH=0.5 --size-usd 22 --twap-minutes 30 --yes

PEAR PREREQUISITES:
  Use `bullpen status --output json` and `bullpen doctor auth --output json`
  to confirm the active Bullpen-managed EVM wallet. Run `bullpen login` only
  when diagnostics report login is required. Enable `hyperliquid` for reads/status and
  `hyperliquid_trading` before live pair orders. Run
  `bullpen hyperliquid pair setup --preview` to inspect session, Pear agent,
  Hyperliquid agent, and builder-fee readiness before submitting.

SAFETY:
  Preview never signs or submits. Setup/deposit blockers return guidance before
  signing or submitting. Pear service-side auth rejection after a live write is
  no-replay; inspect pair positions and orders before retrying.

Example Commands

bullpen hyperliquid pair open --long BTC=0.5 --short ETH=0.5 --size-usd 22 --preview
bullpen hyperliquid pair open --long BTC=0.5 --short ETH=0.5 --size-usd 22 --leverage 3 --yes
bullpen hyperliquid pair open --long BTC=0.5 --short ETH=0.5 --size-usd 22 --take-profit 10 --stop-loss 5 --preview
bullpen hyperliquid pair open --long BTC=0.5 --short ETH=0.5 --size-usd 22 --twap-minutes 30 --yes

JSON Output

Contract: JSON Output Contract.

Live --yes --output json output uses a stable Pear open result envelope:

{
  "kind": "hyperliquid_pear_open_result",
  "schema_version": 1,
  "source": "pear",
  "account": "0x1111111111111111111111111111111111111111",
  "success": true,
  "status": "ok",
  "position_id": "pear-position-1",
  "order_id": "pear-order-1",
  "order_ids": ["pear-order-1"],
  "readback_required": false,
  "next_command": null,
  "data": {
    "status": "ok",
    "positionId": "pear-position-1",
    "orderId": "pear-order-1"
  }
}

position_id is set only when Pear returns a position identifier in the backend response. When Pear accepts the open but does not return a position ID synchronously, success remains true, readback_required is true, and next_command is bullpen hl pair positions --output json.

Error output follows the shared JSON output contract linked above.

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.