Skip to content

bullpen hyperliquid spot buy

Last updated: July 13, 2026

Place a Hyperliquid spot buy

Usage

bullpen hyperliquid spot buy [OPTIONS] --pair <PAIR> --price <PRICE> --size <SIZE>

Live Help

Place a Hyperliquid spot buy

Usage: bullpen hyperliquid spot buy [OPTIONS] --pair <PAIR> --price <PRICE> --size <SIZE>

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

      --pair <PAIR>
          Hyperliquid spot pair (for example, HYPE/USDC)

      --env <ENV>
          Target environment to connect to (overrides config.toml)

          [env: BULLPEN_ENV=]
          [possible values: staging, production]

      --price <PRICE>
          Limit price in quote units

      --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>
          Base-token size, not USD notional

      --tif <TIF>
          Time-in-force for the spot order. `alo` is post-only; `gtc` and `alo` may leave resting spot orders

          Possible values:
          - gtc: Good-till-cancelled: rests on the book until explicitly cancelled
          - ioc: Immediate-or-cancel: fills what it can immediately and cancels the rest
          - alo: Add-liquidity-only: post-only, rejects if it would cross the spread

          [default: ioc]

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

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

          [env: BULLPEN_NON_INTERACTIVE=]

      --preview
          Resolve the pair and show the planned order without signing or submitting

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

EXAMPLES:
  # Preview a HYPE/USDC spot buy without signing or submitting
  bullpen hyperliquid spot buy --pair HYPE/USDC --price 25 --size 0.5 --preview

  # Export the spot buy preview as JSON
  bullpen hyperliquid spot buy --pair HYPE/USDC --price 25 --size 0.5 --preview --output json

SIZING:
  --size is base-token size; rounded price * size must be at least 10 USD.
  --tif supports ioc, gtc, and alo. Resting gtc/alo spot orders can be listed
  with `spot orders`, inspected with `spot order-status`, and canceled with
  `spot cancel` or `spot cancel-all`.

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 spot trades do not create, approve, or consume API/agent
  wallet slots.

Example Commands

bullpen hyperliquid spot buy --pair HYPE/USDC --price 25 --size 0.5 --preview
bullpen hyperliquid spot buy --pair HYPE/USDC --price 25 --size 0.5 --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 Spot order preview/report schema version when emitted
kind string yes hyperliquid_spot_order_preview for preview JSON
asset_type string no Always spot
market_type string no Always spot
pair string no Spot pair such as HYPE/USDC
asset_id integer no Canonical Hyperliquid spot asset id
side string no buy or sell
reduce_only boolean no Always false for spot order previews
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
intent object yes Structured spot order intent echoed for preview output

Example

Example JSON output
bullpen hyperliquid spot buy --pair HYPE/USDC --price 25 --size 0.5 --preview --output json
{
  "schema_version": 1,
  "kind": "hyperliquid_spot_order_preview",
  "asset_type": "spot",
  "market_type": "spot",
  "pair": "HYPE/USDC",
  "asset_id": 10001,
  "side": "buy",
  "reduce_only": false,
  "would_submit": false,
  "signature_requested": false,
  "exchange_request_submitted": false,
  "intent": {
    "action": "spot-buy",
    "pair": "HYPE/USDC",
    "asset_id": 10001,
    "price": "25",
    "size": "0.1",
    "tif": "ioc"
  }
}

Under-Minimum Notional Error

If the rounded price * size is below Hyperliquid's 10 USD minimum notional, the command fails before signing or submitting.

Example JSON error
bullpen hyperliquid spot buy --pair HYPE/USDC --price 70 --size 0.12 --preview --output json
{
  "status": "error",
  "error_code": "HYPERLIQUID_ORDER_TOO_SMALL",
  "class": "hyperliquid_order_too_small",
  "requires_auth": false,
  "requires_login": false,
  "retryable": false,
  "pair": "HYPE/USDC",
  "minimum_notional_usd": "10",
  "estimated_notional_usd": "8.4",
  "price": "70",
  "size": "0.12"
}

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.