Skip to content

"Vibe-Trading: Your Personal Trading Agent"

Merge PR #1409

Haozhe Wu12f3f64e313c
diff --cc .gitignore
index 74b60cf92,d3008223a..a890a7bdf
--- a/.gitignore
+++ b/.gitignore
@@@ -86,8 -84,9 +86,10 @@@ agent/uploads
/okx.json
/shoonya.json
/tiger.json
+ /toss.json
+ /toss-token.json
/trading212.json
+/upbit.json
/zerodha.json
agent/tests/*_result.json
.ruff_cache/
diff --cc README.md
index 9e49feda6,50f4cbf5c..2d9513e8d
--- a/README.md
+++ b/README.md
@@@ -602,9 -602,8 +602,9 @@@ Connector-first profiles. Most do read
| **Futu** | HK / US / A | read + paper + bounded live |
| **eToro** | global | read + paper + bounded live (Public API; demo keys reach only `/demo` paths, plus copy-trading workflows) |
| **MetaTrader 5** | forex / CFD | read + paper + bounded live (Exness-style; demo ⇔ paper identity guard) |
-| **Longbridge** · **Dhan** · **Shoonya** · **Zerodha** | US / HK · India (NSE/BSE) | read + paper only — no runtime paper/live discriminator, so live order placement is hard-refused |
+| **KIS** (한국투자증권) | Korea (KOSPI/KOSDAQ) | read + genuine paper (모의투자, a real broker-side sandbox on a separate host) — live order placement not yet wired for this market |
+| **Longbridge** · **Dhan** · **Shoonya** · **Zerodha** · **Upbit** | US / HK · India (NSE/BSE) · Korea (crypto) | read + paper only — no runtime paper/live discriminator, so live order placement is hard-refused |
- | **Trading 212** | UK / EU | fully read-only — `place_order` / `cancel_order` hard-refuse even paper |
+ | **Trading 212** · **Toss Securities** | UK / EU · Korea/US | fully read-only — `place_order` / `cancel_order` hard-refuse even paper (no verified sandbox) |
Paper-vs-live is a **structural per-broker runtime guard** (account-id format, host separation, demo flag, or trade environment), never a config flag the agent can flip. A broker exposing no such discriminator is capped at paper + read-only.
diff --cc README_ar.md
index 8dda6afda,69ffa4701..4cfa8562c
--- a/README_ar.md
+++ b/README_ar.md
@@@ -563,9 -563,8 +563,9 @@@ LONGBRIDGE_ACCESS_TOKEN=..
| **Futu** | HK / US / A | قراءة + ورقي + تداول حي محدود |
| **eToro** | global | قراءة + ورقي + تداول حي محدود (Public API؛ مفاتيح demo لا تصل بنيويًا إلا إلى مسارات `/demo`، مع دعم تدفقات التداول بالنسخ) |
| **MetaTrader 5** | forex / CFD | قراءة + ورقي + تداول حي محدود (بأسلوب Exness؛ حارس هوية demo ⇔ paper) |
-| **Longbridge** · **Dhan** · **Shoonya** · **Zerodha** | US / HK · الهند (NSE/BSE) | قراءة + ورقي فقط — لا يوجد مُميِّز وقت-تشغيل بين paper/live، لذا يُرفض تنفيذ الأوامر الحية بشكل صارم |
+| **KIS** | كوريا الجنوبية (KOSPI/KOSDAQ) | قراءة + حساب ورقي حقيقي (모의투자، بيئة اختبار حقيقية لدى الوسيط على مضيف منفصل) — تنفيذ الأوامر الحية لهذا السوق غير مفعّل بعد |
+| **Longbridge** · **Dhan** · **Shoonya** · **Zerodha** · **Upbit** | US / HK · الهند (NSE/BSE) · كوريا (crypto) | قراءة + ورقي فقط — لا يوجد مُميِّز وقت-تشغيل بين paper/live، لذا يُرفض تنفيذ الأوامر الحية بشكل صارم |
- | **Trading 212** | UK / EU | قراءة فقط بالكامل — تَرفض `place_order` / `cancel_order` حتى الورقي بشكل صارم |
+ | **Trading 212** · **Toss Securities** | UK / EU · كوريا/US | قراءة فقط بالكامل — تَرفض `place_order` / `cancel_order` حتى الورقي بشكل صارم (لا توجد بيئة اختبار موثّقة) |
التمييز بين الورقي والحي هو **حارس بنيوي على مستوى وقت التشغيل لكل وسيط** (صيغة معرّف الحساب، أو فصل المضيف، أو علامة demo، أو بيئة التداول)، وليس مجرّد إعداد يمكن للوكيل تبديله. أي وسيط لا يكشف عن هذا المُميِّز يُحصَر في الورقي + القراءة فقط.
diff --cc README_es.md
index 229a63aab,adafa2f6e..efa8a26b6
--- a/README_es.md
+++ b/README_es.md
@@@ -567,9 -567,8 +567,9 @@@ Perfiles centrados en el conector. La m
| **Futu** | HK / EE. UU. / A | lectura + paper + live acotado |
| **eToro** | global | lectura + paper + live acotado (API pública; las claves demo solo alcanzan rutas `/demo`, además de flujos de copy-trading) |
| **MetaTrader 5** | forex / CFD | lectura + paper + live acotado (estilo Exness; guardia de identidad demo ⇔ paper) |
-| **Longbridge** · **Dhan** · **Shoonya** · **Zerodha** | EE. UU. / HK · India (NSE/BSE) | solo lectura + paper — sin discriminador de runtime paper/live, por lo que la colocación de órdenes live se rechaza de forma estricta |
+| **KIS** (Korea Investment & Securities) | Corea (KOSPI/KOSDAQ) | lectura + paper genuino (모의투자, un sandbox real del lado del broker en un host separado) — la colocación de órdenes live aún no está conectada para este mercado |
+| **Longbridge** · **Dhan** · **Shoonya** · **Zerodha** · **Upbit** | EE. UU. / HK · India (NSE/BSE) · Corea (cripto) | solo lectura + paper — sin discriminador de runtime paper/live, por lo que la colocación de órdenes live se rechaza de forma estricta |
- | **Trading 212** | Reino Unido / UE | completamente de solo lectura — `place_order` / `cancel_order` se rechazan de forma estricta incluso en paper |
+ | **Trading 212** · **Toss Securities** | Reino Unido / UE · Corea/EE. UU. | completamente de solo lectura — `place_order` / `cancel_order` se rechazan de forma estricta incluso en paper (sin sandbox verificado) |
Paper-vs-live es una **guardia de runtime estructural por broker** (formato de id de cuenta, separación de host, flag demo, o entorno de trading), nunca un flag de configuración que el agente pueda cambiar. Un broker que no exponga tal discriminador queda limitado a paper + solo lectura.
diff --cc README_ja.md
index c142779e8,78147afe9..302979d2a
--- a/README_ja.md
+++ b/README_ja.md
@@@ -563,9 -563,8 +563,9 @@@ connector-first のプロファイル�
| **Futu** | HK / US / A | read + paper + bounded live |
| **eToro** | global | read + paper + bounded live(Public API;demo キーは構造上 `/demo` パスにしか到達せず、コピートレードのワークフローにも対応) |
| **MetaTrader 5** | forex / CFD | read + paper + bounded live (Exness-style; demo ⇔ paper identity guard) |
-| **Longbridge** · **Dhan** · **Shoonya** · **Zerodha** | US / HK · India (NSE/BSE) | read + paper only — no runtime paper/live discriminator, so live order placement is hard-refused |
+| **KIS**(韓国投資証券) | 韓国 (KOSPI/KOSDAQ) | read + 本物のペーパー(모의투자、別ホストの本物のブローカー側サンドボックス)—— このマーケットのライブ発注は未対応 |
+| **Longbridge** · **Dhan** · **Shoonya** · **Zerodha** · **Upbit** | US / HK · India (NSE/BSE) · Korea (crypto) | read + paper only — no runtime paper/live discriminator, so live order placement is hard-refused |
- | **Trading 212** | UK / EU | fully read-only — `place_order` / `cancel_order` hard-refuse even paper |
+ | **Trading 212** · **Toss Securities** | UK / EU · Korea/US | fully read-only — `place_order` / `cancel_order` hard-refuse even paper (no verified sandbox) |
Paper-vs-live is a **structural per-broker runtime guard** (account-id format, host separation, demo flag, or trade environment), never a config flag the agent can flip. A broker exposing no such discriminator is capped at paper + read-only.
diff --cc README_ko.md
index fba125a93,a9492846a..f2519822b
--- a/README_ko.md
+++ b/README_ko.md
@@@ -563,9 -563,8 +563,9 @@@ connector-first 프로필. 대부분�
| **Futu** | HK / US / A | read + paper + bounded live |
| **eToro** | global | read + paper + bounded live (Public API; demo 키는 구조적으로 `/demo` 경로에만 도달하며, 카피 트레이딩 워크플로도 지원) |
| **MetaTrader 5** | forex / CFD | read + paper + bounded live (Exness-style; demo ⇔ paper identity guard) |
-| **Longbridge** · **Dhan** · **Shoonya** · **Zerodha** | US / HK · India (NSE/BSE) | read + paper only — no runtime paper/live discriminator, so live order placement is hard-refused |
+| **KIS** (한국투자증권) | 한국 (KOSPI/KOSDAQ) | read + 진짜 페이퍼(모의투자 — 별도 호스트의 실제 증권사 사이드 샌드박스) — 이 시장의 실거래 주문 실행은 아직 연결되지 않음 |
+| **Longbridge** · **Dhan** · **Shoonya** · **Zerodha** · **Upbit** | US / HK · India (NSE/BSE) · Korea (crypto) | read + paper only — no runtime paper/live discriminator, so live order placement is hard-refused |
- | **Trading 212** | UK / EU | fully read-only — `place_order` / `cancel_order` hard-refuse even paper |
+ | **Trading 212** · **Toss Securities** | UK / EU · 한국/US | fully read-only — `place_order` / `cancel_order` hard-refuse even paper (no verified sandbox) |
Paper-vs-live는 **구조적 브로커별 런타임 가드**(account-id 형식, 호스트 분리, demo 플래그, 또는 trade environment)이며, agent가 뒤집을 수 있는 config 플래그가 아닙니다. 그런 구분자를 노출하지 않는 브로커는 페이퍼 + 읽기 전용으로 제한됩니다.
diff --cc README_zh.md
index b427e56b2,b8c9bff9a..2d66fd555
--- a/README_zh.md
+++ b/README_zh.md
@@@ -576,9 -576,8 +576,9 @@@ LONGBRIDGE_ACCESS_TOKEN=..
| **Futu** | HK / US / A | 读取 + 模拟盘 + 受约束实盘 |
| **eToro** | global | 读取 + 模拟盘 + 受约束实盘(Public API;demo 密钥在结构上只能访问 `/demo` 路径,另支持跟单交易流程) |
| **MetaTrader 5** | forex / CFD | 读取 + 模拟盘 + 受约束实盘(Exness 风格;demo ⇔ 模拟盘身份守卫) |
-| **Longbridge** · **Dhan** · **Shoonya** · **Zerodha** | US / HK · India (NSE/BSE) | 仅读取 + 模拟盘——无运行时模拟/实盘判别标识,因此实盘下单被硬拒 |
+| **KIS** | 韩国 (KOSPI/KOSDAQ) | 读取 + 真实模拟盘(모의투자,独立主机上的真实券商侧沙盒)——该市场的实盘下单尚未接入 |
+| **Longbridge** · **Dhan** · **Shoonya** · **Zerodha** · **Upbit** | US / HK · India (NSE/BSE) · 韩国 (crypto) | 仅读取 + 模拟盘——无运行时模拟/实盘判别标识,因此实盘下单被硬拒 |
- | **Trading 212** | UK / EU | 完全只读——`place_order` / `cancel_order` 连模拟盘也硬拒 |
+ | **Trading 212** · **Toss Securities** | UK / EU · 韩国/美国 | 完全只读——`place_order` / `cancel_order` 连模拟盘也硬拒(无可验证的沙盒) |
模拟盘与实盘的区分是**每家券商的结构性运行时守卫**(account-id 格式、host 隔离、demo 标志或交易环境),绝非 agent 能翻转的配置开关。不暴露此类判别标识的券商一律封顶为模拟盘 + 只读。
diff --cc agent/SKILL.md
index 02155c59d,dcc78ad40..7ec783762
--- a/agent/SKILL.md
+++ b/agent/SKILL.md
@@@ -89,7 -89,7 +89,7 @@@ Create and run quantitative strategies
- **Premium cross-market data** via QVeris (optional API key)
- **Premium US data** via optional-key finnhub / alphavantage / tiingo / fmp (graceful fallback to free sources)
- Factors: the Alpha101 and QLib158 zoos are tagged for the `equity_in` and `equity_kr` universes, so they compute on NSE/BSE and KRX bars (the GTJA191 zoo stays China-only). Live/paper India trading uses the Shoonya / Dhan connectors (paper + read-only live; live order placement is structurally disabled because those brokers expose no paper/live switch). Live/paper Korea equity trading uses the **KIS** connector (한국투자증권; genuine 모의투자 paper sandbox on a separate host/port from 실전투자 live, plus read-only live — no mandate-gated live-trade profile yet). Live/paper Korea crypto trading uses the **Upbit** connector (KRW markets; paper + read-only live — no runtime paper/live discriminator, so live order placement is structurally disabled, same as Shoonya/Dhan).
-Factors: the Alpha101 and QLib158 zoos are tagged for the `equity_in` and `equity_kr` universes, so they compute on NSE/BSE and KRX bars (the GTJA191 zoo stays China-only). Live/paper India trading uses the Shoonya / Dhan connectors (paper + read-only live; live order placement is structurally disabled because those brokers expose no paper/live switch). Read-only Korea/US equity access is also available via the **Toss Securities** connector (토스증권) — no verified sandbox, so order placement always refuses, same as Trading 212.
++Factors: the Alpha101 and QLib158 zoos are tagged for the `equity_in` and `equity_kr` universes, so they compute on NSE/BSE and KRX bars (the GTJA191 zoo stays China-only). Live/paper India trading uses the Shoonya / Dhan connectors (paper + read-only live; live order placement is structurally disabled because those brokers expose no paper/live switch). Live/paper Korea equity trading uses the **KIS** connector (한국투자증권; genuine 모의투자 paper sandbox on a separate host/port from 실전투자 live, plus read-only live — no mandate-gated live-trade profile yet). Live/paper Korea crypto trading uses the **Upbit** connector (KRW markets; paper + read-only live — no runtime paper/live discriminator, so live order placement is structurally disabled, same as Shoonya/Dhan). Read-only Korea/US equity access is also available via the **Toss Securities** connector (토스증권) — no verified sandbox, so order placement always refuses, same as Trading 212.
Example workflow:
1. Use `list_skills()` to discover strategy patterns
diff --cc agent/src/live/registry.py
index 503fbfb14,ab55e7248..8ef469e09
--- a/agent/src/live/registry.py
+++ b/agent/src/live/registry.py
@@@ -36,8 -35,8 +36,9 @@@ from src.trading.connectors.robinhood.c
from src.trading.connectors.shoonya.classification import SHOONYA_TOOL_CLASS
from src.trading.connectors.tiger.classification import TIGER_TOOL_CLASS
from src.trading.connectors.etoro.classification import ETORO_TOOL_CLASS
+ from src.trading.connectors.toss.classification import TOSS_TOOL_CLASS
from src.trading.connectors.trading212.classification import TRADING212_TOOL_CLASS
+from src.trading.connectors.upbit.classification import UPBIT_TOOL_CLASS
from src.trading.connectors.zerodha.classification import ZERODHA_TOOL_CLASS
logger = logging.getLogger(__name__)
@@@ -61,8 -60,7 +62,9 @@@ _BROKER_CURATED_MAPS =
"mt5": MT5_TOOL_CLASS,
"etoro": ETORO_TOOL_CLASS,
"zerodha": ZERODHA_TOOL_CLASS,
+ "kis": KIS_TOOL_CLASS,
+ "upbit": UPBIT_TOOL_CLASS,
+ "toss": TOSS_TOOL_CLASS,
}
diff --cc agent/src/trading/onboarding.py
index db414e9b5,ae7543119..352c95a7a
--- a/agent/src/trading/onboarding.py
+++ b/agent/src/trading/onboarding.py
@@@ -176,16 -161,20 +176,30 @@@ _BUILTIN: dict[str, ConnectorOnboarding
dependency="requests",
install_command="pip install keyring",
),
+ "upbit": ConnectorOnboarding(
+ auth_type="api_key",
+ credential_fields=(
+ _field("access_key", "Access Key"),
+ _field("secret_key", "Secret Key"),
+ ),
+ dependency="PyJWT",
+ install_command='pip install "vibe-trading-ai[upbit]" keyring',
+ setup_hint="Create a read-only key; do not grant withdrawal permission.",
+ ),
+ "toss": ConnectorOnboarding(
+ auth_type="api_key",
+ credential_fields=(
+ _field("client_id", "Client ID"),
+ _field("client_secret", "Client Secret"),
+ _field("account_seq", "Account Sequence", secret=False),
+ ),
+ dependency="requests",
+ install_command="pip install keyring",
+ setup_hint=(
+ "Apply via the Toss Securities app (더보기 > Open API), then fetch "
+ "account_seq from GET /api/v1/accounts."
+ ),
+ ),
}
diff --cc agent/src/trading/profiles.py
index 1ea917298,a125c83bd..8f9331272
--- a/agent/src/trading/profiles.py
+++ b/agent/src/trading/profiles.py
@@@ -19,8 -18,8 +19,9 @@@ from src.trading.connectors.robinhood.p
from src.trading.connectors.shoonya.profiles import SHOONYA_PROFILES
from src.trading.connectors.tiger.profiles import TIGER_PROFILES
from src.trading.connectors.etoro.profiles import ETORO_PROFILES
+ from src.trading.connectors.toss.profiles import TOSS_PROFILES
from src.trading.connectors.trading212.profiles import TRADING212_PROFILES
+from src.trading.connectors.upbit.profiles import UPBIT_PROFILES
from src.trading.connectors.zerodha.profiles import ZERODHA_PROFILES
from src.trading.types import TradingProfile
@@@ -42,8 -41,7 +43,9 @@@ BUILTIN_PROFILES: tuple[TradingProfile
*MT5_PROFILES,
*ETORO_PROFILES,
*ZERODHA_PROFILES,
+ *KIS_PROFILES,
+ *UPBIT_PROFILES,
+ *TOSS_PROFILES,
)
diff --cc agent/src/trading/service.py
index ef573a015,088f2ef8e..bdd6d8be9
--- a/agent/src/trading/service.py
+++ b/agent/src/trading/service.py
@@@ -25,8 -25,7 +25,9 @@@ _SDK_CONNECTOR_MODULES =
"dhan": "src.trading.connectors.dhan.sdk",
"shoonya": "src.trading.connectors.shoonya.sdk",
"zerodha": "src.trading.connectors.zerodha.sdk",
+ "kis": "src.trading.connectors.kis.sdk",
+ "upbit": "src.trading.connectors.upbit.sdk",
+ "toss": "src.trading.connectors.toss.sdk",
"trading212": "src.trading.connectors.trading212.sdk",
"mt5": "src.trading.connectors.mt5.sdk",
"etoro": "src.trading.connectors.etoro.sdk",
diff --cc agent/tests/test_paper_capped_connectors_refuse_live.py
index af84c6ba4,6a6083c11..6845cbe1c
--- a/agent/tests/test_paper_capped_connectors_refuse_live.py
+++ b/agent/tests/test_paper_capped_connectors_refuse_live.py
@@@ -28,7 -28,7 +28,7 @@@ _CONNECTOR_ROOT = Path(__file__).resolv
# Brokers with no runtime paper/live discriminator. Capped at paper; every
# order entry point must refuse a non-paper config up front.
- _PAPER_CAPPED = frozenset({"longbridge", "dhan", "shoonya", "trading212", "zerodha", "upbit"})
-_PAPER_CAPPED = frozenset({"longbridge", "dhan", "shoonya", "trading212", "zerodha", "toss"})
++_PAPER_CAPPED = frozenset({"longbridge", "dhan", "shoonya", "trading212", "zerodha", "upbit", "toss"})
# Brokers with a structural discriminator (host separation, demo flag, account
# id format, trade environment). Live placement is allowed here, but only
diff --cc agent/tests/test_portfolio_compatibility.py
index 8f027bbf5,df07abc47..d0d253ba1
--- a/agent/tests/test_portfolio_compatibility.py
+++ b/agent/tests/test_portfolio_compatibility.py
@@@ -29,7 -28,7 +29,8 @@@ def test_every_builtin_portfolio_connec
"tiger": "experimental",
"trading212": "experimental",
"zerodha": "experimental",
+ "upbit": "experimental",
+ "toss": "experimental",
}
observed = {profile.connector: profile_compatibility(profile)["level"] for profile in eligible_profiles()}
diff --cc agent/tests/test_sdk_connectors.py
index 3289da3ea,d0489d51b..16cbbfbb2
--- a/agent/tests/test_sdk_connectors.py
+++ b/agent/tests/test_sdk_connectors.py
@@@ -58,8 -58,7 +58,9 @@@ def test_sdk_profiles_registered() -> N
"shoonya-paper-sdk", "shoonya-live-sdk-readonly",
"etoro-paper-sdk", "etoro-paper-trade",
"etoro-live-sdk-readonly", "etoro-live-trade",
+ "kis-paper-sdk", "kis-paper-trade", "kis-live-sdk-readonly",
+ "upbit-paper-sdk", "upbit-paper-trade", "upbit-live-sdk-readonly",
+ "toss-live-sdk-readonly",
} <= ids