Before launching MagicTradeBot, you'll need to configure the management backend and core bot instance. Below are the configuration examples and important tips for each component.
🖥️ ASP.NET Core Management App (appsettings.json
)
Location: /management/appsettings.json
// appsettings.json (v1.2)
{
"ConnectionStrings": {
"SQLLight": "Data Source=Data/MTManagementDB.db",
"SQLSERVER": "",
"Postge": "",
"MySQL": ""
},
"ApplicationSettings": {
"Author": "MagicTradeBot",
"PageCaption": "MagicTradeBot Management Application",
"Environment": "Development",
"IsDemo": true,
"Domain": {
"Backend": "https://localhost:44353",
"Frontend": "http://localhost:4200"
},
"Localization": {
"DefaultCulture": "en",
"Timezone": "America/Los_Angeles",
"Currency": "USD"
},
"Pagination": {
"DefaultPageSize": 18,
"MaxPageSize": 100,
"VisiblePageCount": 5
},
"Caching": {
"Enabled": true,
"Duration": 3600,
"MaxCacheSize": "500MB"
},
"MaximumUrlCharacters": 60
},
"JwtSettings": {
"SecretKey": "{JWT_SECRET}",
"Issuer": "$ApplicationSettings:Domain.Backend",
"Audience": "$ApplicationSettings:Domain.Frontend",
"Expiration": {
"AccessToken": "15m",
"RefreshToken": "7d"
}
},
"SecurityHeaders": {
"StrictTransportSecurity": "max-age=31536000; includeSubDomains",
"ContentSecurityPolicy": "",
"XContentTypeOptions": "nosniff",
"ReferrerPolicy": "strict-origin-when-cross-origin"
},
"Secrets": {
"Database": {
"Host": "",
"Name": "",
"User": "",
"Password": ""
}
},
"AllowedHosts": [
"http://localhost:4200",
"https://magictradebot.com",
"*.magictradebot.com"
]
}
💡 Quick Tips
- Move sensitive keys like
JwtSettings:SecretKey
andSecrets
to environment variables in production. - Ensure
Domain.Backend
matches the deployed API base URL. - Use
"Environment": "Production"
in live environments for better performance and security.
🤖 Golang Bot Configuration (config.yaml
)
server:
botName: "Bybit_Mainnet_Trading_Bot"
licenseKey: "hRnWOLo91ESUiZ8SkN986w"
isDemo: true
api: "https://localhost:7225/"
refreshRate: 5
totalConcurrentTrades: 0
maxLoss: 0
maxProfit: 0
exchangeId: 0
templateId: 0
strategy: 0
strategyMaxCount: 55
timeZone: "UTC"
debug: true
💡 Quick Tips
- Set
isDemo: true
when testing to avoid live trades. - Use a unique
botName
for each bot instance for easy log filtering. - Ensure
licenseKey
andapi
values match those from the Management App. strategyMaxCount
limits over-trading in loop-based strategies like Martingale.