|
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 @@ def __post_init__(self) -> None: |
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 @@ def __post_init__(self) -> None: |
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. |
|
0 commit comments