
Webull OpenAPI
io.github.webull-inc由 GitHub 账号 webull-inc 发布v1.2.6更新于 Oct 26, 2026
MCP server for Webull OpenAPI: trading and market data access for AI assistants
概览
Webull OpenAPI 的 MCP 服务器,让 AI 助手查询行情、基本面与账户持仓,并在各区域下单和管理订单。
- 可以做什么
- 获取行情数据:股票、期权、期货、加密货币和事件合约的快照、报价、逐笔、K 线、NOII 集合竞价数据、选股榜单与新闻
- 查询合约标的、公司简介、分析师评级、股票与基金基本面以及财务报表
- 管理自选列表,并在美国市场发布社区帖子和评论
- 读取账户列表、余额、持仓、历史订单和未成交订单
- 下单、预览、改单和撤单,涵盖股票、期权、期货、加密货币、事件合约、组合单、策略单和算法单
- 适用场景
- 适合让助手研究 Webull 覆盖的市场与标的,或通过自己的 Webull API 账户起草、预览并提交订单、维护自选列表。最适合已在 Webull 交易、希望用对话方式访问其数据与交易接口的用户。
- 运行要求
- 以 Python 包形式在本地运行(uvx 或 pip),需要 Python 3.10+ 和 uv。需要 Webull 开发者账户及 App Key 与 App Secret,通过 WEBULL_APP_KEY 和 WEBULL_APP_SECRET 配置,并设置 WEBULL_REGION_ID 与 WEBULL_ENVIRONMENT。行情报价需订阅付费行情服务;启用两步验证的账户需运行 auth 命令并在 Webull 手机应用中确认。需要访问 Webull API 的网络连接。
安装
在 SourceWeft 中
- 打开 控制台中的 Webull OpenAPI,将其添加到工作区。
- 为需要使用其工具的对话启用该服务。
Desktop only,通过 STDIO。 STDIO 服务会启动本地进程,因此需要 SourceWeft 桌面宿主。
其他 MCP 客户端
参照 仓库 中的启动说明。
README
Webull OpenAPI MCP Server
[Python 3.10+] [License: Apache 2.0]
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.
Features
- Multi-Region Support — US, HK, JP, SG, MY, UK, MX, BR, and ZA 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, options, 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
- Community (US only) — Create posts and comments, list hot stocks, browse posts by symbol, view post details, and list your own posts
- 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)
- Financial Statements — Financial alert, indicators, income statement, balance sheet, and cash flow
- 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?
Community
- What are the community hot stocks right now?
- Show me recent community posts about NVDA
- Post "Great earnings report!" tagged with AAPL
- List my community posts
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
Option Market Data
- Get a snapshot for AAPL260522C00300000
- Show me tick data for TSLA251219C00450000
- Get daily bars for AAPL260522C00300000
- List available option contracts for AAPL expiring after 2026-06-01
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 Secret - Market 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
- MY: webull.com.my/quote | Guide
- UK: webull-uk.com/quote | Guide
- ZA: webullapp.co.za/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.):
Option B: .env file
Step 2: Authenticate (2FA)
If your account requires Two-Factor Authentication, run the auth command and approve in your Webull mobile app:
Token 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
That'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:
Option 2: pip
Option 3: Local Development
Client Configuration
Kiro / Cursor / Claude Desktop / Claude Code
Add to your MCP configuration:
Using environment variables:
Using .env file (local development):
Configuration
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=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), andWEBULL_REGION_ID=zarepresents Webull South Africa (developer.webull.co.za).
See .env.example for full configuration template.
Available Tools
Market Data
Fundamental & Instrument
Trading
Region Differences
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 all 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:
If using uvx (prefix with uvx):
If local development (prefix with uv run python -m webull_openapi_mcp):
All 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 to3.0.4. Users are responsible for monitoring and updating third-party dependencies for security patches. Review release notes before upgrading.
Troubleshooting
2FA Authentication Required
Approve 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:
Market 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
- MY: webull.com.my/quote | Guide
- UK: webull-uk.com/quote | Guide
- ZA: webullapp.co.za/quote | Guide
- MX: webull.com.mx/quote | Guide
- BR: webull.com.br/quote | Guide
Token Expired
Windows: 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:
This switches the Windows console to UTF-8 before starting the server.
Project Structure
License
Apache License 2.0 — see LICENSE for details.
来源:README.md,提交 22a9005
工具
0版本历史
3- v1.2.6最新Oct 26, 2026
- v1.2.5Oct 17, 2026
- v1.2.4Sep 16, 2026
评分
已满足适用检查项的 50%
该评分衡量此收录条目的完整程度,依据注册中心条目、端点与公开来源计算得出。它不是对服务器本身的评价,也不表示服务器安全或当前可用:可连通性是带日期的检查结果,评分也不包含安装量或用户评价。
- 近 30 天内可连通25 分
请保持端点能够响应 MCP 握手;SourceWeft 每 30 天探测一次。
- 已声明认证方式10 分
请在注册中心条目中声明凭据请求头,或保持端点能够响应探测,以便判定其认证方式。
- 已列出工具15 分
请让服务器在无凭据时响应 tools/list,或发布可在沙箱中无凭据启动的软件包。
- 描述必需15 分
- 图标10 分
- 文档15 分
- 许可证10 分