Skip to main content

Webull Agent Skills

Webull Agent Skills enable AI coding assistants (Cursor, Claude Desktop, Copilot, Kiro, etc.) to securely access Webull OpenAPI trading and market data capabilities via local Python scripts, with multi-environment (production/uat) routing — US stocks and ETFs.

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


What is Webull Agent Skills​

Webull Agent Skills is a set of standalone Python scripts built on the official Webull Python SDK. Any AI coding assistant that can execute shell commands can call them directly. With natural language, you can:

  • Query real-time market data (US stocks, US ETFs)
  • View account balances and positions
  • Place, modify, and cancel stock orders
  • Query order history and order details
  • Authenticate via 2FA token flow

Architecture Overview​


Prerequisites​

API Credentials​

Apply for API access through the developer portal: Individual Application Guide

Other Requirements​

  • Python 3.10+
  • Webull Python SDK: pip install webull-openapi-python-sdk
  • Market Data Subscription (if market data is needed): Subscription Guide
  • AI coding assistant with shell command support — e.g. Kiro, Cursor, Claude Desktop

Setup Steps​

Step 1: Clone Repository​

git clone https://github.com/webull-inc/webull-openapi-skills.git
cd webull-openapi-skills

Step 2: Install​

pip install -e .

Step 3: Configure Credentials​

cp .env.example .env

Edit .env with your credentials:

WEBULL_APP_KEY=your_app_key
WEBULL_APP_SECRET=your_app_secret
WEBULL_ENVIRONMENT=prod
WEBULL_REGION_ID=th

Step 4: Authenticate​

Complete a one-time 2FA authentication before first use:

webull-skill auth

Authentication flow:

After approving the 2FA request in the Webull App, the token is cached locally and auto-refreshes on use.

Step 5: Verify Connection​

webull-skill trading --action account-list

If account information is returned, the setup is successful.


Integration with Different AI Tools​

Place scripts in the .kiro/skills/ directory. Kiro will automatically load SKILL.md and recognize all available operations. Just use natural language:

Get AAPL latest price

Usage Examples​

Just talk to your AI assistant in natural language:

Market Data:

Get AAPL latest price
Show me TSLA's daily bars for the last 5 days
Get real-time quotes for MSFT

Trading:

Show my account list
Check my account balance
Buy 10 shares of AAPL at limit price 180
Cancel my open order for TSLA
Show my open orders
Show my order history

Account:

What are my current positions?

Screener and Watchlist:

What are today's top gainers in the US market?
Show me the most active stocks by volume
Create a watchlist named "Tech" and add AAPL and MSFT

Available Actions​

All operations are exposed through the webull-skill command:

webull-skill [--env-file PATH] <module> --action <ACTION> [options]

Three modules are available: trading, market-data, and auth. The AI assistant reads SKILL.md and picks the right action automatically; the tables below list the available actions.

Trading Module (webull-skill trading)​

Instrument

ActionDescription
instrument-stockGet stock/ETF instrument info (US_STOCK, US_ETF)
instrument-company-profileGet company profile including business description, industry, and sector
instrument-analyst-ratingGet analyst rating for a security
instrument-analyst-target-priceGet analyst target price for a security

Account

ActionDescription
account-listGet all linked accounts
balanceGet account balance, buying power, and cash details
positionGet current positions and holdings

Orders

ActionDescription
previewPreview a stock order without submitting (estimated cost and fees)
placePlace a stock order
replaceModify an existing stock order
cancelCancel an unfilled order
openGet all current open/pending orders
historyGet historical orders
detailGet single order details
local-checkRun the local risk check (notional, quantity, symbol whitelist) without calling the API

Market Data Module (webull-skill market-data)​

Stock Market Data

ActionDescription
stock-snapshotGet real-time stock/ETF snapshot
stock-barsGet single stock OHLCV candlestick data
stock-batch-barsGet OHLCV bars for multiple stocks
stock-tickGet stock tick-by-tick trade data
stock-quotesGet real-time bid/ask quotes with depth
stock-footprintGet stock large order footprint (order flow)
stock-noii-barsGet NOII (Net Order Imbalance Indicator) bars for a stock
stock-noii-snapshotGet the latest NOII snapshot during US auction phases

Screener

ActionDescription
stock-gainers-losersGet top gainers or losers ranking by price change
stock-most-activeGet most actively traded stocks ranking
stock-market-sectorsGet a market-wide sector overview ranking with aggregate statistics by market value or volume.
stock-market-sectors-detailGet the constituent stock list and statistics for a specific market sector.
stock-high-dividendGet a ranking of high dividend yield stocks in a market.
stock-52-week-high-lowGet a ranking of stocks at or near their 52-week highs or lows.

Watchlist

ActionDescription
watchlist-listGet all watchlists
watchlist-createCreate a new watchlist
watchlist-updateUpdate a watchlist's name or sort order
watchlist-deleteDelete a watchlist and all instruments in it
watchlist-instruments-listGet all instruments in a watchlist
watchlist-instruments-addAdd instruments to a watchlist
watchlist-instruments-removeRemove instruments from a watchlist
watchlist-instruments-updateUpdate the sort order of instruments in a watchlist

