
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 分