Initial Application Configuration

⚙️ Application Configuration

The new MagicTradeBot doesn’t require any management backend, database, or complex installation. It runs directly as a lightweight self-hosted application with simple YAML and JSON configuration files. This makes it extremely resource-efficient and suitable for both technical and non-technical users.

Instead of traditional databases, all configurations and logs are stored in structured files. You can edit them directly with any text editor or IDE.

📁 Configuration Files Overview

  • appsettings.yaml — Core bot and exchange configuration.
  • tradesettings.yaml — Trading logic, signal processing, and automation settings.
  • symbols.json — Manages symbol sync and tracking for exchanges.
  • opentrades.yaml — System file for tracking open positions (do not edit).
  • completedorders.yaml — Logs completed trades and PnL summaries.

You can run the bot in demo mode for testing, adjust trading strategies, or go live with real API keys. Always review your configuration before starting live trading.

🧠 Core Bot Settings (appsettings.yaml)


# ===========================================================
#  MagicTradeBot Configuration File (appsettings.yaml)
# ===========================================================

Exchange:
  Name: "binance"     # Supported: binance, okx, bitget, bybit, hype | hyperliquid
  APIKEY: ""          # API Key for centralized exchanges
  APISECRET: ""       # API Secret or Private Key (for Hyperliquid, use wallet key)
  Passphrase: ""      # Only required by some exchanges (OKX, Bitget)

# Environment Variable Alternative (Recommended)
# Use BINANCE_API_KEY, OKX_API_KEY, etc., to avoid saving credentials in files.

# -----------------------------------------------------------
# License Settings
# -----------------------------------------------------------
License:
  Key: "your_license_here" # Enter your valid license key
  # Generate, extend, or upgrade at: https://magictradebot.com

# -----------------------------------------------------------
# General Application Settings
# -----------------------------------------------------------
General:
  BotName: "MyBot01"
  DemoMode: true          # true = simulation mode
  DebugMode: false
  Timezone: "UTC"

# -----------------------------------------------------------
# Kline / Market Data Configuration
# -----------------------------------------------------------
Kline:
  RefreshInterval: 3
  maxKlineLength: 30
  chunkSize: 20
  refreshRate: 7
  summaryInterval: "3m"
  strategyIntervals:
    scalp: ["3m"]
    day: ["15m", "30m", "1h", "2h"]
    swing: ["1h", "2h", "4h", "6h"]
    long: ["1d"]
    default: ["5m", "15m", "1h"]

# -----------------------------------------------------------
# Rate Limits
# -----------------------------------------------------------
rateLimits:
  maxRequestsPerSecond: 10
  safeBuffer: 0.2

# -----------------------------------------------------------
# Broadcast / Notification Channels
# -----------------------------------------------------------
BroadCast:
  whatsapp_token: null
  whatsapp_phone_id: null
  discord_webhook_url: null
  instagram_token: null
  telegram_bot_token: null
  telegram_chat_id: null

✅ For full configuration details and advanced tuning (trading modes, signal handling, money management), visit the Configuration section.

🤖 Trading Logic & Signal Configuration (tradesettings.yaml)

This file defines your trading profiles, signal rules, smart stop-loss/take-profit behavior, and money management strategies. You can run scalp, swing, or long-term trading modes with complete control.


# MAGIC TRADE BOT - TRADE SETTINGS
# --------------------------------

General:
  Profile: "scalp"
  BaseCurrency: "USDT"
  SyncSymbolsOnStartup: true
  InitialTradeAmount: 100.0
  Leverage: 5
  MaxOpenTrades: 10
  MoneyManagementStrategy: 0

SignalSettings:
  enable_extreme_volatility: true
  supported_volatility_action:
    - "BUY"
    - "SELL"
    - "PUMP"
    - "CRASH"
  enable_fisher_only_detection: true
  pump_multiplier: 0.04
  crash_multiplier: 0.025

SLTPSettings:
  StopLossPercent: 0.0
  TakeProfitPercent: 0.0
  EnableTrailingSl: false
  EnableBreakeven: false
  EnableTrailingTp: false

IntelligentRuleOptions:
  IsEnabled: true
  UseOriginalTPAsBase: false
  CandleExitRules:
    IsEnabled: false

IntelligentGlobalSettings:
  MinProfitToEnableTP: 0.0
  MaxLossBeforeForceClose: -30.0

💡 Each section can be customized or disabled individually. The bot dynamically adjusts trading logic based on these configurations. To explore all available fields, check the detailed Trade Configuration documentation.

📦 Symbols Management (symbols.json)

The bot can automatically sync all tradable symbols from your connected exchange (e.g., Binance 500+ pairs). You can disable syncing or limit it to specific trading pairs.


{
  "syncEnabled": true,
  "includeSymbols": ["BTCUSDT", "ETHUSDT"],
  "excludeSymbols": ["USDCUSDT"]
}

You can also define per-symbol configurations for leverage, cooldowns, or triggers to refine your trading strategy for specific markets.

💾 System Files

  • opentrades.yaml — Stores currently active trades. Do not modify manually.
  • completedorders.yaml — Records trade history and PnL results for reports and performance tracking.

These files help the bot resume safely after restarts and maintain consistency between live and demo sessions.

🚀 Quick Start Summary

  • Download the MagicTradeBot package.
  • Edit appsettings.yaml and tradesettings.yaml.
  • Add your exchange API keys or set them via environment variables.
  • Run the bot — it will automatically load symbols, start scanning, and manage trades.

📎 Related Topics