-
-
Notifications
You must be signed in to change notification settings - Fork 101
6. Exchanges and trading
Jeong Seongmoon edited this page Jul 15, 2026
·
1 revision
smtm supports real trading on Upbit, Bithumb, and Binance, and any configuration can be validated first with paper trading (virtual mode).
Everything is controlled by chatting with the Telegram AI Agent. Budget, currency, exchange, strategy, and interval are profile/session settings.
| Code | Exchange | Quote currency | Coins | Real trading | Notes |
|---|---|---|---|---|---|
UPB |
Upbit | KRW | BTC, ETH, DOGE, XRP | ✅ | Default |
BTH |
Bithumb | KRW | BTC, ETH | ✅ | |
BNC |
Binance | USDT | BTC, ETH, DOGE, XRP | ✅ | Budget & amounts are in USDT |
| (virtual) | Simulation | profile budget currency | selected coin | virtual | With virtual: true, any code runs on the in-memory simulator |
Combined data-source codes (
UPN/UMN/USC/UFC/UBD, etc.) enrich market data. OnlyUPB/BTH/BNChave an order-executing Trader wired; use other codes in virtual mode.
| Order type | Upbit / Bithumb / Binance (real) | Simulation |
|---|---|---|
| Limit | ✅ | ✅ |
| Market | ✅ | ✅ |
| Stop-loss / Take-profit | ⏳ planned | ✅ (local emulation) |
| OCO / Trailing | ⏳ planned | ⏳ planned |
- If a request has no
ord_typefield, it is treated as a limit order (backward compatible). - Stop-loss/take-profit currently fire in virtual mode by checking the trigger against each tick's quote. Native conditional orders (Binance stop/OCO) and a session-level auto stop/take-profit policy are planned.
# Required: LLM API key
SMTM_LLM_API_KEY=your_anthropic_api_key
# Upbit (UPB)
UPBIT_OPEN_API_ACCESS_KEY=your_upbit_access_key
UPBIT_OPEN_API_SECRET_KEY=your_upbit_secret_key
UPBIT_OPEN_API_SERVER_URL=https://api.upbit.com
# Bithumb (BTH)
BITHUMB_API_ACCESS_KEY=your_bithumb_access_key
BITHUMB_API_SECRET_KEY=your_bithumb_secret_key
BITHUMB_API_SERVER_URL=https://api.bithumb.com
# Binance (BNC) — spot
BINANCE_API_ACCESS_KEY=your_binance_access_key
BINANCE_API_SECRET_KEY=your_binance_secret_key
BINANCE_API_SERVER_URL=https://api.binance.comRegister real-trading accounts by the env-var names (
register_account), never the key values.
The default session is virtual. For real trading, do this via chat:
-
register_account— register an account by the env-var names holding the keys -
create_profile— setexchange/currency/budget/strategy/termwithvirtual: falseandaccount -
create_session+start_session
Create a profile called upbit-btc: exchange UPB, currency BTC, budget 500000, strategy RSI, term 60, virtual false, account my-upbit
Create a session from upbit-btc and start it
Create a profile called binance-eth: exchange BNC, currency ETH, budget 300, strategy SMA, term 60, virtual false, account my-binance
Create a session from binance-eth and start it
Binance trades USDT pairs (BTCUSDT, etc.), so
budgetand all amounts are in USDT (the300above is 300 USDT).
- Binance is USDT-based: budget, returns, and trade amounts are all in USDT. Don't mix them up with KRW exchanges.
-
⚠️ Safety config for USDT sessions:SafetyGuard's amount-based defaults (max_trade_amount,initial_budget) assume KRW. For a Binance (USDT) session, set USDT-denominated values in the profile'ssafetyconfig. -
Market buy semantics: a market buy on Upbit/Binance spends
price × amount(total); a market sell on all three uses the coin quantity. - API rate limits: each session polls its exchange independently — keep the session count modest.
See also: 0. How to setup and run