Skip to main content

Webull CLI

Command-line trading tool for AI Agents, quant developers, and institutional clients. Full coverage of US market: stocks/ETFs, options, futures, crypto, and event contracts.

Source code: webull-inc/webull-openapi-cli


What is Webull CLI

Webull CLI (webull) is a single-binary Go tool that wraps the full Webull OpenAPI surface into a structured command-line interface. It provides complete access to all 5 asset classes with the richest feature set across all supported markets.

Capabilities

Asset ClassTradingMarket Data
Stocks/ETFs
Options
Futures
Crypto
Event Contracts

Architecture Overview


Prerequisites

API Credentials

Apply based on your account type:

Individual users: Individual Application Process

Institutional users: Institution Application Process

Other Requirements

  • Go 1.21+ (for go install) or download pre-built binary
  • Webull App (if 2FA verification is required)
  • Market Data Subscription (for real-time quotes): Subscription Guide

Setup Steps

Step 1: Install Go Environment

Check if Go is already installed:

go version

If not installed or version is below 1.21, install Go:

# macOS (Homebrew)
brew install go

# Linux
wget https://go.dev/dl/go1.22.5.linux-amd64.tar.gz
sudo tar -C /usr/local -xzf go1.22.5.linux-amd64.tar.gz
export PATH=$PATH:/usr/local/go/bin

# Windows — download installer from https://go.dev/dl/

Verify Go installation:

go version
# Expected: go version go1.21+ or higher

Step 2: Install Webull CLI

go install github.com/webull-inc/webull-openapi-cli/cmd/webull@latest

Or download pre-built binary from GitHub Releases.

Ensure $GOPATH/bin is in your PATH:

export PATH=$PATH:$(go env GOPATH)/bin

Verify:

webull version

Step 3: Authenticate

webull auth login --region us
Enter App Key: <your-app-key>
Enter App Secret: <hidden>
Checking 2FA configuration...
✓ Profile "default" created (region: us, auth: ak_sk)

Step 4: Verify Connection

webull doctor
✓ Token valid, expires: 2026-07-11 10:00:00
✓ Region: US Environment: prod
✓ API connectivity: api.webull.com → 200 (85ms)
✓ Permissions: Stocks ✓ Options ✓ Futures ✓ Crypto ✓ Event Contracts ✓

Step 5: Verify Account Access

webull account list

Usage Examples

Just talk to your AI assistant in natural language, or use the CLI directly:

Market Data:

webull data stock snapshot --symbol AAPL,TSLA
webull data stock bars --symbol AAPL --timespan D --count 200
webull data futures snapshot --symbol ESM6
webull data crypto snapshot --symbol BTC-USD,ETH-USD
webull data event snapshot --symbol FED-RATE-MAY

Trading:

webull order stock submit --account-id ACC123 --symbol AAPL \
--side BUY --qty 10 --type LIMIT --limit-price 185.00

webull order option submit --account-id ACC123 --symbol AAPL \
--side BUY --qty 1 --option-type CALL --strike 190 --expiry 2026-04-17

webull order futures submit --account-id ACC123 --symbol ESM6 \
--side BUY --qty 1 --type LIMIT --limit-price 5200.00 -y

webull order crypto submit --account-id ACC123 --symbol BTC-USD \
--side BUY --qty 0.01 --type MARKET -y

webull order event submit --account-id ACC123 --symbol FED-RATE-MAY \
--side BUY --qty 10 --type LIMIT --limit-price 0.65 -y

Order Management:

webull order open --account-id ACC123
webull order stock replace --account-id ACC123 \
--client-order-id cli_stock_123456 --limit-price 190.00
webull order cancel --account-id ACC123 --client-order-id cli_stock_123456 -y

Account:

webull account balance --account-id ACC123
webull account positions --account-id ACC123

Available Commands

Orders

CommandDescription
order stock submitPlace stock order (MARKET/LIMIT/STOP_LOSS/STOP_LOSS_LIMIT/TRAILING_STOP_LOSS)
order stock previewPreview stock order cost
order stock replaceModify a stock order
order stock comboCombo order (OTO/OCO/OTOCO)
order stock algoAlgo order (TWAP/VWAP/POV)
order option submitPlace single-leg option order
order option previewPreview option order cost
order option replaceModify an option order
order option strategyMulti-leg option strategy
order futures submitPlace futures order
order futures replaceModify futures order
order crypto submitPlace crypto order
order event submitPlace event contract order
order event replaceModify event contract order
order cancelCancel any unfilled order
order openList open/pending orders
order detailGet order details
order historyGet historical orders

Market Data

CommandDescription
data stock snapshotReal-time stock/ETF snapshot
data stock barsStock OHLCV bars (single)
data stock batch-barsStock OHLCV bars (batch)
data stock quotesOrder book depth
data stock tickTick-by-tick trades
data stock footprintLarge order footprint
data stock noii-barsNOII auction K-line
data stock noii-snapshotNOII auction snapshot
data futures snapshotFutures snapshot
data futures barsFutures OHLCV bars
data futures tickFutures tick-by-tick
data futures depthFutures order book
data futures footprintFutures large order footprint
data crypto snapshotCrypto snapshot
data crypto barsCrypto OHLCV bars
data event snapshotEvent contract snapshot
data event barsEvent contract bars
data event tickEvent contract tick-by-tick
data event depthEvent contract order book
data screener gainers-losersTop gainers/losers
data screener activesMost active stocks

Configuration

Environment Endpoints

See API Environments for production and test endpoint details.

Flags

FlagDescription
--profileUse a specific profile
--regionOverride region (us)
--envEnvironment (prod / uat)
--csvCSV output
-q, --quietSuppress non-data output
--verboseShow HTTP request summary
--debugShow full request/response
--timeoutHTTP timeout in seconds (default 30)
-y, --yesSkip confirmation prompts
--trading-sessionTrading session (CORE/ALL/NIGHT/ALL_DAY)

Security Recommendations

  • Never share App Key, App Secret, or Token in chat
  • Use --dry-run to validate parameters without network calls
  • Use order preview to estimate costs before live orders
  • In Live mode, orders require confirmation unless -y is passed
  • Use test environment for testing before production

Disclosure

Trading in securities, options, futures, crypto, and event contracts involves substantial risk of loss. All trading decisions are at your own discretion. Verify order details before execution. This software is provided "as is" without warranty.