webull-openapi-mcp 1.2.4__tar.gz → 1.2.5__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.
Files changed (67) hide show
  1. {webull_openapi_mcp-1.2.4 → webull_openapi_mcp-1.2.5}/.env.example +1 -1
  2. {webull_openapi_mcp-1.2.4 → webull_openapi_mcp-1.2.5}/PKG-INFO +1 -1
  3. {webull_openapi_mcp-1.2.4 → webull_openapi_mcp-1.2.5}/mcpb/build_manifest.py +1 -1
  4. {webull_openapi_mcp-1.2.4 → webull_openapi_mcp-1.2.5}/pyproject.toml +1 -1
  5. {webull_openapi_mcp-1.2.4 → webull_openapi_mcp-1.2.5}/server.json +2 -2
  6. {webull_openapi_mcp-1.2.4 → webull_openapi_mcp-1.2.5}/tests/test_fundamental_screener_registration.py +2 -2
  7. {webull_openapi_mcp-1.2.4 → webull_openapi_mcp-1.2.5}/tests/test_sdk_client.py +2 -2
  8. {webull_openapi_mcp-1.2.4 → webull_openapi_mcp-1.2.5}/webull_openapi_mcp/__init__.py +1 -1
  9. {webull_openapi_mcp-1.2.4 → webull_openapi_mcp-1.2.5}/webull_openapi_mcp/cli.py +1 -1
  10. {webull_openapi_mcp-1.2.4 → webull_openapi_mcp-1.2.5}/webull_openapi_mcp/formatters.py +9 -0
  11. {webull_openapi_mcp-1.2.4 → webull_openapi_mcp-1.2.5}/webull_openapi_mcp/region_config.py +32 -2
  12. {webull_openapi_mcp-1.2.4 → webull_openapi_mcp-1.2.5}/webull_openapi_mcp/sdk_client.py +7 -1
  13. {webull_openapi_mcp-1.2.4 → webull_openapi_mcp-1.2.5}/.github/workflows/pypi-ci.yml +0 -0
  14. {webull_openapi_mcp-1.2.4 → webull_openapi_mcp-1.2.5}/.gitignore +0 -0
  15. {webull_openapi_mcp-1.2.4 → webull_openapi_mcp-1.2.5}/DISCLAIMER.md +0 -0
  16. {webull_openapi_mcp-1.2.4 → webull_openapi_mcp-1.2.5}/LICENSE +0 -0
  17. {webull_openapi_mcp-1.2.4 → webull_openapi_mcp-1.2.5}/README.md +0 -0
  18. {webull_openapi_mcp-1.2.4 → webull_openapi_mcp-1.2.5}/mcpb/.mcpbignore +0 -0
  19. {webull_openapi_mcp-1.2.4 → webull_openapi_mcp-1.2.5}/mcpb/build.sh +0 -0
  20. {webull_openapi_mcp-1.2.4 → webull_openapi_mcp-1.2.5}/mcpb/src/server.py +0 -0
  21. {webull_openapi_mcp-1.2.4 → webull_openapi_mcp-1.2.5}/tests/__init__.py +0 -0
  22. {webull_openapi_mcp-1.2.4 → webull_openapi_mcp-1.2.5}/tests/test_account_tools.py +0 -0
  23. {webull_openapi_mcp-1.2.4 → webull_openapi_mcp-1.2.5}/tests/test_audit.py +0 -0
  24. {webull_openapi_mcp-1.2.4 → webull_openapi_mcp-1.2.5}/tests/test_cli.py +0 -0
  25. {webull_openapi_mcp-1.2.4 → webull_openapi_mcp-1.2.5}/tests/test_config.py +0 -0
  26. {webull_openapi_mcp-1.2.4 → webull_openapi_mcp-1.2.5}/tests/test_errors.py +0 -0
  27. {webull_openapi_mcp-1.2.4 → webull_openapi_mcp-1.2.5}/tests/test_formatters.py +0 -0
  28. {webull_openapi_mcp-1.2.4 → webull_openapi_mcp-1.2.5}/tests/test_fundamental_tools.py +0 -0
  29. {webull_openapi_mcp-1.2.4 → webull_openapi_mcp-1.2.5}/tests/test_guards.py +0 -0
  30. {webull_openapi_mcp-1.2.4 → webull_openapi_mcp-1.2.5}/tests/test_instrument_tools.py +0 -0
  31. {webull_openapi_mcp-1.2.4 → webull_openapi_mcp-1.2.5}/tests/test_market_data_tools.py +0 -0
  32. {webull_openapi_mcp-1.2.4 → webull_openapi_mcp-1.2.5}/tests/test_property_audit.py +0 -0
  33. {webull_openapi_mcp-1.2.4 → webull_openapi_mcp-1.2.5}/tests/test_property_config.py +0 -0
  34. {webull_openapi_mcp-1.2.4 → webull_openapi_mcp-1.2.5}/tests/test_property_formatters.py +0 -0
  35. {webull_openapi_mcp-1.2.4 → webull_openapi_mcp-1.2.5}/tests/test_property_guards.py +0 -0
  36. {webull_openapi_mcp-1.2.4 → webull_openapi_mcp-1.2.5}/tests/test_property_sdk.py +0 -0
  37. {webull_openapi_mcp-1.2.4 → webull_openapi_mcp-1.2.5}/tests/test_property_server.py +0 -0
  38. {webull_openapi_mcp-1.2.4 → webull_openapi_mcp-1.2.5}/tests/test_screener_tools.py +0 -0
  39. {webull_openapi_mcp-1.2.4 → webull_openapi_mcp-1.2.5}/tests/test_stock_order_tools.py +0 -0
  40. {webull_openapi_mcp-1.2.4 → webull_openapi_mcp-1.2.5}/webull_openapi_mcp/__main__.py +0 -0
  41. {webull_openapi_mcp-1.2.4 → webull_openapi_mcp-1.2.5}/webull_openapi_mcp/audit.py +0 -0
  42. {webull_openapi_mcp-1.2.4 → webull_openapi_mcp-1.2.5}/webull_openapi_mcp/config.py +0 -0
  43. {webull_openapi_mcp-1.2.4 → webull_openapi_mcp-1.2.5}/webull_openapi_mcp/constants.py +0 -0
  44. {webull_openapi_mcp-1.2.4 → webull_openapi_mcp-1.2.5}/webull_openapi_mcp/errors.py +0 -0
  45. {webull_openapi_mcp-1.2.4 → webull_openapi_mcp-1.2.5}/webull_openapi_mcp/guards.py +0 -0
  46. {webull_openapi_mcp-1.2.4 → webull_openapi_mcp-1.2.5}/webull_openapi_mcp/server.py +0 -0
  47. {webull_openapi_mcp-1.2.4 → webull_openapi_mcp-1.2.5}/webull_openapi_mcp/tools/__init__.py +0 -0
  48. {webull_openapi_mcp-1.2.4 → webull_openapi_mcp-1.2.5}/webull_openapi_mcp/tools/market_data/__init__.py +0 -0
  49. {webull_openapi_mcp-1.2.4 → webull_openapi_mcp-1.2.5}/webull_openapi_mcp/tools/market_data/crypto.py +0 -0
  50. {webull_openapi_mcp-1.2.4 → webull_openapi_mcp-1.2.5}/webull_openapi_mcp/tools/market_data/event.py +0 -0
  51. {webull_openapi_mcp-1.2.4 → webull_openapi_mcp-1.2.5}/webull_openapi_mcp/tools/market_data/financial.py +0 -0
  52. {webull_openapi_mcp-1.2.4 → webull_openapi_mcp-1.2.5}/webull_openapi_mcp/tools/market_data/fundamental.py +0 -0
  53. {webull_openapi_mcp-1.2.4 → webull_openapi_mcp-1.2.5}/webull_openapi_mcp/tools/market_data/futures.py +0 -0
  54. {webull_openapi_mcp-1.2.4 → webull_openapi_mcp-1.2.5}/webull_openapi_mcp/tools/market_data/option.py +0 -0
  55. {webull_openapi_mcp-1.2.4 → webull_openapi_mcp-1.2.5}/webull_openapi_mcp/tools/market_data/screener.py +0 -0
  56. {webull_openapi_mcp-1.2.4 → webull_openapi_mcp-1.2.5}/webull_openapi_mcp/tools/market_data/stock.py +0 -0
  57. {webull_openapi_mcp-1.2.4 → webull_openapi_mcp-1.2.5}/webull_openapi_mcp/tools/market_data/watchlist.py +0 -0
  58. {webull_openapi_mcp-1.2.4 → webull_openapi_mcp-1.2.5}/webull_openapi_mcp/tools/trading/__init__.py +0 -0
  59. {webull_openapi_mcp-1.2.4 → webull_openapi_mcp-1.2.5}/webull_openapi_mcp/tools/trading/account.py +0 -0
  60. {webull_openapi_mcp-1.2.4 → webull_openapi_mcp-1.2.5}/webull_openapi_mcp/tools/trading/assets.py +0 -0
  61. {webull_openapi_mcp-1.2.4 → webull_openapi_mcp-1.2.5}/webull_openapi_mcp/tools/trading/crypto_order.py +0 -0
  62. {webull_openapi_mcp-1.2.4 → webull_openapi_mcp-1.2.5}/webull_openapi_mcp/tools/trading/event_order.py +0 -0
  63. {webull_openapi_mcp-1.2.4 → webull_openapi_mcp-1.2.5}/webull_openapi_mcp/tools/trading/futures_order.py +0 -0
  64. {webull_openapi_mcp-1.2.4 → webull_openapi_mcp-1.2.5}/webull_openapi_mcp/tools/trading/instrument.py +0 -0
  65. {webull_openapi_mcp-1.2.4 → webull_openapi_mcp-1.2.5}/webull_openapi_mcp/tools/trading/option_order.py +0 -0
  66. {webull_openapi_mcp-1.2.4 → webull_openapi_mcp-1.2.5}/webull_openapi_mcp/tools/trading/order.py +0 -0
  67. {webull_openapi_mcp-1.2.4 → webull_openapi_mcp-1.2.5}/webull_openapi_mcp/tools/trading/stock_order.py +0 -0
