Getting Started
Production target: Windows with MetaTrader 5 installed and open. Use PowerShell as below.
Create a venv and install
cd telegram-metatrader
py -3.11 -m venv .venv
.\.venv\Scripts\Activate.ps1
pip install -e .[dev]
copy .env.example .envEdit .env
Set Telegram API credentials, CHAT_ID, optional MT5 account credentials, fixed volume, and
SYMBOL_MAP_JSON. Full table: Configuration.
First login
telegram-metatrader-login
telegram-metatrader-verify-chatThe login command creates TELEGRAM_SESSION_PATH. Treat the session file or
TELEGRAM_SESSION_STRING like a password.
Run
telegram-metatraderHealth endpoints
| Path | Purpose |
|---|---|
GET /health | Liveness |
GET /status | Counters, current chat, dry-run/live mode, and cursor state |
Default bind from .env.example: HTTP_HOST=127.0.0.1, HTTP_PORT=8091.
Orders stay dry-run until LIVE_TRADING_ENABLED=true. See
Safety.
Next steps
Last updated on