⚙️ Environment Config

Port 57504

🔑 API Credentials & Security

Exchange API keys and platform security settings

API_SECRET_KEY

Protects all dashboard API endpoints

COINDCX_API_KEY

From CoinDCX → Settings → API Management

COINDCX_SECRET_KEY

HMAC signing key for CoinDCX orders

DHAN_CLIENT_ID

From DhanHQ → Settings → API

DHAN_ACCESS_TOKEN

JWT token from DhanHQ dashboard

🔮 Pi42 Futures (HFT)

Pi42 INR-margined crypto futures — used for HFT and leverage trading

PI42_API_KEY

From Pi42 → Account → API section

PI42_API_SECRET

Shown only once during creation — save it

PI42_LEVERAGE

Default leverage for futures trades (1-75)

PI42_MARGIN_MODE

ISOLATED = per-position risk, CROSS = shared margin

🚀 Trading Mode

LIVE TRADING ONLY — Paper trading is disabled

RAPID_MODE

Enable rapid scalping (10s cycles, tight targets)

HFT_ENABLED

Enable high-frequency trading (sub-second)

💰 Capital & Risk Management

Trading capital and risk limits

CRYPTO_INITIAL_CAPITAL

Starting capital for crypto trading

NSE_INITIAL_CAPITAL

Starting capital for stock trading

MAX_DAILY_LOSS_PCT

Trading halts when daily loss exceeds this %

MAX_DRAWDOWN_PCT

Trading halts when drawdown from peak exceeds this %

MAX_EXPOSURE_PCT

Maximum % of capital deployed at once

MAX_CONCURRENT_TRADES

Maximum open positions allowed

CRYPTO_MAX_CONCURRENT_TRADES

Maximum open crypto positions

PROFIT_TARGET_PCT

Target profit per trade before trailing activates

MIN_ORDER_VALUE

Minimum order value in INR

⚡ Rapid Scalping Mode

High-frequency trading with tight targets

RAPID_MODE

Enable rapid scalping (10s cycles, tight targets)

RAPID_INTERVAL_SECONDS

How often the trading loop runs

RAPID_PROFIT_TARGET_PCT

Profit target in rapid mode

RAPID_STOP_LOSS_PCT

Stop loss in rapid mode

RAPID_MAX_CONCURRENT_TRADES

Max concurrent in rapid mode

RAPID_MAX_HOLD_MINUTES

Force-close positions after this many minutes

RAPID_MAX_DRAWDOWN_PCT

Drawdown halt threshold in rapid mode

📱 Notifications

Telegram alerts for trades and system events

TELEGRAM_BOT_TOKEN

From @BotFather on Telegram

TELEGRAM_CHAT_ID

Your chat or group ID for alerts

🤖 AI & ML

Local LLM and ML model settings

AI_CHAT_ENABLED

Enable Ollama-powered AI chat

OLLAMA_BASE_URL

Ollama server address

OLLAMA_MODEL

Default model for AI chat

MODEL_DIR

Path to XGBoost model files

🌐 Server & Database

Service ports and database paths

HOST

Server bind address

PORT

Crypto engine port

LOG_LEVEL

Logging verbosity

CRYPTO_DB_PATH

SQLite database for crypto trades

STOCK_DB_PATH

SQLite database for stock trades

CACHE_TTL_SECONDS

Market data cache lifetime

📈 Order Execution

Order polling and execution parameters

ORDER_POLL_INTERVAL

How often to check order status

ORDER_POLL_MAX_SECONDS

Max time to wait for order fill

ORDER_TIMEOUT_SECONDS

Cancel order if not filled within this time

STALE_PRICE_MAX_AGE

Skip symbols with data older than this

AUTO_RECONCILE

Automatically sync positions with exchange

AUTO_HEAL_POSITIONS

Auto-fix position mismatches