Skip to main content

Webull CLI

Command-line trading tool for AI Agents, quant developers, and institutional clients. Covers US stocks/ETFs, options, futures, crypto, and event contracts, plus fundamentals, news, screeners, watchlists, and community.

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.26.2+ (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.26.2, install Go:

# macOS (Homebrew)
brew install go

# Linux
wget https://go.dev/dl/go1.26.2.linux-amd64.tar.gz
sudo tar -C /usr/local -xzf go1.26.2.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.26.2 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

doctor checks your local configuration and prints a JSON summary (no API request is made). Example:

{
"config_file": { "status": "ok", "path": "~/.config/webull/profiles.json" },
"active_profile": { "status": "ok", "name": "default", "region": "us", "auth_method": "ak_sk" },
"network": { "api_host": "api.webull.com" },
"auth": { "token_check_enabled": true, "app_key": "abcd****", "token": "efgh****", "token_status": "NORMAL" }
}

Use Step 5 to confirm the API connection works.

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 \
--order-type LIMIT --limit-price 3.50

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 --limit-price 0.65 --event-outcome yes -y

# Algo order (TWAP/VWAP/POV) via stock submit
webull order stock submit --account-id ACC123 --symbol AAPL \
--side BUY --qty 100 --type LIMIT --limit-price 185.00 \
--algo-type TWAP --max-target-percent 10 \
--algo-start-time 10:00:00 --algo-end-time 15:00:00

News, Insights & Community:

webull data news search --keyword "Tesla earnings"
webull data news stock-news --symbol TSLA --sentiment POSITIVE
webull data market-sentiment
webull data 13f search --keyword "Berkshire"
webull community hot-stocks
webull community post by-symbol --symbol NVDA

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​

Every command supports --help for the full list of flags, e.g. webull order stock submit --help.

Orders​

CommandDescription
order stock submitPlace stock order (MARKET/LIMIT/STOP_LOSS/STOP_LOSS_LIMIT/TRAILING_STOP_LOSS). Use --algo-type TWAP|VWAP|POV for algo orders
order stock previewPreview stock order cost
order stock replaceModify a stock order
order stock comboCombo order (OTO/OCO/OTOCO) via JSON
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 via JSON
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 (--start, --end, --limit)

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 option snapshotOption real-time snapshot
data option barsOption OHLCV bars
data option tickOption tick-by-tick trades
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

Screener​

CommandDescription
data screener gainers-losersTop gainers/losers
data screener activesMost active stocks
data screener market-sectorsMarket sector overview and rankings
data screener market-sectors-detailStock list for a specific sector
data screener high-dividendHigh dividend stocks ranking
data screener 52whl52-week high/low stocks
data market-sentimentUS market fear & greed sentiment index
data stock unusual-activitiesUS stock unusual activity alerts

News​

CommandDescription
data news searchSearch US market news by keyword
data news detailGet full news content by ID
data news stock-newsNews related to a US stock (optional --sentiment)

Fundamentals & Insights​

CommandDescription
data fundamentals company-profileCompany profile information
data fundamentals analyst-priceAnalyst target price
data fundamentals analyst-ratingAnalyst rating
data fundamentals forecast-epsForecast EPS
data fundamentals filingsSEC filings
data fundamentals earnings-calendarEarnings calendar
data fundamentals dividend-calendarDividend calendar
data fundamentals capital-flowCapital flow distribution
data fundamentals industry-comparisonIndustry peer comparison
data fundamentals indicatorsFinancial indicators
data fundamentals incomeIncome statement
data fundamentals cashflowCash flow statement
data fundamentals balancesheetBalance sheet
data fundamentals alertEarnings release alert
data fundamentals fund-briefFund brief information
data fundamentals fund-performanceFund performance returns
data fundamentals fund-net-valueFund NAV history
data fundamentals fund-holdingsFund top 10 holdings
data fundamentals fund-dividendsFund dividend history
data fundamentals fund-ratingFund rating history
data fundamentals fund-splitsFund split history
data fundamentals fund-filesFund documents and files
data fundamentals fund-allocationFund asset allocation
data 13f searchSearch US institutional investors by name or CIK
data 13f holdingsInstitution 13F holdings
data 13f transactionsInstitution holding changes (OPEN/CLOSE/CHANGE)
data stock insider-transactionsUS insider transactions
data stock insider-holdings-overviewUS insider ownership overview
data stock economic-calendarUS macroeconomic calendar

Instruments​

CommandDescription
instrument stockQuery stock/ETF instruments
instrument optionQuery option contracts
instrument cryptoQuery crypto instruments
instrument futuresQuery futures contracts
instrument futures-productsFutures product codes
instrument futures-classFutures product classes
instrument eventQuery event contract instruments
instrument event-categoriesList event categories
instrument event-seriesList event series
instrument event-eventsList events by series

Watchlists​

CommandDescription
watchlist listList all watchlists
watchlist getGet watchlist instruments
watchlist createCreate a watchlist
watchlist updateUpdate watchlist name/sort
watchlist deleteDelete a watchlist
watchlist addAdd instruments
watchlist removeRemove instruments
watchlist sortUpdate instrument sort order

Community​

CommandDescription
community post createCreate a plain-text post (optional --symbol + --category). Publishes under your account
community comment createComment on a post. Publishes under your account
community hot-stocksList stocks ranked by community activity
community post by-symbolList posts associated with a symbol
community post getGet post detail
community my-postsList posts created by the current user

Account​

CommandDescription
account listList trading accounts
account balanceAccount balance
account positionsAccount positions

Auth, Profiles & Utilities​

CommandDescription
auth loginAuthenticate (App Key/App Secret + 2FA)
auth statusCheck auth status
profile listList profiles
profile switchSwitch active profile
profile logoutRemove a profile
profile set-endpointOverride API endpoint
doctorDiagnose local configuration
versionPrint version info

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

The trading session is set per command, not globally: use --session (CORE/ALL/NIGHT/ALL_DAY) on order stock submit and order stock preview.


Security Recommendations​

  • Never share App Key, App Secret, or Token in chat
  • Use order stock submit --dry-run to print the request payload without submitting
  • Use order stock preview / order option preview to estimate costs before live orders
  • community post create and community comment create publish content under your account
  • 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.