Webull OpenAPI MCP Server
OfficialClick on "Install Server".
Wait a few minutes for the server to deploy. Once ready, it will show a "Started" state.
In the chat, type
@followed by the MCP server name and your instructions, e.g., "@Webull OpenAPI MCP ServerShow me my account balance"
That's it! The server will respond to your query, and you can continue using it as needed.
Here is a step-by-step guide with screenshots.
Webull OpenAPI MCP Server
MCP Server for Webull OpenAPI — enables AI assistants (Cursor, Claude Desktop, Kiro, etc.) to securely access Webull trading and market data.
⚠️ Disclaimer
The information provided by this tool is for reference only and does not constitute investment advice. Trading involves risk; please make decisions carefully.
See DISCLAIMER.md for the full disclaimer.
Related MCP server: IBKR MCP Server
Features
Multi-Region Support — US, HK, JP, SG, TH, MY, UK, MX, BR, EU, ZA, and AU regions with region-specific order types, trading sessions, and validation
Market Data — Real-time snapshots, tick data, quotes (depth), footprint, and OHLCV bars for stocks, futures, crypto, and event contracts
NOII Data — Net Order Imbalance Indicator bars and snapshots for US stock opening/closing auctions
Screener — Top gainers/losers, most active, market sectors, high dividend, and 52-week high/low rankings
Watchlist — Create, manage, and query user watchlists and instruments
Fundamental Data — Company profiles, analyst ratings, and target prices
Stock & Fund Fundamentals — Capital flow, SEC filings, earnings/dividend calendar, forecast EPS, industry comparison, and full fund data (rating, performance, allocation, holdings, brief, dividends, splits, net value, files) (US/HK/JP only)
Financial Statements — Financial alert, indicators, income statement, balance sheet, and cash flow (US/HK/JP only)
Trading — Place, modify, cancel orders for stocks, options, futures, crypto, and event contracts
Combo Orders — OTO, OCO, OTOCO combo orders (US only)
Option Strategies — Multi-leg option strategies: vertical, straddle, strangle, butterfly, condor, etc. (US only)
Algo Orders — TWAP, VWAP, POV algorithmic orders (US only)
Risk Controls — Market-specific notional limits (USD/HKD/CNH/JPY), quantity limits, symbol whitelist
Auto Account Resolution — Automatically selects the correct account based on asset type (stock, futures, crypto, event)
Audit Logging — All order operations are logged for compliance
2FA Support — Interactive authentication flow for accounts with Two-Factor Authentication
Example Prompts
Here are some prompts you can use with your AI assistant:
Market Data
Show me AAPL's daily bars for the last 5 days
Get a real-time snapshot for AAPL, MSFT, and GOOGL
What's the current bid/ask for TSLA?
Show me 1-minute tick data for NVDA
Show me the NOII data for AAPL before market open
Screener
What are today's top gainers?
Show me the biggest losers in pre-market
What are the most actively traded stocks right now?
Show me the market sectors overview
List high dividend stocks
Which stocks are making new 52-week highs?
Watchlist
Show me all my watchlists
Create a new watchlist called "Tech Stocks"
Add AAPL and MSFT to my watchlist
What stocks are in my watchlist?
Fundamental & Analyst
Tell me about NVDA's company profile
What do analysts rate AAPL?
What's the analyst target price for TSLA?
Show me the capital flow for AAPL
Get TSLA's earnings calendar
Show NVDA's industry comparison
What are QQQ's top holdings and fund performance?
Financial Statements
Show me AAPL's latest income statement
Get TSLA's balance sheet for the last 4 quarters
What's NVDA's cash flow statement?
Show me the financial indicators for MSFT
Account & Portfolio
What's my account balance and buying power?
Show me all my current positions
List all my linked accounts
Stock Trading
Place a limit order to buy 100 shares of AAPL at $250
Place a market order to sell 50 shares of TSLA
Preview a limit buy order for 200 shares of MSFT at $450 before placing it
Options Trading
Buy 1 AAPL call option, strike $250, expiring 2026-04-17, limit price $5.00
Buy 1 TSLA put option, strike $200, expiring 2026-05-15
Order Management
Show me my order history for the last 7 days
What are my current open orders?
Cancel order with ID abc123
HK Market
Place an enhanced limit order to buy 100 shares of Tencent (00700) at HKD 500
Place an at-auction limit order for 200 shares of 00700 at HKD 510
Prerequisites
Webull Developer Account — Register at:
API Credentials — Obtain your
App KeyandApp SecretMarket Data Subscription — Subscribe to quotes for market data access:
US: webullapp.com/quote | Guide
HK: webullapp.hk/quote | Guide
JP: webull.co.jp/pricing | Guide
SG: webull.com.sg/quote | Guide
TH: webull.co.th/quote | Guide
MY: webull.com.my/quote | Guide
UK: webull-uk.com/quote | Guide
EU: webullapp.eu/quote | Guide
ZA: webullapp.co.za/quote | Guide
AU: webullapp.com.au/quote | Guide
MX: webull.com.mx/quote | Guide
BR: webull.com.br/quote | Guide
Python 3.10+
uv (recommended) — Install guide
Quick Start
Step 1: Configure Credentials
Before running the server, you must configure your API credentials. Choose one of the following approaches:
Option A: MCP client configuration (recommended for production)
Add credentials via the env field in your MCP client config (Kiro, Cursor, Claude Desktop, etc.):
{
"mcpServers": {
"webull": {
"command": "uvx",
"args": ["webull-openapi-mcp", "serve"],
"env": {
"WEBULL_APP_KEY": "your_app_key",
"WEBULL_APP_SECRET": "your_app_secret",
"WEBULL_REGION_ID": "us",
"WEBULL_ENVIRONMENT": "prod"
}
}
}
}Option B: .env file
# Create a .env file interactively:
uvx webull-openapi-mcp init
# Or manually create .env with:
# WEBULL_APP_KEY=your_app_key
# WEBULL_APP_SECRET=your_app_secretStep 2: Authenticate (2FA)
If your account requires Two-Factor Authentication, run the auth command and approve in your Webull mobile app:
uvx webull-openapi-mcp authToken is valid for 15 days and auto-refreshes. You only need to do this once (or when the token expires).
Step 3: Start the Server
uvx webull-openapi-mcp serveThat's it. Your AI assistant can now access Webull trading and market data.
Installation Options
Option 1: uvx (Recommended)
No installation needed. uvx downloads and runs the package directly from PyPI:
uvx webull-openapi-mcp serveOption 2: pip
pip install webull-openapi-mcp
webull-openapi-mcp serveOption 3: Local Development
git clone https://github.com/webull-inc/webull-openapi-mcp.git
cd webull-openapi-mcp
uv sync
uv run python -m webull_openapi_mcp serveClient Configuration
Kiro / Cursor / Claude Desktop / Claude Code
Add to your MCP configuration:
Using environment variables:
{
"mcpServers": {
"webull": {
"command": "uvx",
"args": ["webull-openapi-mcp", "serve"],
"env": {
"WEBULL_APP_KEY": "your_app_key",
"WEBULL_APP_SECRET": "your_app_secret",
"WEBULL_REGION_ID": "us",
"WEBULL_ENVIRONMENT": "prod"
}
}
}
}Using .env file (local development):
{
"mcpServers": {
"webull": {
"command": "uv",
"args": [
"run", "--directory", "/path/to/webull-openapi-mcp",
"python", "-m", "webull_openapi_mcp", "serve",
"--env-file", "/path/to/.env"
]
}
}
}Configuration
Variable | Description | Default |
| App Key (required) | — |
| App Secret (required) | — |
|
|
|
|
|
|
| Enabled tool categories (comma-separated). Valid values: | (all enabled) |
| Max order value for US market (USD) |
|
| Max order value for HK market (HKD) |
|
| Max order value for CN market (CNH) |
|
| Max order value for JP market (JPY) |
|
| Max order quantity |
|
| Allowed symbols (comma-separated) | (no restriction) |
| Token storage directory |
|
| Audit log file path | stderr only |
| SDK log level |
|
Note:
WEBULL_REGION_ID=usrepresents Webull US (developer.webull.com),WEBULL_REGION_ID=hkrepresents Webull Hong Kong (developer.webull.hk),WEBULL_REGION_ID=jprepresents Webull Japan (developer.webull.co.jp),WEBULL_REGION_ID=sgrepresents Webull Singapore (developer.webull.com.sg),WEBULL_REGION_ID=threpresents Webull Thailand (developer.webull.co.th),WEBULL_REGION_ID=myrepresents Webull Malaysia (developer.webull.com.my),WEBULL_REGION_ID=ukrepresents Webull UK (developer.webull-uk.com),WEBULL_REGION_ID=mxrepresents Webull Mexico (developer.webull.com.mx),WEBULL_REGION_ID=brrepresents Webull Brazil (developer.webull.com.br),WEBULL_REGION_ID=eurepresents Webull EU (developer.webull.eu),WEBULL_REGION_ID=zarepresents Webull South Africa (developer.webull.co.za), andWEBULL_REGION_ID=aurepresents Webull Australia (developer.webull.com.au).
See .env.example for full configuration template.
Available Tools
Market Data
Category | Tools | Region |
Stock |
| All |
Futures |
| US, HK |
Crypto |
| US |
Event |
| US |
Screener |
| All |
Screener (Sectors/Dividend/52W) |
| US, HK, JP |
Watchlist |
| All |
Fundamental & Instrument
Category | Tools | Region |
Instrument |
| varies |
Fundamental |
| All |
Stock Fundamentals |
| US, HK, JP |
Fund Fundamentals |
| US, HK, JP |
Financial Statements |
| US, HK, JP |
Trading
Category | Tools | Region |
Account |
| All |
Assets |
| All |
Stock Order |
| All |
Combo Order |
| US |
Option Order |
| US, HK |
Option Strategy |
| US |
Algo Order |
| US |
Futures Order |
| US, HK |
Crypto Order |
| US |
Event Order |
| US |
Order |
| All |
Region Differences
Feature | US | HK | JP | SG | TH | MY | UK | MX | BR | EU | ZA | AU |
Stock Trading | Yes | Yes | Yes | Yes | Yes | Yes | Yes | Yes | Yes | Yes | Yes | Yes |
Option Trading | Yes | Yes | No | No | No | No | No | No | No | No | No | No |
Futures Trading | Yes | Yes | No | No | No | No | No | No | No | No | No | No |
Crypto Trading | Yes | No | No | No | No | No | No | No | No | No | No | No |
Event Contracts | Yes | No | No | No | No | No | No | No | No | No | No | No |
Combo Orders | Yes | No | No | No | No | No | No | No | No | No | No | No |
Option Strategies | Yes | No | No | No | No | No | No | No | No | No | No | No |
Algo Orders | Yes | No | No | No | No | No | No | No | No | No | No | No |
Screener (Gainers/Losers/Active) | Yes | Yes | Yes | Yes | Yes | Yes | Yes | Yes | Yes | Yes | Yes | Yes |
Screener (Sectors/Dividend/52W) | Yes | Yes | Yes | No | No | No | No | No | No | No | No | No |
Watchlist | Yes | Yes | Yes | Yes | Yes | Yes | Yes | Yes | Yes | Yes | Yes | Yes |
Fundamental (Company/Analyst) | Yes | Yes | Yes | Yes | Yes | Yes | Yes | Yes | Yes | Yes | Yes | Yes |
Stock/Fund Fundamentals | Yes | Yes | Yes | No | No | No | No | No | No | No | No | No |
Financial Statements | Yes | Yes | Yes | No | No | No | No | No | No | No | No | No |
NOII (Auction Imbalance) | Yes | Yes | Yes | Yes | Yes | Yes | Yes | Yes | Yes | Yes | Yes | Yes |
Markets | US | US, HK, CN | US, JP | US | US | US | US | US | US | US | US | US |
Instrument Categories | US_STOCK, US_ETF | US_STOCK, US_ETF, HK_STOCK, CN_STOCK | US_STOCK, US_ETF | US_STOCK, US_ETF | US_STOCK, US_ETF | US_STOCK, US_ETF | US_STOCK, US_ETF | US_STOCK, US_ETF | US_STOCK, US_ETF | US_STOCK, US_ETF | US_STOCK, US_ETF | US_STOCK, US_ETF |
Order Types | LIMIT, MARKET, STOP_LOSS, STOP_LOSS_LIMIT, TRAILING_STOP_LOSS, etc. | LIMIT, MARKET, ENHANCED_LIMIT, AT_AUCTION, AT_AUCTION_LIMIT, etc. | JP market: LIMIT, MARKET — US market: LIMIT, MARKET, STOP_LOSS, STOP_LOSS_LIMIT | MARKET, LIMIT, STOP_LOSS, STOP_LOSS_LIMIT | MARKET, LIMIT, STOP_LOSS, STOP_LOSS_LIMIT | MARKET, LIMIT, STOP_LOSS, STOP_LOSS_LIMIT | MARKET, LIMIT, STOP_LOSS, STOP_LOSS_LIMIT | MARKET, LIMIT, STOP_LOSS, STOP_LOSS_LIMIT | MARKET, LIMIT, STOP_LOSS, STOP_LOSS_LIMIT | MARKET, LIMIT, STOP_LOSS, STOP_LOSS_LIMIT | MARKET, LIMIT, STOP_LOSS, STOP_LOSS_LIMIT | MARKET, LIMIT, STOP_LOSS, STOP_LOSS_LIMIT |
Time-in-Force | DAY, GTC | US market: DAY, GTC, GTD — HK market: DAY, GTC — CN market: DAY | JP market: DAY — US market: DAY, GTC, GTD | DAY, GTC | DAY, GTC | DAY, GTC | DAY, GTC | DAY, GTC | DAY, GTC | DAY, GTC | DAY, GTC | DAY, GTC |
Trading Sessions | ALL, CORE, NIGHT | CORE, ALL_DAY, NIGHT, ALL | CORE, ALL, NIGHT, ALL_DAY | NIGHT, ALL, CORE, ALL_DAY | NIGHT, ALL, CORE, ALL_DAY | NIGHT, ALL, CORE, ALL_DAY | NIGHT, ALL, CORE, ALL_DAY | NIGHT, ALL, CORE, ALL_DAY | NIGHT, ALL, CORE, ALL_DAY | NIGHT, ALL, CORE, ALL_DAY | NIGHT, ALL, CORE, ALL_DAY | NIGHT, ALL, CORE, ALL_DAY |
JP Order Fields | — | — |
| — | — | — | — | — | — | — | — | — |
Note: Screener (Gainers/Losers/Active), Fundamental (Company/Analyst), and NOII currently only support querying US stock data (
US_STOCKcategory). Stock/Fund Fundamentals, Financial Statements, and the extended Screener (Sectors/Dividend/52W) are available in US, HK, and JP regions; supportedcategoryvalues vary by endpoint (commonlyUS_STOCK,HK_STOCK,CN_STOCK,JP_STOCK). Watchlist supports US stocks and HK stocks.
CLI Commands
If installed via pip:
webull-openapi-mcp --version # Show version
webull-openapi-mcp init [--env-file PATH] # Initialize .env configuration
webull-openapi-mcp init --app-key KEY --app-secret SECRET --environment prod
webull-openapi-mcp auth [--env-file PATH] # Authenticate (2FA accounts)
webull-openapi-mcp serve [--env-file PATH] # Start MCP server
webull-openapi-mcp status [--env-file PATH] # Show configuration status
webull-openapi-mcp tools [--env-file PATH] # List available toolsIf using uvx (prefix with uvx):
uvx webull-openapi-mcp auth
uvx webull-openapi-mcp serve
uvx webull-openapi-mcp statusIf local development (prefix with uv run python -m webull_openapi_mcp):
uv run python -m webull_openapi_mcp auth
uv run python -m webull_openapi_mcp serveAll commands accept --env-file PATH to specify a custom .env file location (default: .env in the current directory).
Security
Never share your AK/SK with AI models — Do not paste your App Key or App Secret into chat prompts, AI assistants, or any LLM conversation. These credentials should only be configured via environment variables or
.envfiles, never exposed in plain text to the model.Prefer
envover.envfiles — Pass credentials via the MCP client'senvfield (inmcp.json) rather than a.envfile in your workspace. Theenvfield injects credentials as process environment variables, which the AI model cannot access. A.envfile in your workspace could be read by the AI assistant through IDE file access.Credential isolation — AK/SK are used only inside the MCP server process for SDK initialization and request signing. They never appear in tool outputs, logs, or error messages.
Review before trading — Always review order details proposed by the AI before confirming. Use
preview_stock_order/preview_option_orderbefore placing orders.Use toolset filtering — Set
WEBULL_TOOLSETS=account,market-datato disable trading tools entirely if you only need read-only access. Valid toolsets:account,market-data,trading,instrument.Default sandbox — The server defaults to UAT (sandbox) environment. You must explicitly set
WEBULL_ENVIRONMENT=prodfor live trading.Dependency security —
fastmcpis pinned to version3.0.2andwebull-openapi-python-sdkis pinned to2.0.12. Users are responsible for monitoring and updating third-party dependencies for security patches. Review release notes before upgrading.
Troubleshooting
2FA Authentication Required
# If installed via pip:
webull-openapi-mcp auth
# If using uvx:
uvx webull-openapi-mcp auth
# If local development:
uv run python -m webull_openapi_mcp authApprove the request in your Webull app, then start the server.
Device Not Registered
Open Webull mobile app, log in with your API account, complete device registration
Then authenticate:
# If installed via pip:
webull-openapi-mcp auth
# If using uvx:
uvx webull-openapi-mcp authMarket Data 401/403
Subscribe to quotes:
US: webullapp.com/quote | Guide
HK: webullapp.hk/quote | Guide
JP: webull.co.jp/pricing | Guide
SG: webull.com.sg/quote | Guide
TH: webull.co.th/quote | Guide
MY: webull.com.my/quote | Guide
UK: webull-uk.com/quote | Guide
EU: webullapp.eu/quote | Guide
ZA: webullapp.co.za/quote | Guide
AU: webullapp.com.au/quote | Guide
MX: webull.com.mx/quote | Guide
BR: webull.com.br/quote | Guide
Token Expired
rm -rf ./conf/token.txt
# Then re-authenticate:
webull-openapi-mcp auth # pip
uvx webull-openapi-mcp auth # uvxWindows: Garbled Characters in Error Messages
On Windows, authentication error messages may display garbled characters if the console encoding is not UTF-8. The server automatically detects the console encoding and falls back to ASCII-only output on non-UTF-8 terminals. If you still see garbled text, run:
chcp 65001This switches the Windows console to UTF-8 before starting the server.
Project Structure
webull-openapi-mcp/
├── webull_openapi_mcp/
│ ├── __init__.py # Package version
│ ├── __main__.py # python -m entry point
│ ├── cli.py # CLI commands (init, auth, serve, status, tools)
│ ├── server.py # MCP server setup and tool registration
│ ├── sdk_client.py # Webull SDK adapter (ApiClient, TradeClient, DataClient)
│ ├── config.py # Configuration loading and validation
│ ├── region_config.py # Region-specific settings (US, HK, JP, SG, TH, MY, UK, MX, BR)
│ ├── guards.py # Order validation (price, quantity, notional, region rules)
│ ├── audit.py # Audit logging for order operations
│ ├── errors.py # Exception definitions and SDK error handling
│ ├── formatters.py # Response formatting with disclaimer
│ ├── constants.py # Enum constants (sides, order types, strategies)
│ └── tools/
│ ├── __init__.py # Tool registration exports
│ ├── market_data/
│ │ ├── stock.py # Stock market data (snapshot, quotes, bars, tick, footprint, NOII)
│ │ ├── futures.py # Futures market data
│ │ ├── crypto.py # Crypto market data
│ │ ├── event.py # Event contract market data
│ │ ├── screener.py # Gainers/losers, most active, market sectors, high dividend, 52-week high/low
│ │ ├── watchlist.py# Watchlist CRUD and instrument management
│ │ ├── fundamental.py # Company profile, analyst data; stock & fund fundamentals (US/HK/JP)
│ │ └── financial.py # Financial statements: alert, indicators, income, balance sheet, cash flow (US/HK/JP)
│ └── trading/
│ ├── account.py # Account list
│ ├── assets.py # Balance, positions
│ ├── instrument.py # Instrument lookup
│ ├── order.py # Order query, cancel (shared across asset types)
│ ├── stock_order.py # Stock order place, preview, replace
│ ├── option_order.py # Option single-leg and strategy orders
│ ├── futures_order.py # Futures order place, replace
│ ├── crypto_order.py # Crypto order place
│ └── event_order.py # Event contract order place, replace
├── tests/ # Unit and property-based tests
├── conf/ # Token storage (auto-generated)
├── .env.example # Configuration template
├── DISCLAIMER.md # Full disclaimer
├── pyproject.toml # Package configuration
└── LICENSE # Apache 2.0License
Apache License 2.0 — see LICENSE for details.
This server cannot be installed
Maintenance
Resources
Unclaimed servers have limited discoverability.
Looking for Admin?
If you are the server author, to access and configure the admin panel.
Latest Blog Posts
- Who's Calling? MCP Hosts Are an Identity Blind Spot (And the Spec Knows It)By Om-Shree-0709 on .mcpAgent IdentityOAuth 2.1
- Your AI Chatbot Just Exposed Your CEO's Salary to an InternBy Om-Shree-0709 on .Agent IdentityMCP SecurityOAuth Delegation
- Why MCP Servers Need Execution Sandboxing (And Why Your Current Stack Isn't Enough)By Om-Shree-0709 on .Agentic AiPrompt InjectionWebAssembly
MCP directory API
We provide all the information about MCP servers via our MCP API.
curl -X GET 'https://glama.ai/api/mcp/v1/servers/webull-inc/webull-openapi-mcp'
If you have feedback or need assistance with the MCP directory API, please join our Discord server