webull-openapi-mcp 1.2.6__tar.gz → 1.2.8__tar.gz
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- {webull_openapi_mcp-1.2.6 → webull_openapi_mcp-1.2.8}/DISCLAIMER.md +2 -0
- {webull_openapi_mcp-1.2.6 → webull_openapi_mcp-1.2.8}/PKG-INFO +48 -27
- {webull_openapi_mcp-1.2.6 → webull_openapi_mcp-1.2.8}/README.md +47 -26
- {webull_openapi_mcp-1.2.6 → webull_openapi_mcp-1.2.8}/mcpb/build_manifest.py +1 -1
- {webull_openapi_mcp-1.2.6 → webull_openapi_mcp-1.2.8}/pyproject.toml +1 -1
- {webull_openapi_mcp-1.2.6 → webull_openapi_mcp-1.2.8}/server.json +2 -2
- {webull_openapi_mcp-1.2.6 → webull_openapi_mcp-1.2.8}/tests/test_formatters.py +14 -0
- {webull_openapi_mcp-1.2.6 → webull_openapi_mcp-1.2.8}/tests/test_fundamental_screener_registration.py +19 -13
- {webull_openapi_mcp-1.2.6 → webull_openapi_mcp-1.2.8}/tests/test_fundamental_tools.py +6 -0
- {webull_openapi_mcp-1.2.6 → webull_openapi_mcp-1.2.8}/tests/test_instrument_tools.py +18 -0
- {webull_openapi_mcp-1.2.6 → webull_openapi_mcp-1.2.8}/tests/test_market_data_tools.py +43 -55
- {webull_openapi_mcp-1.2.6 → webull_openapi_mcp-1.2.8}/tests/test_property_server.py +8 -0
- {webull_openapi_mcp-1.2.6 → webull_openapi_mcp-1.2.8}/tests/test_screener_tools.py +40 -47
- {webull_openapi_mcp-1.2.6 → webull_openapi_mcp-1.2.8}/tests/test_sdk_client.py +2 -2
- {webull_openapi_mcp-1.2.6 → webull_openapi_mcp-1.2.8}/webull_openapi_mcp/__init__.py +1 -1
- {webull_openapi_mcp-1.2.6 → webull_openapi_mcp-1.2.8}/webull_openapi_mcp/cli.py +1 -1
- {webull_openapi_mcp-1.2.6 → webull_openapi_mcp-1.2.8}/webull_openapi_mcp/errors.py +8 -3
- {webull_openapi_mcp-1.2.6 → webull_openapi_mcp-1.2.8}/webull_openapi_mcp/formatters.py +54 -30
- {webull_openapi_mcp-1.2.6 → webull_openapi_mcp-1.2.8}/webull_openapi_mcp/region_config.py +6 -5
- {webull_openapi_mcp-1.2.6 → webull_openapi_mcp-1.2.8}/webull_openapi_mcp/sdk_client.py +7 -1
- {webull_openapi_mcp-1.2.6 → webull_openapi_mcp-1.2.8}/webull_openapi_mcp/tools/market_data/community.py +0 -2
- {webull_openapi_mcp-1.2.6 → webull_openapi_mcp-1.2.8}/webull_openapi_mcp/tools/market_data/crypto.py +14 -2
- {webull_openapi_mcp-1.2.6 → webull_openapi_mcp-1.2.8}/webull_openapi_mcp/tools/market_data/event.py +11 -1
- {webull_openapi_mcp-1.2.6 → webull_openapi_mcp-1.2.8}/webull_openapi_mcp/tools/market_data/fundamental.py +6 -7
- {webull_openapi_mcp-1.2.6 → webull_openapi_mcp-1.2.8}/webull_openapi_mcp/tools/market_data/futures.py +11 -1
- {webull_openapi_mcp-1.2.6 → webull_openapi_mcp-1.2.8}/webull_openapi_mcp/tools/market_data/option.py +13 -1
- {webull_openapi_mcp-1.2.6 → webull_openapi_mcp-1.2.8}/webull_openapi_mcp/tools/market_data/screener.py +17 -44
- {webull_openapi_mcp-1.2.6 → webull_openapi_mcp-1.2.8}/webull_openapi_mcp/tools/market_data/stock.py +2 -2
- {webull_openapi_mcp-1.2.6 → webull_openapi_mcp-1.2.8}/webull_openapi_mcp/tools/trading/instrument.py +19 -23
- {webull_openapi_mcp-1.2.6 → webull_openapi_mcp-1.2.8}/.env.example +0 -0
- {webull_openapi_mcp-1.2.6 → webull_openapi_mcp-1.2.8}/.github/workflows/pypi-ci.yml +0 -0
- {webull_openapi_mcp-1.2.6 → webull_openapi_mcp-1.2.8}/.gitignore +0 -0
- {webull_openapi_mcp-1.2.6 → webull_openapi_mcp-1.2.8}/LICENSE +0 -0
- {webull_openapi_mcp-1.2.6 → webull_openapi_mcp-1.2.8}/mcpb/.mcpbignore +0 -0
- {webull_openapi_mcp-1.2.6 → webull_openapi_mcp-1.2.8}/mcpb/build.sh +0 -0
- {webull_openapi_mcp-1.2.6 → webull_openapi_mcp-1.2.8}/mcpb/src/server.py +0 -0
- {webull_openapi_mcp-1.2.6 → webull_openapi_mcp-1.2.8}/tests/__init__.py +0 -0
- {webull_openapi_mcp-1.2.6 → webull_openapi_mcp-1.2.8}/tests/test_account_tools.py +0 -0
- {webull_openapi_mcp-1.2.6 → webull_openapi_mcp-1.2.8}/tests/test_audit.py +0 -0
- {webull_openapi_mcp-1.2.6 → webull_openapi_mcp-1.2.8}/tests/test_cli.py +0 -0
- {webull_openapi_mcp-1.2.6 → webull_openapi_mcp-1.2.8}/tests/test_community_tools.py +0 -0
- {webull_openapi_mcp-1.2.6 → webull_openapi_mcp-1.2.8}/tests/test_config.py +0 -0
- {webull_openapi_mcp-1.2.6 → webull_openapi_mcp-1.2.8}/tests/test_errors.py +0 -0
- {webull_openapi_mcp-1.2.6 → webull_openapi_mcp-1.2.8}/tests/test_guards.py +0 -0
- {webull_openapi_mcp-1.2.6 → webull_openapi_mcp-1.2.8}/tests/test_news_tools.py +0 -0
- {webull_openapi_mcp-1.2.6 → webull_openapi_mcp-1.2.8}/tests/test_order_history_tool.py +0 -0
- {webull_openapi_mcp-1.2.6 → webull_openapi_mcp-1.2.8}/tests/test_property_audit.py +0 -0
- {webull_openapi_mcp-1.2.6 → webull_openapi_mcp-1.2.8}/tests/test_property_config.py +0 -0
- {webull_openapi_mcp-1.2.6 → webull_openapi_mcp-1.2.8}/tests/test_property_formatters.py +0 -0
- {webull_openapi_mcp-1.2.6 → webull_openapi_mcp-1.2.8}/tests/test_property_guards.py +0 -0
- {webull_openapi_mcp-1.2.6 → webull_openapi_mcp-1.2.8}/tests/test_property_sdk.py +0 -0
- {webull_openapi_mcp-1.2.6 → webull_openapi_mcp-1.2.8}/tests/test_stock_order_tools.py +0 -0
- {webull_openapi_mcp-1.2.6 → webull_openapi_mcp-1.2.8}/webull_openapi_mcp/__main__.py +0 -0
- {webull_openapi_mcp-1.2.6 → webull_openapi_mcp-1.2.8}/webull_openapi_mcp/audit.py +0 -0
- {webull_openapi_mcp-1.2.6 → webull_openapi_mcp-1.2.8}/webull_openapi_mcp/config.py +0 -0
- {webull_openapi_mcp-1.2.6 → webull_openapi_mcp-1.2.8}/webull_openapi_mcp/constants.py +0 -0
- {webull_openapi_mcp-1.2.6 → webull_openapi_mcp-1.2.8}/webull_openapi_mcp/guards.py +0 -0
- {webull_openapi_mcp-1.2.6 → webull_openapi_mcp-1.2.8}/webull_openapi_mcp/server.py +0 -0
- {webull_openapi_mcp-1.2.6 → webull_openapi_mcp-1.2.8}/webull_openapi_mcp/tools/__init__.py +0 -0
- {webull_openapi_mcp-1.2.6 → webull_openapi_mcp-1.2.8}/webull_openapi_mcp/tools/market_data/__init__.py +0 -0
- {webull_openapi_mcp-1.2.6 → webull_openapi_mcp-1.2.8}/webull_openapi_mcp/tools/market_data/financial.py +0 -0
- {webull_openapi_mcp-1.2.6 → webull_openapi_mcp-1.2.8}/webull_openapi_mcp/tools/market_data/news.py +0 -0
- {webull_openapi_mcp-1.2.6 → webull_openapi_mcp-1.2.8}/webull_openapi_mcp/tools/market_data/watchlist.py +0 -0
- {webull_openapi_mcp-1.2.6 → webull_openapi_mcp-1.2.8}/webull_openapi_mcp/tools/trading/__init__.py +0 -0
- {webull_openapi_mcp-1.2.6 → webull_openapi_mcp-1.2.8}/webull_openapi_mcp/tools/trading/account.py +0 -0
- {webull_openapi_mcp-1.2.6 → webull_openapi_mcp-1.2.8}/webull_openapi_mcp/tools/trading/assets.py +0 -0
- {webull_openapi_mcp-1.2.6 → webull_openapi_mcp-1.2.8}/webull_openapi_mcp/tools/trading/crypto_order.py +0 -0
- {webull_openapi_mcp-1.2.6 → webull_openapi_mcp-1.2.8}/webull_openapi_mcp/tools/trading/event_order.py +0 -0
- {webull_openapi_mcp-1.2.6 → webull_openapi_mcp-1.2.8}/webull_openapi_mcp/tools/trading/futures_order.py +0 -0
- {webull_openapi_mcp-1.2.6 → webull_openapi_mcp-1.2.8}/webull_openapi_mcp/tools/trading/option_order.py +0 -0
- {webull_openapi_mcp-1.2.6 → webull_openapi_mcp-1.2.8}/webull_openapi_mcp/tools/trading/order.py +0 -0
- {webull_openapi_mcp-1.2.6 → webull_openapi_mcp-1.2.8}/webull_openapi_mcp/tools/trading/stock_order.py +0 -0
|
@@ -10,6 +10,8 @@ Webull MCP Server provides information solely for reference purposes. Nothing co
|
|
|
10
10
|
|
|
11
11
|
Webull MCP Server is a technical integration tool designed to enable AI assistants to interact with Webull OpenAPI. It does not provide investment recommendations, financial planning services, tax or legal advice, or any form of guarantee regarding trading outcomes. Users should not rely on this tool as a substitute for professional financial or legal consultation.
|
|
12
12
|
|
|
13
|
+
**Australia (AU) region:** Webull MCP Server offers technical integration only, not financial advice. AI outputs may be inaccurate or trigger unintended trades. You are responsible for monitoring activity. Webull is not responsible for the independent actions of third-party AI tools to the extent permitted by law.
|
|
14
|
+
|
|
13
15
|
## 3. Risk Warning
|
|
14
16
|
|
|
15
17
|
Trading in securities, options, cryptocurrencies, and other financial instruments ("Financial Services") involves a high degree of risk and may result in significant losses. Financial Services are provided by Webull affiliates and such services are not suitable for all investors. Users should ensure that any funds allocated to trading are not required for essential living expenses, and users must recognize the possibility of losing the entire investment. Before engaging in trading, users should fully understand the risks associated with each type of investment, carefully evaluate their investment objectives, level of experience, and risk tolerance, and, where appropriate, seek independent professional advice.
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Metadata-Version: 2.5
|
|
2
2
|
Name: webull-openapi-mcp
|
|
3
|
-
Version: 1.2.
|
|
3
|
+
Version: 1.2.8
|
|
4
4
|
Summary: MCP Server for Webull OpenAPI - enables AI assistants to securely access Webull trading and market data
|
|
5
5
|
Project-URL: Homepage, https://github.com/webull-inc/webull-openapi-mcp
|
|
6
6
|
Project-URL: Repository, https://github.com/webull-inc/webull-openapi-mcp
|
|
@@ -49,7 +49,7 @@ See [DISCLAIMER.md](DISCLAIMER.md) for the full disclaimer.
|
|
|
49
49
|
|
|
50
50
|
## Features
|
|
51
51
|
|
|
52
|
-
- **Multi-Region Support** — US, HK, JP, SG, MY, UK, MX, BR, and
|
|
52
|
+
- **Multi-Region Support** — US, HK, JP, SG, MY, UK, MX, BR, ZA, and AU regions with region-specific order types, trading sessions, and validation
|
|
53
53
|
- **Market Data** — Real-time snapshots, tick data, quotes (depth), footprint, and OHLCV bars for stocks, options, futures, crypto, and event contracts
|
|
54
54
|
- **NOII Data** — Net Order Imbalance Indicator bars and snapshots for US stock opening/closing auctions
|
|
55
55
|
- **Screener** — Top gainers/losers, most active, market sectors, high dividend, and 52-week high/low rankings
|
|
@@ -158,6 +158,7 @@ Here are some prompts you can use with your AI assistant:
|
|
|
158
158
|
- ZA: [developer.webull.co.za](https://developer.webull.co.za/apis/home)
|
|
159
159
|
- MX: [developer.webull.com.mx](https://developer.webull.com.mx/apis/home)
|
|
160
160
|
- BR: [developer.webull.com.br](https://developer.webull.com.br/apis/home)
|
|
161
|
+
- AU: [developer.webull.com.au](https://developer.webull.com.au/apis/home)
|
|
161
162
|
2. **API Credentials** — Obtain your `App Key` and `App Secret`
|
|
162
163
|
3. **Market Data Subscription** — Subscribe to quotes for market data access:
|
|
163
164
|
- US: [webullapp.com/quote](https://www.webullapp.com/quote) | [Guide](https://developer.webull.com/apis/docs/market-data-api/subscribe-quotes)
|
|
@@ -169,6 +170,7 @@ Here are some prompts you can use with your AI assistant:
|
|
|
169
170
|
- ZA: [webullapp.co.za/quote](https://www.webullapp.co.za/quote) | [Guide](https://developer.webull.co.za/apis/docs/market-data-api/subscribe-quotes)
|
|
170
171
|
- MX: [webull.com.mx/quote](https://www.webull.com.mx/quote) | [Guide](https://developer.webull.com.mx/apis/docs/market-data-api/subscribe-quotes)
|
|
171
172
|
- BR: [webull.com.br/quote](https://www.webull.com.br/quote) | [Guide](https://developer.webull.com.br/apis/docs/market-data-api/subscribe-quotes)
|
|
173
|
+
- AU: [webull.com.au/quote](https://www.webull.com.au/quote) | [Guide](https://developer.webull.com.au/apis/docs/market-data-api/subscribe-quotes)
|
|
172
174
|
4. **Python 3.10+**
|
|
173
175
|
5. **uv** (recommended) — [Install guide](https://docs.astral.sh/uv/getting-started/installation/)
|
|
174
176
|
|
|
@@ -311,7 +313,7 @@ Add to your MCP configuration:
|
|
|
311
313
|
| `WEBULL_APP_KEY` | App Key (required) | — |
|
|
312
314
|
| `WEBULL_APP_SECRET` | App Secret (required) | — |
|
|
313
315
|
| `WEBULL_ENVIRONMENT` | `uat` (sandbox) or `prod` | `uat` |
|
|
314
|
-
| `WEBULL_REGION_ID` | `us`, `hk`, `jp`, `sg`, `my`, `uk`, `mx`, `br`, or `
|
|
316
|
+
| `WEBULL_REGION_ID` | `us`, `hk`, `jp`, `sg`, `my`, `uk`, `mx`, `br`, `za`, or `au` | `us` |
|
|
315
317
|
| `WEBULL_TOOLSETS` | Enabled tool categories (comma-separated). Valid values: `account`, `market-data`, `trading`, `instrument` | (all enabled) |
|
|
316
318
|
| `WEBULL_MAX_ORDER_NOTIONAL_USD` | Max order value for US market (USD) | `10000` |
|
|
317
319
|
| `WEBULL_MAX_ORDER_NOTIONAL_HKD` | Max order value for HK market (HKD) | `80000` |
|
|
@@ -323,7 +325,7 @@ Add to your MCP configuration:
|
|
|
323
325
|
| `WEBULL_AUDIT_LOG_FILE` | Audit log file path | stderr only |
|
|
324
326
|
| `WEBULL_LOG_LEVEL` | SDK log level | `WARNING` |
|
|
325
327
|
|
|
326
|
-
> **Note:** `WEBULL_REGION_ID=us` represents **Webull US** ([developer.webull.com](https://developer.webull.com/apis/home)), `WEBULL_REGION_ID=hk` represents **Webull Hong Kong** ([developer.webull.hk](https://developer.webull.hk/apis/home)), `WEBULL_REGION_ID=jp` represents **Webull Japan** ([developer.webull.co.jp](https://developer.webull.co.jp/)), `WEBULL_REGION_ID=sg` represents **Webull Singapore** ([developer.webull.com.sg](https://developer.webull.com.sg/apis/home)), `WEBULL_REGION_ID=my` represents **Webull Malaysia** ([developer.webull.com.my](https://developer.webull.com.my/apis/home)), `WEBULL_REGION_ID=uk` represents **Webull UK** ([developer.webull-uk.com](https://developer.webull-uk.com/apis/home)), `WEBULL_REGION_ID=mx` represents **Webull Mexico** ([developer.webull.com.mx](https://developer.webull.com.mx/apis/home)), `WEBULL_REGION_ID=br` represents **Webull Brazil** ([developer.webull.com.br](https://developer.webull.com.br/apis/home)),
|
|
328
|
+
> **Note:** `WEBULL_REGION_ID=us` represents **Webull US** ([developer.webull.com](https://developer.webull.com/apis/home)), `WEBULL_REGION_ID=hk` represents **Webull Hong Kong** ([developer.webull.hk](https://developer.webull.hk/apis/home)), `WEBULL_REGION_ID=jp` represents **Webull Japan** ([developer.webull.co.jp](https://developer.webull.co.jp/)), `WEBULL_REGION_ID=sg` represents **Webull Singapore** ([developer.webull.com.sg](https://developer.webull.com.sg/apis/home)), `WEBULL_REGION_ID=my` represents **Webull Malaysia** ([developer.webull.com.my](https://developer.webull.com.my/apis/home)), `WEBULL_REGION_ID=uk` represents **Webull UK** ([developer.webull-uk.com](https://developer.webull-uk.com/apis/home)), `WEBULL_REGION_ID=mx` represents **Webull Mexico** ([developer.webull.com.mx](https://developer.webull.com.mx/apis/home)), `WEBULL_REGION_ID=br` represents **Webull Brazil** ([developer.webull.com.br](https://developer.webull.com.br/apis/home)), `WEBULL_REGION_ID=za` represents **Webull South Africa** ([developer.webull.co.za](https://developer.webull.co.za/apis/home)), and `WEBULL_REGION_ID=au` represents **Webull Australia** ([developer.webull.com.au](https://developer.webull.com.au/apis/home)).
|
|
327
329
|
|
|
328
330
|
See [.env.example](.env.example) for full configuration template.
|
|
329
331
|
|
|
@@ -374,28 +376,28 @@ See [.env.example](.env.example) for full configuration template.
|
|
|
374
376
|
|
|
375
377
|
### Region Differences
|
|
376
378
|
|
|
377
|
-
| Feature | US | HK | JP | SG | MY | UK | MX | BR | ZA |
|
|
378
|
-
|
|
379
|
-
| Stock Trading | Yes | Yes | Yes | Yes | Yes | Yes | Yes | Yes | Yes |
|
|
380
|
-
| Option Trading | Yes | Yes | No | No | No | No | No | No | No |
|
|
381
|
-
| Futures Trading | Yes | Yes | No | No | No | No | No | No | No |
|
|
382
|
-
| Crypto Trading | Yes | No | No | No | No | No | No | No | No |
|
|
383
|
-
| Event Contracts | Yes | No | No | No | No | No | No | No | No |
|
|
384
|
-
| Combo Orders | Yes | No | No | No | No | No | No | No | No |
|
|
385
|
-
| Option Strategies | Yes | No | No | No | No | No | No | No | No |
|
|
386
|
-
| Algo Orders | Yes | No | No | No | No | No | No | No | No |
|
|
387
|
-
| Screener | Yes | Yes | Yes | Yes | Yes | Yes | Yes | Yes | Yes |
|
|
388
|
-
| Watchlist | Yes | Yes | Yes | Yes | Yes | Yes | Yes | Yes | Yes |
|
|
389
|
-
| Fundamental (Company/Analyst) | Yes | Yes | Yes | Yes | Yes | Yes | Yes | Yes | Yes |
|
|
390
|
-
| Stock/Fund Fundamentals | Yes | Yes | Yes | Yes | Yes | Yes | Yes | Yes | Yes |
|
|
391
|
-
| Financial Statements | Yes | Yes | Yes | Yes | Yes | Yes | Yes | Yes | Yes |
|
|
392
|
-
| NOII (Auction Imbalance) | Yes | Yes | Yes | Yes | Yes | Yes | Yes | Yes | Yes |
|
|
393
|
-
| Markets | US | US, HK, CN | US, JP | US | US | US | US | US | US |
|
|
394
|
-
| 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 |
|
|
395
|
-
| 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 |
|
|
396
|
-
| 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 |
|
|
397
|
-
| 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 |
|
|
398
|
-
| JP Order Fields | — | — | `account_tax_type` required (GENERAL or SPECIFIC); `margin_type` (ONE_DAY or INDEFINITE) and `position_intent` optional margin-account-only fields; `close_contracts` optional | — | — | — | — | — | — |
|
|
379
|
+
| Feature | US | HK | JP | SG | MY | UK | MX | BR | ZA | AU |
|
|
380
|
+
|-----------------------------|----|----|----|----|----|-----|----|----|----|----|
|
|
381
|
+
| Stock Trading | Yes | Yes | Yes | Yes | Yes | Yes | Yes | Yes | Yes | Yes |
|
|
382
|
+
| Option Trading | Yes | Yes | No | No | No | No | No | No | No | No |
|
|
383
|
+
| Futures Trading | Yes | Yes | No | No | No | No | No | No | No | No |
|
|
384
|
+
| Crypto Trading | Yes | No | No | No | No | No | No | No | No | No |
|
|
385
|
+
| Event Contracts | Yes | No | No | No | No | No | No | No | No | No |
|
|
386
|
+
| Combo Orders | Yes | No | No | No | No | No | No | No | No | No |
|
|
387
|
+
| Option Strategies | Yes | No | No | No | No | No | No | No | No | No |
|
|
388
|
+
| Algo Orders | Yes | No | No | No | No | No | No | No | No | No |
|
|
389
|
+
| Screener | Yes | Yes | Yes | Yes | Yes | Yes | Yes | Yes | Yes | Yes |
|
|
390
|
+
| Watchlist | Yes | Yes | Yes | Yes | Yes | Yes | Yes | Yes | Yes | Yes |
|
|
391
|
+
| Fundamental (Company/Analyst) | Yes | Yes | Yes | Yes | Yes | Yes | Yes | Yes | Yes | Yes |
|
|
392
|
+
| Stock/Fund Fundamentals | Yes | Yes | Yes | Yes | Yes | Yes | Yes | Yes | Yes | Yes |
|
|
393
|
+
| Financial Statements | Yes | Yes | Yes | Yes | Yes | Yes | Yes | Yes | Yes | Yes |
|
|
394
|
+
| NOII (Auction Imbalance) | Yes | Yes | Yes | Yes | Yes | Yes | Yes | Yes | Yes | Yes |
|
|
395
|
+
| Markets | US | US, HK, CN | US, JP | US | US | US | US | US | US | US |
|
|
396
|
+
| 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 |
|
|
397
|
+
| 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 |
|
|
398
|
+
| 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 |
|
|
399
|
+
| 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 |
|
|
400
|
+
| JP Order Fields | — | — | `account_tax_type` required (GENERAL or SPECIFIC); `margin_type` (ONE_DAY or INDEFINITE) and `position_intent` optional margin-account-only fields; `close_contracts` optional | — | — | — | — | — | — | — |
|
|
399
401
|
|
|
400
402
|
> **Note:** Screener (Gainers/Losers/Active), Fundamental (Company/Analyst), and NOII currently only support querying US stock data (`US_STOCK` category). Stock/Fund Fundamentals, Financial Statements, and the extended Screener (Sectors/Dividend/52W) are available in all regions; supported `category` values vary by endpoint (commonly `US_STOCK`, `HK_STOCK`, `CN_STOCK`, `JP_STOCK`). Watchlist supports US stocks and HK stocks.
|
|
401
403
|
|
|
@@ -434,6 +436,24 @@ All commands accept `--env-file PATH` to specify a custom `.env` file location (
|
|
|
434
436
|
|
|
435
437
|
---
|
|
436
438
|
|
|
439
|
+
## Migration Notes (1.2.7)
|
|
440
|
+
|
|
441
|
+
This release moves the tool calls to the latest API paths and removes the old paging parameters without a compatibility layer. Clients that still send a removed parameter get a validation error (unexpected argument).
|
|
442
|
+
|
|
443
|
+
| Tool | Removed parameters | Use instead |
|
|
444
|
+
|------|--------------------|-------------|
|
|
445
|
+
| `get_instruments`, `get_crypto_instruments`, `get_event_instruments` | `page_size`, `last_instrument_id` | `pagination_key` |
|
|
446
|
+
| `get_event_series` | `page_size`, `last_series_id` | `pagination_key` |
|
|
447
|
+
| `get_market_sectors`, `get_market_sectors_detail`, `get_fund_dividends` | `page_size`, `page_index` | `pagination_key` |
|
|
448
|
+
| `get_gainers_losers`, `get_most_active`, `get_high_dividend`, `get_52_week_high_low` | `page_size`, `page_index` | None. These endpoints return a single result set without paging |
|
|
449
|
+
|
|
450
|
+
Paged tools print `Next pagination_key: ...` when more data is available. Pass that value as `pagination_key` to get the next page; the last page has no key.
|
|
451
|
+
|
|
452
|
+
Other changes:
|
|
453
|
+
|
|
454
|
+
- `get_option_bars`, `get_futures_bars`, `get_crypto_bars` and `get_event_bars` accept optional `start_time` and `end_time` (milliseconds).
|
|
455
|
+
- `get_stock_bars_single` now calls the batch bars endpoint, and the output groups rows under a `--- SYMBOL ---` header.
|
|
456
|
+
|
|
437
457
|
## Security
|
|
438
458
|
|
|
439
459
|
- **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 `.env` files, never exposed in plain text to the model.
|
|
@@ -488,6 +508,7 @@ Subscribe to quotes:
|
|
|
488
508
|
- ZA: [webullapp.co.za/quote](https://www.webullapp.co.za/quote) | [Guide](https://developer.webull.co.za/apis/docs/market-data-api/subscribe-quotes)
|
|
489
509
|
- MX: [webull.com.mx/quote](https://www.webull.com.mx/quote) | [Guide](https://developer.webull.com.mx/apis/docs/market-data-api/subscribe-quotes)
|
|
490
510
|
- BR: [webull.com.br/quote](https://www.webull.com.br/quote) | [Guide](https://developer.webull.com.br/apis/docs/market-data-api/subscribe-quotes)
|
|
511
|
+
- AU: [webull.com.au/quote](https://www.webull.com.au/quote) | [Guide](https://developer.webull.com.au/apis/docs/market-data-api/subscribe-quotes)
|
|
491
512
|
|
|
492
513
|
### Token Expired
|
|
493
514
|
|
|
@@ -522,7 +543,7 @@ webull-openapi-mcp/
|
|
|
522
543
|
│ ├── server.py # MCP server setup and tool registration
|
|
523
544
|
│ ├── sdk_client.py # Webull SDK adapter (ApiClient, TradeClient, DataClient)
|
|
524
545
|
│ ├── config.py # Configuration loading and validation
|
|
525
|
-
│ ├── region_config.py # Region-specific settings (US, HK, JP, SG, MY, UK, MX, BR, ZA)
|
|
546
|
+
│ ├── region_config.py # Region-specific settings (US, HK, JP, SG, MY, UK, MX, BR, ZA, AU)
|
|
526
547
|
│ ├── guards.py # Order validation (price, quantity, notional, region rules)
|
|
527
548
|
│ ├── audit.py # Audit logging for order operations
|
|
528
549
|
│ ├── errors.py # Exception definitions and SDK error handling
|
|
@@ -19,7 +19,7 @@ See [DISCLAIMER.md](DISCLAIMER.md) for the full disclaimer.
|
|
|
19
19
|
|
|
20
20
|
## Features
|
|
21
21
|
|
|
22
|
-
- **Multi-Region Support** — US, HK, JP, SG, MY, UK, MX, BR, and
|
|
22
|
+
- **Multi-Region Support** — US, HK, JP, SG, MY, UK, MX, BR, ZA, and AU regions with region-specific order types, trading sessions, and validation
|
|
23
23
|
- **Market Data** — Real-time snapshots, tick data, quotes (depth), footprint, and OHLCV bars for stocks, options, futures, crypto, and event contracts
|
|
24
24
|
- **NOII Data** — Net Order Imbalance Indicator bars and snapshots for US stock opening/closing auctions
|
|
25
25
|
- **Screener** — Top gainers/losers, most active, market sectors, high dividend, and 52-week high/low rankings
|
|
@@ -128,6 +128,7 @@ Here are some prompts you can use with your AI assistant:
|
|
|
128
128
|
- ZA: [developer.webull.co.za](https://developer.webull.co.za/apis/home)
|
|
129
129
|
- MX: [developer.webull.com.mx](https://developer.webull.com.mx/apis/home)
|
|
130
130
|
- BR: [developer.webull.com.br](https://developer.webull.com.br/apis/home)
|
|
131
|
+
- AU: [developer.webull.com.au](https://developer.webull.com.au/apis/home)
|
|
131
132
|
2. **API Credentials** — Obtain your `App Key` and `App Secret`
|
|
132
133
|
3. **Market Data Subscription** — Subscribe to quotes for market data access:
|
|
133
134
|
- US: [webullapp.com/quote](https://www.webullapp.com/quote) | [Guide](https://developer.webull.com/apis/docs/market-data-api/subscribe-quotes)
|
|
@@ -139,6 +140,7 @@ Here are some prompts you can use with your AI assistant:
|
|
|
139
140
|
- ZA: [webullapp.co.za/quote](https://www.webullapp.co.za/quote) | [Guide](https://developer.webull.co.za/apis/docs/market-data-api/subscribe-quotes)
|
|
140
141
|
- MX: [webull.com.mx/quote](https://www.webull.com.mx/quote) | [Guide](https://developer.webull.com.mx/apis/docs/market-data-api/subscribe-quotes)
|
|
141
142
|
- BR: [webull.com.br/quote](https://www.webull.com.br/quote) | [Guide](https://developer.webull.com.br/apis/docs/market-data-api/subscribe-quotes)
|
|
143
|
+
- AU: [webull.com.au/quote](https://www.webull.com.au/quote) | [Guide](https://developer.webull.com.au/apis/docs/market-data-api/subscribe-quotes)
|
|
142
144
|
4. **Python 3.10+**
|
|
143
145
|
5. **uv** (recommended) — [Install guide](https://docs.astral.sh/uv/getting-started/installation/)
|
|
144
146
|
|
|
@@ -281,7 +283,7 @@ Add to your MCP configuration:
|
|
|
281
283
|
| `WEBULL_APP_KEY` | App Key (required) | — |
|
|
282
284
|
| `WEBULL_APP_SECRET` | App Secret (required) | — |
|
|
283
285
|
| `WEBULL_ENVIRONMENT` | `uat` (sandbox) or `prod` | `uat` |
|
|
284
|
-
| `WEBULL_REGION_ID` | `us`, `hk`, `jp`, `sg`, `my`, `uk`, `mx`, `br`, or `
|
|
286
|
+
| `WEBULL_REGION_ID` | `us`, `hk`, `jp`, `sg`, `my`, `uk`, `mx`, `br`, `za`, or `au` | `us` |
|
|
285
287
|
| `WEBULL_TOOLSETS` | Enabled tool categories (comma-separated). Valid values: `account`, `market-data`, `trading`, `instrument` | (all enabled) |
|
|
286
288
|
| `WEBULL_MAX_ORDER_NOTIONAL_USD` | Max order value for US market (USD) | `10000` |
|
|
287
289
|
| `WEBULL_MAX_ORDER_NOTIONAL_HKD` | Max order value for HK market (HKD) | `80000` |
|
|
@@ -293,7 +295,7 @@ Add to your MCP configuration:
|
|
|
293
295
|
| `WEBULL_AUDIT_LOG_FILE` | Audit log file path | stderr only |
|
|
294
296
|
| `WEBULL_LOG_LEVEL` | SDK log level | `WARNING` |
|
|
295
297
|
|
|
296
|
-
> **Note:** `WEBULL_REGION_ID=us` represents **Webull US** ([developer.webull.com](https://developer.webull.com/apis/home)), `WEBULL_REGION_ID=hk` represents **Webull Hong Kong** ([developer.webull.hk](https://developer.webull.hk/apis/home)), `WEBULL_REGION_ID=jp` represents **Webull Japan** ([developer.webull.co.jp](https://developer.webull.co.jp/)), `WEBULL_REGION_ID=sg` represents **Webull Singapore** ([developer.webull.com.sg](https://developer.webull.com.sg/apis/home)), `WEBULL_REGION_ID=my` represents **Webull Malaysia** ([developer.webull.com.my](https://developer.webull.com.my/apis/home)), `WEBULL_REGION_ID=uk` represents **Webull UK** ([developer.webull-uk.com](https://developer.webull-uk.com/apis/home)), `WEBULL_REGION_ID=mx` represents **Webull Mexico** ([developer.webull.com.mx](https://developer.webull.com.mx/apis/home)), `WEBULL_REGION_ID=br` represents **Webull Brazil** ([developer.webull.com.br](https://developer.webull.com.br/apis/home)),
|
|
298
|
+
> **Note:** `WEBULL_REGION_ID=us` represents **Webull US** ([developer.webull.com](https://developer.webull.com/apis/home)), `WEBULL_REGION_ID=hk` represents **Webull Hong Kong** ([developer.webull.hk](https://developer.webull.hk/apis/home)), `WEBULL_REGION_ID=jp` represents **Webull Japan** ([developer.webull.co.jp](https://developer.webull.co.jp/)), `WEBULL_REGION_ID=sg` represents **Webull Singapore** ([developer.webull.com.sg](https://developer.webull.com.sg/apis/home)), `WEBULL_REGION_ID=my` represents **Webull Malaysia** ([developer.webull.com.my](https://developer.webull.com.my/apis/home)), `WEBULL_REGION_ID=uk` represents **Webull UK** ([developer.webull-uk.com](https://developer.webull-uk.com/apis/home)), `WEBULL_REGION_ID=mx` represents **Webull Mexico** ([developer.webull.com.mx](https://developer.webull.com.mx/apis/home)), `WEBULL_REGION_ID=br` represents **Webull Brazil** ([developer.webull.com.br](https://developer.webull.com.br/apis/home)), `WEBULL_REGION_ID=za` represents **Webull South Africa** ([developer.webull.co.za](https://developer.webull.co.za/apis/home)), and `WEBULL_REGION_ID=au` represents **Webull Australia** ([developer.webull.com.au](https://developer.webull.com.au/apis/home)).
|
|
297
299
|
|
|
298
300
|
See [.env.example](.env.example) for full configuration template.
|
|
299
301
|
|
|
@@ -344,28 +346,28 @@ See [.env.example](.env.example) for full configuration template.
|
|
|
344
346
|
|
|
345
347
|
### Region Differences
|
|
346
348
|
|
|
347
|
-
| Feature | US | HK | JP | SG | MY | UK | MX | BR | ZA |
|
|
348
|
-
|
|
349
|
-
| Stock Trading | Yes | Yes | Yes | Yes | Yes | Yes | Yes | Yes | Yes |
|
|
350
|
-
| Option Trading | Yes | Yes | No | No | No | No | No | No | No |
|
|
351
|
-
| Futures Trading | Yes | Yes | No | No | No | No | No | No | No |
|
|
352
|
-
| Crypto Trading | Yes | No | No | No | No | No | No | No | No |
|
|
353
|
-
| Event Contracts | Yes | No | No | No | No | No | No | No | No |
|
|
354
|
-
| Combo Orders | Yes | No | No | No | No | No | No | No | No |
|
|
355
|
-
| Option Strategies | Yes | No | No | No | No | No | No | No | No |
|
|
356
|
-
| Algo Orders | Yes | No | No | No | No | No | No | No | No |
|
|
357
|
-
| Screener | Yes | Yes | Yes | Yes | Yes | Yes | Yes | Yes | Yes |
|
|
358
|
-
| Watchlist | Yes | Yes | Yes | Yes | Yes | Yes | Yes | Yes | Yes |
|
|
359
|
-
| Fundamental (Company/Analyst) | Yes | Yes | Yes | Yes | Yes | Yes | Yes | Yes | Yes |
|
|
360
|
-
| Stock/Fund Fundamentals | Yes | Yes | Yes | Yes | Yes | Yes | Yes | Yes | Yes |
|
|
361
|
-
| Financial Statements | Yes | Yes | Yes | Yes | Yes | Yes | Yes | Yes | Yes |
|
|
362
|
-
| NOII (Auction Imbalance) | Yes | Yes | Yes | Yes | Yes | Yes | Yes | Yes | Yes |
|
|
363
|
-
| Markets | US | US, HK, CN | US, JP | US | US | US | US | US | US |
|
|
364
|
-
| 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 |
|
|
365
|
-
| 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 |
|
|
366
|
-
| 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 |
|
|
367
|
-
| 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 |
|
|
368
|
-
| JP Order Fields | — | — | `account_tax_type` required (GENERAL or SPECIFIC); `margin_type` (ONE_DAY or INDEFINITE) and `position_intent` optional margin-account-only fields; `close_contracts` optional | — | — | — | — | — | — |
|
|
349
|
+
| Feature | US | HK | JP | SG | MY | UK | MX | BR | ZA | AU |
|
|
350
|
+
|-----------------------------|----|----|----|----|----|-----|----|----|----|----|
|
|
351
|
+
| Stock Trading | Yes | Yes | Yes | Yes | Yes | Yes | Yes | Yes | Yes | Yes |
|
|
352
|
+
| Option Trading | Yes | Yes | No | No | No | No | No | No | No | No |
|
|
353
|
+
| Futures Trading | Yes | Yes | No | No | No | No | No | No | No | No |
|
|
354
|
+
| Crypto Trading | Yes | No | No | No | No | No | No | No | No | No |
|
|
355
|
+
| Event Contracts | Yes | No | No | No | No | No | No | No | No | No |
|
|
356
|
+
| Combo Orders | Yes | No | No | No | No | No | No | No | No | No |
|
|
357
|
+
| Option Strategies | Yes | No | No | No | No | No | No | No | No | No |
|
|
358
|
+
| Algo Orders | Yes | No | No | No | No | No | No | No | No | No |
|
|
359
|
+
| Screener | Yes | Yes | Yes | Yes | Yes | Yes | Yes | Yes | Yes | Yes |
|
|
360
|
+
| Watchlist | Yes | Yes | Yes | Yes | Yes | Yes | Yes | Yes | Yes | Yes |
|
|
361
|
+
| Fundamental (Company/Analyst) | Yes | Yes | Yes | Yes | Yes | Yes | Yes | Yes | Yes | Yes |
|
|
362
|
+
| Stock/Fund Fundamentals | Yes | Yes | Yes | Yes | Yes | Yes | Yes | Yes | Yes | Yes |
|
|
363
|
+
| Financial Statements | Yes | Yes | Yes | Yes | Yes | Yes | Yes | Yes | Yes | Yes |
|
|
364
|
+
| NOII (Auction Imbalance) | Yes | Yes | Yes | Yes | Yes | Yes | Yes | Yes | Yes | Yes |
|
|
365
|
+
| Markets | US | US, HK, CN | US, JP | US | US | US | US | US | US | US |
|
|
366
|
+
| 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 |
|
|
367
|
+
| 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 |
|
|
368
|
+
| 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 |
|
|
369
|
+
| 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 |
|
|
370
|
+
| JP Order Fields | — | — | `account_tax_type` required (GENERAL or SPECIFIC); `margin_type` (ONE_DAY or INDEFINITE) and `position_intent` optional margin-account-only fields; `close_contracts` optional | — | — | — | — | — | — | — |
|
|
369
371
|
|
|
370
372
|
> **Note:** Screener (Gainers/Losers/Active), Fundamental (Company/Analyst), and NOII currently only support querying US stock data (`US_STOCK` category). Stock/Fund Fundamentals, Financial Statements, and the extended Screener (Sectors/Dividend/52W) are available in all regions; supported `category` values vary by endpoint (commonly `US_STOCK`, `HK_STOCK`, `CN_STOCK`, `JP_STOCK`). Watchlist supports US stocks and HK stocks.
|
|
371
373
|
|
|
@@ -404,6 +406,24 @@ All commands accept `--env-file PATH` to specify a custom `.env` file location (
|
|
|
404
406
|
|
|
405
407
|
---
|
|
406
408
|
|
|
409
|
+
## Migration Notes (1.2.7)
|
|
410
|
+
|
|
411
|
+
This release moves the tool calls to the latest API paths and removes the old paging parameters without a compatibility layer. Clients that still send a removed parameter get a validation error (unexpected argument).
|
|
412
|
+
|
|
413
|
+
| Tool | Removed parameters | Use instead |
|
|
414
|
+
|------|--------------------|-------------|
|
|
415
|
+
| `get_instruments`, `get_crypto_instruments`, `get_event_instruments` | `page_size`, `last_instrument_id` | `pagination_key` |
|
|
416
|
+
| `get_event_series` | `page_size`, `last_series_id` | `pagination_key` |
|
|
417
|
+
| `get_market_sectors`, `get_market_sectors_detail`, `get_fund_dividends` | `page_size`, `page_index` | `pagination_key` |
|
|
418
|
+
| `get_gainers_losers`, `get_most_active`, `get_high_dividend`, `get_52_week_high_low` | `page_size`, `page_index` | None. These endpoints return a single result set without paging |
|
|
419
|
+
|
|
420
|
+
Paged tools print `Next pagination_key: ...` when more data is available. Pass that value as `pagination_key` to get the next page; the last page has no key.
|
|
421
|
+
|
|
422
|
+
Other changes:
|
|
423
|
+
|
|
424
|
+
- `get_option_bars`, `get_futures_bars`, `get_crypto_bars` and `get_event_bars` accept optional `start_time` and `end_time` (milliseconds).
|
|
425
|
+
- `get_stock_bars_single` now calls the batch bars endpoint, and the output groups rows under a `--- SYMBOL ---` header.
|
|
426
|
+
|
|
407
427
|
## Security
|
|
408
428
|
|
|
409
429
|
- **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 `.env` files, never exposed in plain text to the model.
|
|
@@ -458,6 +478,7 @@ Subscribe to quotes:
|
|
|
458
478
|
- ZA: [webullapp.co.za/quote](https://www.webullapp.co.za/quote) | [Guide](https://developer.webull.co.za/apis/docs/market-data-api/subscribe-quotes)
|
|
459
479
|
- MX: [webull.com.mx/quote](https://www.webull.com.mx/quote) | [Guide](https://developer.webull.com.mx/apis/docs/market-data-api/subscribe-quotes)
|
|
460
480
|
- BR: [webull.com.br/quote](https://www.webull.com.br/quote) | [Guide](https://developer.webull.com.br/apis/docs/market-data-api/subscribe-quotes)
|
|
481
|
+
- AU: [webull.com.au/quote](https://www.webull.com.au/quote) | [Guide](https://developer.webull.com.au/apis/docs/market-data-api/subscribe-quotes)
|
|
461
482
|
|
|
462
483
|
### Token Expired
|
|
463
484
|
|
|
@@ -492,7 +513,7 @@ webull-openapi-mcp/
|
|
|
492
513
|
│ ├── server.py # MCP server setup and tool registration
|
|
493
514
|
│ ├── sdk_client.py # Webull SDK adapter (ApiClient, TradeClient, DataClient)
|
|
494
515
|
│ ├── config.py # Configuration loading and validation
|
|
495
|
-
│ ├── region_config.py # Region-specific settings (US, HK, JP, SG, MY, UK, MX, BR, ZA)
|
|
516
|
+
│ ├── region_config.py # Region-specific settings (US, HK, JP, SG, MY, UK, MX, BR, ZA, AU)
|
|
496
517
|
│ ├── guards.py # Order validation (price, quantity, notional, region rules)
|
|
497
518
|
│ ├── audit.py # Audit logging for order operations
|
|
498
519
|
│ ├── errors.py # Exception definitions and SDK error handling
|
|
@@ -194,7 +194,7 @@ def build_manifest(
|
|
|
194
194
|
"region_id": {
|
|
195
195
|
"type": "string",
|
|
196
196
|
"title": "Region",
|
|
197
|
-
"description": "Webull region: us, hk, jp, sg, th, my, uk, mx, br, or
|
|
197
|
+
"description": "Webull region: us, hk, jp, sg, th, my, uk, mx, br, za, or au.",
|
|
198
198
|
"default": "us",
|
|
199
199
|
"required": True,
|
|
200
200
|
},
|
|
@@ -4,7 +4,7 @@ build-backend = "hatchling.build"
|
|
|
4
4
|
|
|
5
5
|
[project]
|
|
6
6
|
name = "webull-openapi-mcp"
|
|
7
|
-
version = "1.2.
|
|
7
|
+
version = "1.2.8"
|
|
8
8
|
description = "MCP Server for Webull OpenAPI - enables AI assistants to securely access Webull trading and market data"
|
|
9
9
|
readme = "README.md"
|
|
10
10
|
license = "Apache-2.0"
|
|
@@ -3,7 +3,7 @@
|
|
|
3
3
|
"name": "io.github.webull-inc/webull-openapi-mcp",
|
|
4
4
|
"title": "Webull OpenAPI",
|
|
5
5
|
"description": "MCP server for Webull OpenAPI: trading and market data access for AI assistants",
|
|
6
|
-
"version": "1.2.
|
|
6
|
+
"version": "1.2.8",
|
|
7
7
|
"repository": {
|
|
8
8
|
"url": "https://github.com/webull-inc/webull-openapi-mcp",
|
|
9
9
|
"source": "github"
|
|
@@ -13,7 +13,7 @@
|
|
|
13
13
|
"registryType": "pypi",
|
|
14
14
|
"registryBaseUrl": "https://pypi.org",
|
|
15
15
|
"identifier": "webull-openapi-mcp",
|
|
16
|
-
"version": "1.2.
|
|
16
|
+
"version": "1.2.8",
|
|
17
17
|
"runtimeHint": "uvx",
|
|
18
18
|
"transport": {
|
|
19
19
|
"type": "stdio"
|
|
@@ -364,3 +364,17 @@ class TestFormatPlaceOptionOrderResult:
|
|
|
364
364
|
result = format_place_option_order_result(data)
|
|
365
365
|
assert "OPT1" in result
|
|
366
366
|
assert "Option" in result
|
|
367
|
+
|
|
368
|
+
|
|
369
|
+
def test_au_disclaimer_applies_to_au_only():
|
|
370
|
+
"""The AU disclaimer is used for AU; other regions keep the generic text."""
|
|
371
|
+
from webull_openapi_mcp import formatters
|
|
372
|
+
|
|
373
|
+
try:
|
|
374
|
+
formatters.set_disclaimer_region("au")
|
|
375
|
+
assert "technical integration only, not financial advice" in formatters.prepend_disclaimer("x")
|
|
376
|
+
formatters.set_disclaimer_region("us")
|
|
377
|
+
assert "technical integration only" not in formatters.prepend_disclaimer("x")
|
|
378
|
+
assert "for reference only" in formatters.prepend_disclaimer("x")
|
|
379
|
+
finally:
|
|
380
|
+
formatters.set_disclaimer_region("us")
|
|
@@ -127,35 +127,41 @@ def test_income_statement_passes_type_and_count():
|
|
|
127
127
|
|
|
128
128
|
def test_high_dividend_invokes_screener():
|
|
129
129
|
mcp, sdk = _build_mcp()
|
|
130
|
-
sdk.data.screener.
|
|
131
|
-
"
|
|
132
|
-
|
|
133
|
-
}
|
|
130
|
+
sdk.data.screener.list_high_dividend.return_value = [
|
|
131
|
+
{"symbol": "T", "name": "AT&T", "yield": "0.06"},
|
|
132
|
+
]
|
|
134
133
|
text = _call(mcp, "get_high_dividend", {})
|
|
135
|
-
sdk.data.screener.
|
|
134
|
+
sdk.data.screener.list_high_dividend.assert_called_once()
|
|
135
|
+
_, kwargs = sdk.data.screener.list_high_dividend.call_args
|
|
136
|
+
assert "page_index" not in kwargs and "page_size" not in kwargs
|
|
136
137
|
assert "High Dividend" in text
|
|
137
138
|
|
|
138
139
|
|
|
139
140
|
def test_52_week_high_low_invokes_screener():
|
|
140
141
|
mcp, sdk = _build_mcp()
|
|
141
|
-
sdk.data.screener.
|
|
142
|
-
"
|
|
143
|
-
|
|
144
|
-
}
|
|
142
|
+
sdk.data.screener.list_52whl.return_value = [
|
|
143
|
+
{"symbol": "AAPL", "name": "Apple", "price": "300"},
|
|
144
|
+
]
|
|
145
145
|
text = _call(mcp, "get_52_week_high_low", {"rank_type": "NEW_HIGH"})
|
|
146
|
-
sdk.data.screener.
|
|
146
|
+
sdk.data.screener.list_52whl.assert_called_once()
|
|
147
147
|
assert "52-Week High/Low" in text
|
|
148
148
|
|
|
149
149
|
|
|
150
150
|
def test_market_sectors_detail_requires_sector_id():
|
|
151
151
|
mcp, sdk = _build_mcp()
|
|
152
|
-
sdk.data.screener.
|
|
152
|
+
sdk.data.screener.list_market_sectors_detail.return_value = {
|
|
153
153
|
"id": "1", "name": "Tech", "change_ratio": "0.01", "data": [],
|
|
154
|
+
"pagination_key": "NEXT123",
|
|
154
155
|
}
|
|
155
|
-
text = _call(
|
|
156
|
-
|
|
156
|
+
text = _call(
|
|
157
|
+
mcp, "get_market_sectors_detail",
|
|
158
|
+
{"sector_id": "1001", "pagination_key": "PREV456"},
|
|
159
|
+
)
|
|
160
|
+
_, kwargs = sdk.data.screener.list_market_sectors_detail.call_args
|
|
157
161
|
assert kwargs["sector_id"] == "1001"
|
|
162
|
+
assert kwargs["pagination_key"] == "PREV456"
|
|
158
163
|
assert "Market Sector Detail" in text
|
|
164
|
+
assert "Next pagination_key: NEXT123" in text
|
|
159
165
|
|
|
160
166
|
|
|
161
167
|
def test_sdk_exception_is_handled_gracefully():
|
|
@@ -368,6 +368,12 @@ class TestFormatFundDividends:
|
|
|
368
368
|
assert "0.5" in result
|
|
369
369
|
assert "2026-01-15" in result
|
|
370
370
|
|
|
371
|
+
def test_unwraps_paginated_response(self):
|
|
372
|
+
data = {"data": [{"dps": "0.7", "pay_date": "2026-02-15"}], "pagination_key": "k1"}
|
|
373
|
+
result = format_fund_dividends(data)
|
|
374
|
+
assert "0.7" in result
|
|
375
|
+
assert "Next pagination_key: k1" in result
|
|
376
|
+
|
|
371
377
|
|
|
372
378
|
class TestFormatFundSplits:
|
|
373
379
|
def test_formats_data(self):
|
|
@@ -152,3 +152,21 @@ class TestFormatAnalystTargetPrice:
|
|
|
152
152
|
def test_non_dict_returns_no_data(self):
|
|
153
153
|
assert format_analyst_target_price("invalid") == _NO_DATA
|
|
154
154
|
assert format_analyst_target_price([]) == _NO_DATA
|
|
155
|
+
# ---------------------------------------------------------------------------
|
|
156
|
+
# Instrument list pagination
|
|
157
|
+
# ---------------------------------------------------------------------------
|
|
158
|
+
class TestFormatInstrumentsPagination:
|
|
159
|
+
def test_unwraps_paginated_response(self):
|
|
160
|
+
from webull_openapi_mcp.formatters import format_instruments
|
|
161
|
+
data = {
|
|
162
|
+
"data": [{"symbol": "AAPL", "name": "APPLE INC"}],
|
|
163
|
+
"pagination_key": "cursor-1",
|
|
164
|
+
}
|
|
165
|
+
result = format_instruments(data)
|
|
166
|
+
assert "AAPL" in result
|
|
167
|
+
assert "Next pagination_key: cursor-1" in result
|
|
168
|
+
def test_last_page_has_no_cursor(self):
|
|
169
|
+
from webull_openapi_mcp.formatters import format_instruments
|
|
170
|
+
result = format_instruments({"data": [{"symbol": "AAPL"}]})
|
|
171
|
+
assert "AAPL" in result
|
|
172
|
+
assert "pagination_key" not in result
|
|
@@ -49,29 +49,26 @@ def test_returns_no_data_for_empty_list(fn):
|
|
|
49
49
|
|
|
50
50
|
class TestFormatGainersLosers:
|
|
51
51
|
def test_formats_data_list(self):
|
|
52
|
-
data =
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
},
|
|
73
|
-
],
|
|
74
|
-
}
|
|
52
|
+
data = [
|
|
53
|
+
{
|
|
54
|
+
"symbol": "TSLA",
|
|
55
|
+
"name": "Tesla Inc",
|
|
56
|
+
"price": "250.00",
|
|
57
|
+
"pre_close": "235.00",
|
|
58
|
+
"open": "236.00",
|
|
59
|
+
"high": "252.00",
|
|
60
|
+
"low": "234.00",
|
|
61
|
+
"close": "250.00",
|
|
62
|
+
"change": "15.00",
|
|
63
|
+
"change_ratio": "0.064",
|
|
64
|
+
"amplitude": "0.0766",
|
|
65
|
+
"volume": "5000000",
|
|
66
|
+
"turnover_rate": "0.005",
|
|
67
|
+
"market_value": "800000000000",
|
|
68
|
+
"exchange_code": "NAS",
|
|
69
|
+
"currency_code": "USD",
|
|
70
|
+
},
|
|
71
|
+
]
|
|
75
72
|
result = format_gainers_losers(data)
|
|
76
73
|
assert "Gainers / Losers" in result
|
|
77
74
|
assert "TSLA" in result
|
|
@@ -81,17 +78,11 @@ class TestFormatGainersLosers:
|
|
|
81
78
|
assert "0.064" in result
|
|
82
79
|
assert "0.0766" in result
|
|
83
80
|
assert "NAS" in result
|
|
84
|
-
assert "More results available" in result
|
|
85
|
-
|
|
86
|
-
def test_no_has_more(self):
|
|
87
|
-
data = {"has_more": False, "data": [{"symbol": "X", "name": "Test"}]}
|
|
88
|
-
result = format_gainers_losers(data)
|
|
89
81
|
assert "More results available" not in result
|
|
90
82
|
|
|
83
|
+
|
|
91
84
|
def test_empty_data_list(self):
|
|
92
|
-
|
|
93
|
-
result = format_gainers_losers(data)
|
|
94
|
-
assert result == _NO_DATA
|
|
85
|
+
assert format_gainers_losers([]) == _NO_DATA
|
|
95
86
|
|
|
96
87
|
|
|
97
88
|
# ---------------------------------------------------------------------------
|
|
@@ -100,30 +91,27 @@ class TestFormatGainersLosers:
|
|
|
100
91
|
|
|
101
92
|
class TestFormatMostActive:
|
|
102
93
|
def test_formats_with_relative_volume(self):
|
|
103
|
-
data =
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
|
|
108
|
-
|
|
109
|
-
|
|
110
|
-
|
|
111
|
-
|
|
112
|
-
|
|
113
|
-
|
|
114
|
-
|
|
115
|
-
|
|
116
|
-
|
|
117
|
-
|
|
118
|
-
|
|
119
|
-
|
|
120
|
-
|
|
121
|
-
|
|
122
|
-
|
|
123
|
-
|
|
124
|
-
},
|
|
125
|
-
],
|
|
126
|
-
}
|
|
94
|
+
data = [
|
|
95
|
+
{
|
|
96
|
+
"symbol": "AAPL",
|
|
97
|
+
"name": "Apple Inc",
|
|
98
|
+
"price": "290.00",
|
|
99
|
+
"pre_close": "285.00",
|
|
100
|
+
"open": "286.00",
|
|
101
|
+
"high": "291.00",
|
|
102
|
+
"low": "284.00",
|
|
103
|
+
"close": "290.00",
|
|
104
|
+
"change": "5.00",
|
|
105
|
+
"change_ratio": "0.018",
|
|
106
|
+
"amplitude": "0.0246",
|
|
107
|
+
"volume": "80000000",
|
|
108
|
+
"turnover_rate": "0.005",
|
|
109
|
+
"market_value": "4500000000000",
|
|
110
|
+
"exchange_code": "NAS",
|
|
111
|
+
"currency_code": "USD",
|
|
112
|
+
"relative_volume_10d": "2.35",
|
|
113
|
+
},
|
|
114
|
+
]
|
|
127
115
|
result = format_most_active(data)
|
|
128
116
|
assert "Most Active" in result
|
|
129
117
|
assert "AAPL" in result
|
|
@@ -301,6 +301,14 @@ def test_th_registered_and_eu_deferred():
|
|
|
301
301
|
get_region_config("eu")
|
|
302
302
|
|
|
303
303
|
|
|
304
|
+
def test_au_registered_stocks_only():
|
|
305
|
+
"""AU is a supported region for US stocks/ETFs only (no options)."""
|
|
306
|
+
from webull_openapi_mcp.region_config import SUPPORTED_REGIONS, get_region_config
|
|
307
|
+
assert "au" in SUPPORTED_REGIONS
|
|
308
|
+
au = get_region_config("au")
|
|
309
|
+
assert au.supports_options is False
|
|
310
|
+
assert au.valid_instrument_categories == frozenset({"US_STOCK", "US_ETF"})
|
|
311
|
+
assert "eu" not in SUPPORTED_REGIONS
|
|
304
312
|
def _schema_types(schema: dict) -> set[str]:
|
|
305
313
|
"""Extract JSON Schema types from either a direct type or anyOf schema."""
|
|
306
314
|
types: set[str] = set()
|