Fundamentals

ActionDescription
fundamentals-capital-flowGet capital flow distribution for a stock, broken down by order-size tier.
fundamentals-sec-filingsGet recent SEC filings for a US stock (last 3 years).
fundamentals-earnings-calendarGet a stock's earnings calendar around the current date.
fundamentals-dividend-calendarGet a stock's dividend calendar around the current date.
fundamentals-forecast-epsGet a stock's recent actual EPS plus the latest analyst consensus estimate.
fundamentals-industry-comparisonGet industry peer comparison for a stock (up to 20 peers), with a selectable sort metric.
fundamentals-fund-ratingGet rating history for a fund or ETF.
fundamentals-fund-performanceGet fund performance returns over multiple horizons.
fundamentals-fund-allocationGet a fund's asset allocation breakdown.
fundamentals-fund-holdingsGet a fund's top 10 holdings.
fundamentals-fund-briefGet brief profile information for a fund or ETF.
fundamentals-fund-dividendsGet a fund's dividend distribution history.
fundamentals-fund-splitsGet a fund's split history.
fundamentals-fund-net-valueGet a fund's net asset value (NAV) history, paged by date.
fundamentals-fund-filesGet documents and files published for a fund.
fundamentals-financials-alertGet a stock's earnings alert, comparing next-report estimates against the prior-year period.
fundamentals-financials-indicatorsGet key financial indicators and ratios for a stock, annual or quarterly.
fundamentals-financials-incomeGet a stock's income statement across reporting periods, annual or quarterly.
fundamentals-financials-balance-sheetGet a stock's balance sheet across reporting periods, annual or quarterly.
fundamentals-financials-cashflowGet a stock's cash flow statement across reporting periods, annual or quarterly.

Auth Module​

CommandDescription
webull-skill authInteractive 2FA authentication; waits up to 5 minutes for approval in the Webull App

Supported Scope​

  • US stock/ETF market data and stock trading
  • Order market is US; instrument categories are US_STOCK and US_ETF
  • Stock accounts are cash accounts (INDIVIDUAL_CASH)
  • Supported order types: MARKET, LIMIT, STOP_LOSS, STOP_LOSS_LIMIT
  • Supported time in force: DAY, GTC
  • Supported trading sessions: CORE, ALL, NIGHT, ALL_DAY
  • Orders are quantity-based (entrust_type=QTY); fractional shares and trailing stop orders are not supported
  • Options, futures, crypto, event contracts, combo orders, and algo orders are not supported. The skill package also contains actions for these products (for example option-*, futures-*, crypto-*, event-*, batch-place, algo-place); they are not available for your account
  • position-detail and executions are not available

Configuration​

Via .env file or environment variables. Required:

WEBULL_APP_KEY=<your_app_key>
WEBULL_APP_SECRET=<your_app_secret>

Optional:

VariableDefaultDescription
WEBULL_ENVIRONMENTuatuat (UAT) or prod (live)
WEBULL_REGION_IDusMust be set to th
WEBULL_MAX_ORDER_NOTIONAL_USD10000Max order value (USD)
WEBULL_MAX_ORDER_QUANTITY1000Max shares per order
WEBULL_SYMBOL_WHITELIST(none)Comma-separated allowed symbols
WEBULL_CONFIG_DIR(none)Directory containing .env and conf/; overrides the default lookup location
WEBULL_TOKEN_DIRconf/Token storage directory
WEBULL_AUDIT_LOG_FILE(stderr)Audit log file path
WEBULL_LOG_LEVELWARNINGSDK log level

Environment Endpoints​

EnvironmentHTTP API
Productionapi.webull.co.th
UATth-api.uat.webullbroker.com

Rate Limits​

OperationLimit
Market data300 req/60s
Order place / replace / cancel600 req/60s
Order query2 req/2s
Auth10 req/30s

Output Format​

All operations output formatted text directly to stdout, with a disclaimer at the top:

⚠ Disclaimer: The information provided by this tool is for reference only ...

=== Stock Snapshot: AAPL ===
Symbol: AAPL
Price: 255.92
Pre Close: 255.63
Change: 0.29
...
  • Success: disclaimer + formatted data to stdout, exit code 0
  • Error: error message to stderr, exit code 1
  • The disclaimer is in English

Security Recommendations​

  • Never share your App Key, App Secret, or Token in chat. Credentials should only be passed via .env file or environment variables
  • Use preview before placing orders
  • Use WEBULL_SYMBOL_WHITELIST to restrict tradeable symbols
  • Use WEBULL_MAX_ORDER_NOTIONAL_USD and WEBULL_MAX_ORDER_QUANTITY to limit order size

Disclosure​

The information provided by this tool is for reference only and does not constitute investment advice. Trading in securities and other financial instruments involves substantial risk of loss. All trading decisions are made at your own discretion and risk. You are solely responsible for verifying order details before execution. This software is provided "as is" without warranty of any kind.