@@ -20,7 +20,7 @@ WEBULL_APP_SECRET=
20
20
  # Set to 'prod' for live trading (use with caution)
21
21
  # WEBULL_ENVIRONMENT=uat
22
22
 
23
- # Region ID: us, hk, jp, sg, my, uk, mx, br, or za
23
+ # Region ID: us, hk, jp, sg, th, my, uk, mx, br, or za
24
24
  # Default: us
25
25
  # WEBULL_REGION_ID=us
26
26
 
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.5
2
2
  Name: webull-openapi-mcp
3
- Version: 1.2.4
3
+ Version: 1.2.5
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
@@ -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, my, uk, mx, br, or za.",
197
+ "description": "Webull region: us, hk, jp, sg, th, my, uk, mx, br, or za.",
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.4"
7
+ version = "1.2.5"
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.4",
6
+ "version": "1.2.5",
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.4",
16
+ "version": "1.2.5",
17
17
  "runtimeHint": "uvx",
18
18
  "transport": {
19
19
  "type": "stdio"
@@ -199,14 +199,14 @@ def test_new_tools_registered_for_supported_regions(region):
199
199
  assert not missing, f"{region} missing: {missing}"
200
200
 
201
201
 
202
- @pytest.mark.parametrize("region", ["sg", "my", "uk", "mx", "br"])
202
+ @pytest.mark.parametrize("region", ["sg", "th", "my", "uk", "mx", "br"])
203
203
  def test_new_tools_absent_for_unsupported_regions(region):
204
204
  names = _build_server_tools(region)
205
205
  present = [t for t in EXPECTED_TOOLS if t in names]
206
206
  assert present, f"{region} should not expose: {present}"
207
207
 
208
208
 
209
- @pytest.mark.parametrize("region", ["us", "hk", "jp", "sg", "my", "uk", "mx", "br"])
209
+ @pytest.mark.parametrize("region", ["us", "hk", "jp", "sg", "th", "my", "uk", "mx", "br"])
210
210
  def test_legacy_tools_available_in_all_regions(region):
211
211
  names = _build_server_tools(region)
212
212
  missing = [t for t in LEGACY_TOOLS if t not in names]
@@ -27,10 +27,10 @@ class TestUATEndpoints:
27
27
  assert UAT_ENDPOINTS["default_region"] == "us"
28
28
 
29
29
  def test_regions_list(self):
30
- assert set(UAT_ENDPOINTS["regions"]) == {"us", "hk", "jp", "sg", "my", "uk", "mx", "br", "za"}
30
+ assert set(UAT_ENDPOINTS["regions"]) == {"us", "hk", "jp", "sg", "th", "my", "uk", "mx", "br", "za"}
31
31
 
32
32
  def test_each_region_has_all_api_types(self):
33
- for region in ("us", "hk", "jp", "sg", "my", "uk", "mx", "br", "za"):
33
+ for region in ("us", "hk", "jp", "sg", "th", "my", "uk", "mx", "br", "za"):
34
34
  mapping = UAT_ENDPOINTS["region_mapping"][region]
35
35
  assert "api" in mapping
36
36
  assert "quotes-api" in mapping
@@ -1,3 +1,3 @@
1
1
  """Webull OpenAPI MCP Server - AI assistant integration for Webull OpenAPI."""
2
2
 
3
- __version__ = "1.2.4"
3
+ __version__ = "1.2.5"
@@ -152,7 +152,7 @@ WEBULL_APP_SECRET={app_secret}
152
152
  # API environment: uat or prod (default: uat)
153
153
  WEBULL_ENVIRONMENT={environment}
154
154
 
155
- # Optional: Region ID (default: us). Supported: us, hk, jp, sg, my, uk, mx, br, za
155
+ # Optional: Region ID (default: us). Supported: us, hk, jp, sg, th, my, uk, mx, br, za
156
156
  # WEBULL_REGION_ID=us
157
157
 
158
158
  # Optional: Risk control parameters
@@ -55,6 +55,13 @@ _DISCLAIMER_SG = (
55
55
  "Trading involves risk; please make decisions carefully.\n\n"
56
56
  )
57
57
 
58
+ _DISCLAIMER_TH = (
59
+ "⚠️ Disclaimer: "
60
+ "The information provided by this tool is for reference only "
61
+ "and does not constitute investment advice. "
62
+ "Trading involves risk; please make decisions carefully.\n\n"
63
+ )
64
+
58
65
  _DISCLAIMER_MY = (
59
66
  "⚠️ Disclaimer: "
60
67
  "The information provided by this tool is for reference only "
@@ -86,6 +93,8 @@ def set_disclaimer_region(region_id: str) -> None:
86
93
  DISCLAIMER = _DISCLAIMER_JP
87
94
  elif _current_region == "sg":
88
95
  DISCLAIMER = _DISCLAIMER_SG
96
+ elif _current_region == "th":
97
+ DISCLAIMER = _DISCLAIMER_TH
89
98
  elif _current_region == "my":
90
99
  DISCLAIMER = _DISCLAIMER_MY
91
100
  elif _current_region == "uk":
@@ -1,6 +1,6 @@
1
1
  """Region-specific configuration for Webull MCP Server.
2
2
 
3
- Defines region configurations for US, HK, JP, SG, MY, UK, MX, BR, and ZA markets with:
3
+ Defines region configurations for US, HK, JP, SG, TH, MY, UK, MX, BR, and ZA markets with:
4
4
  - Feature flags (futures, crypto, event contracts, etc.)
5
5
  - Valid enum sets for order types, time-in-force, trading sessions, etc.
6
6
 
@@ -195,6 +195,35 @@ SG_REGION_CONFIG = RegionConfig(
195
195
  )
196
196
 
197
197
 
198
+ # =============================================================================
199
+ # TH Region Configuration
200
+ # =============================================================================
201
+ TH_REGION_CONFIG = RegionConfig(
202
+ region_id="th",
203
+ supports_futures=False,
204
+ supports_crypto=False,
205
+ supports_event_contracts=False,
206
+ supports_combo_orders=False,
207
+ supports_option_strategies=False,
208
+ supports_algo_orders=False,
209
+ valid_order_types=frozenset({
210
+ "MARKET", "LIMIT", "STOP_LOSS", "STOP_LOSS_LIMIT"
211
+ }),
212
+ valid_time_in_force=frozenset({"DAY", "GTC"}),
213
+ valid_trading_sessions=frozenset({"NIGHT", "ALL", "CORE", "ALL_DAY"}),
214
+ valid_combo_types=frozenset({"NORMAL"}),
215
+ valid_option_strategies=frozenset({"SINGLE"}),
216
+ valid_market_categories=frozenset({"US"}),
217
+ valid_order_markets=frozenset({"US"}),
218
+ valid_instrument_categories=frozenset({"US_STOCK", "US_ETF"}),
219
+ supports_options=False,
220
+ supports_fundamentals=True,
221
+ asset_type_account_classes={
222
+ "stock": frozenset({"INDIVIDUAL_CASH"}),
223
+ },
224
+ )
225
+
226
+
198
227
  # =============================================================================
199
228
  # MY Region Configuration
200
229
  # =============================================================================
@@ -406,12 +435,13 @@ REGION_CONFIGS: dict[str, RegionConfig] = {
406
435
  "hk": HK_REGION_CONFIG,
407
436
  "jp": JP_REGION_CONFIG,
408
437
  "sg": SG_REGION_CONFIG,
438
+ "th": TH_REGION_CONFIG,
409
439
  "my": MY_REGION_CONFIG,
410
440
  "uk": UK_REGION_CONFIG,
411
441
  "mx": MX_REGION_CONFIG,
412
442
  "br": BR_REGION_CONFIG,
413
443
  "za": ZA_REGION_CONFIG,
414
- # Note: TH, EU, and AU are not supported yet due to compliance
444
+ # Note: EU and AU are not supported yet due to compliance
415
445
  # requirements and are intentionally not registered, so selecting these
416
446
  # regions raises UnsupportedRegionError. Their RegionConfig objects are
417
447
  # kept defined above for quick re-enablement once compliance clears.
@@ -24,6 +24,7 @@ _2FA_GUIDE_LINKS: dict[str, str] = {
24
24
  "mx": "https://developer.webull.com.mx/apis/docs/authentication/token",
25
25
  "my": "https://developer.webull.com.my/apis/docs/authentication/token",
26
26
  "sg": "https://developer.webull.com.sg/apis/docs/authentication/token",
27
+ "th": "https://developer.webull.co.th/apis/docs/authentication/token",
27
28
  "uk": "https://developer.webull-uk.com/apis/docs/authentication/token",
28
29
  "us": "https://developer.webull.com/apis/docs/authentication/token",
29
30
  "za": "https://developer.webull.co.za/apis/docs/authentication/token",
@@ -138,7 +139,7 @@ class DeviceNotRegisteredError(Exception):
138
139
  # based on each request's api_type - no add_endpoint() calls needed.
139
140
  UAT_ENDPOINTS: dict = {
140
141
  "default_region": "us",
141
- "regions": ["us", "hk", "jp", "sg", "my", "uk", "mx", "br", "za"],
142
+ "regions": ["us", "hk", "jp", "sg", "th", "my", "uk", "mx", "br", "za"],
142
143
  "region_mapping": {
143
144
  "us": {
144
145
  "api": "api.sandbox.webull.com",
@@ -160,6 +161,11 @@ UAT_ENDPOINTS: dict = {
160
161
  "quotes-api": "data-api.uat.webullbroker.com",
161
162
  "events-api": "sg-events-api.uat.webullbroker.com",
162
163
  },
164
+ "th": {
165
+ "api": "th-api.uat.webullbroker.com",
166
+ "quotes-api": "data-api.uat.webullbroker.com",
167
+ "events-api": "th-events-api.uat.webullbroker.com",
168
+ },
163
169
  "my": {
164
170
  "api": "my-api.uat.webullbroker.com",
165
171
  "quotes-api": "data-api.uat.webullbroker.com",