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 Class | Trading | Market Data |
|---|---|---|
| Stocks/ETFs | ✓ | ✓ |
| Options | ✓ | ✓ |
| Futures | ✓ | ✓ |
| Crypto | ✓ | ✓ |
| Event Contracts | ✓ | ✓ |
Architecture Overview
Prerequisites
API Credentials
- Production
- Test Environment
Apply based on your account type:
Individual users: Individual Application Process
Institutional users: Institution Application Process
No application required. Use the publicly shared test credentials to get started immediately. See SDKs and Tools.
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
| Command | Description |
|---|---|
order stock submit | Place stock order (MARKET/LIMIT/STOP_LOSS/STOP_LOSS_LIMIT/TRAILING_STOP_LOSS). Use --algo-type TWAP|VWAP|POV for algo orders |
order stock preview | Preview stock order cost |
order stock replace | Modify a stock order |
order stock combo | Combo order (OTO/OCO/OTOCO) via JSON |
order option submit | Place single-leg option order |
order option preview | Preview option order cost |
order option replace | Modify an option order |
order option strategy | Multi-leg option strategy via JSON |
order futures submit | Place futures order |
order futures replace | Modify futures order |
order crypto submit | Place crypto order |
order event submit | Place event contract order |
order event replace | Modify event contract order |
order cancel | Cancel any unfilled order |
order open | List open/pending orders |
order detail | Get order details |
order history | Get historical orders (--start, --end, --limit) |
Market Data
| Command | Description |
|---|---|
data stock snapshot | Real-time stock/ETF snapshot |
data stock bars | Stock OHLCV bars (single) |
data stock batch-bars | Stock OHLCV bars (batch) |
data stock quotes | Order book depth |
data stock tick | Tick-by-tick trades |
data stock footprint | Large order footprint |
data stock noii-bars | NOII auction K-line |
data stock noii-snapshot | NOII auction snapshot |
data option snapshot | Option real-time snapshot |
data option bars | Option OHLCV bars |
data option tick | Option tick-by-tick trades |
data futures snapshot | Futures snapshot |
data futures bars | Futures OHLCV bars |
data futures tick | Futures tick-by-tick |
data futures depth | Futures order book |
data futures footprint | Futures large order footprint |
data crypto snapshot | Crypto snapshot |
data crypto bars | Crypto OHLCV bars |
data event snapshot | Event contract snapshot |
data event bars | Event contract bars |
data event tick | Event contract tick-by-tick |
data event depth | Event contract order book |
Screener
| Command | Description |
|---|---|
data screener gainers-losers | Top gainers/losers |
data screener actives | Most active stocks |
data screener market-sectors | Market sector overview and rankings |
data screener market-sectors-detail | Stock list for a specific sector |
data screener high-dividend | High dividend stocks ranking |
data screener 52whl | 52-week high/low stocks |
data market-sentiment | US market fear & greed sentiment index |
data stock unusual-activities | US stock unusual activity alerts |
News
| Command | Description |
|---|---|
data news search | Search US market news by keyword |
data news detail | Get full news content by ID |
data news stock-news | News related to a US stock (optional --sentiment) |
Fundamentals & Insights
| Command | Description |
|---|---|
data fundamentals company-profile | Company profile information |
data fundamentals analyst-price | Analyst target price |
data fundamentals analyst-rating | Analyst rating |
data fundamentals forecast-eps | Forecast EPS |
data fundamentals filings | SEC filings |
data fundamentals earnings-calendar | Earnings calendar |
data fundamentals dividend-calendar | Dividend calendar |
data fundamentals capital-flow | Capital flow distribution |
data fundamentals industry-comparison | Industry peer comparison |
data fundamentals indicators | Financial indicators |
data fundamentals income | Income statement |
data fundamentals cashflow | Cash flow statement |
data fundamentals balancesheet | Balance sheet |
data fundamentals alert | Earnings release alert |
data fundamentals fund-brief | Fund brief information |
data fundamentals fund-performance | Fund performance returns |
data fundamentals fund-net-value | Fund NAV history |
data fundamentals fund-holdings | Fund top 10 holdings |
data fundamentals fund-dividends | Fund dividend history |
data fundamentals fund-rating | Fund rating history |
data fundamentals fund-splits | Fund split history |
data fundamentals fund-files | Fund documents and files |
data fundamentals fund-allocation | Fund asset allocation |
data 13f search | Search US institutional investors by name or CIK |
data 13f holdings | Institution 13F holdings |
data 13f transactions | Institution holding changes (OPEN/CLOSE/CHANGE) |
data stock insider-transactions | US insider transactions |
data stock insider-holdings-overview | US insider ownership overview |
data stock economic-calendar | US macroeconomic calendar |
Instruments
| Command | Description |
|---|---|
instrument stock | Query stock/ETF instruments |
instrument option | Query option contracts |
instrument crypto | Query crypto instruments |
instrument futures | Query futures contracts |
instrument futures-products | Futures product codes |
instrument futures-class | Futures product classes |
instrument event | Query event contract instruments |
instrument event-categories | List event categories |
instrument event-series | List event series |
instrument event-events | List events by series |
Watchlists
| Command | Description |
|---|---|
watchlist list | List all watchlists |
watchlist get | Get watchlist instruments |
watchlist create | Create a watchlist |
watchlist update | Update watchlist name/sort |
watchlist delete | Delete a watchlist |
watchlist add | Add instruments |
watchlist remove | Remove instruments |
watchlist sort | Update instrument sort order |
Community
| Command | Description |
|---|---|
community post create | Create a plain-text post (optional --symbol + --category). Publishes under your account |
community comment create | Comment on a post. Publishes under your account |
community hot-stocks | List stocks ranked by community activity |
community post by-symbol | List posts associated with a symbol |
community post get | Get post detail |
community my-posts | List posts created by the current user |
Account
| Command | Description |
|---|---|
account list | List trading accounts |
account balance | Account balance |
account positions | Account positions |
Auth, Profiles & Utilities
| Command | Description |
|---|---|
auth login | Authenticate (App Key/App Secret + 2FA) |
auth status | Check auth status |
profile list | List profiles |
profile switch | Switch active profile |
profile logout | Remove a profile |
profile set-endpoint | Override API endpoint |
doctor | Diagnose local configuration |
version | Print version info |
Configuration
Environment Endpoints
See API Environments for production and test endpoint details.
Flags
| Flag | Description |
|---|---|
--profile | Use a specific profile |
--region | Override region (us) |
--env | Environment (prod / uat) |
--csv | CSV output |
-q, --quiet | Suppress non-data output |
--verbose | Show HTTP request summary |
--debug | Show full request/response |
--timeout | HTTP timeout in seconds (default 30) |
-y, --yes | Skip 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-runto print the request payload without submitting - Use
order stock preview/order option previewto estimate costs before live orders community post createandcommunity comment createpublish content under your account- In Live mode, orders require confirmation unless
-yis 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.
Related Links
- GitHub: webull-inc/webull-openapi-cli