feat: add Telegram bot for manual trade commands

- Added telegram_command_bot.py with slash commands (/buySOL, /sellBTC, etc)
- Docker compose setup with DNS configuration
- Sends trades as plain text to n8n webhook (same format as TradingView)
- Improved Telegram success message formatting
- Only responds to authorized chat ID (579304651)
- Commands: /buySOL, /sellSOL, /buyBTC, /sellBTC, /buyETH, /sellETH
This commit is contained in:
mindesbunister
2025-10-27 00:23:09 +01:00
parent c2842f88c0
commit 3e2cf2eec2
24 changed files with 2573 additions and 6 deletions

12
.env
View File

@@ -61,11 +61,11 @@ PYTH_HERMES_URL=https://hermes.pyth.network
# Position sizing
# Base position size in USD (default: 50 for safe testing)
# Example: 50 with 10x leverage = $500 notional position
MAX_POSITION_SIZE_USD=20
MAX_POSITION_SIZE_USD=80
# Leverage multiplier (1-20, default: 10)
# Higher leverage = bigger gains AND bigger losses
LEVERAGE=5
LEVERAGE=10
# Risk parameters (as percentages)
# Stop Loss: Close 100% of position when price drops this much
@@ -93,19 +93,19 @@ HARD_STOP_PERCENT=-2.5
# Take Profit 1: Close 50% of position at this profit level
# Example: +0.7% on 10x = +7% account gain
TAKE_PROFIT_1_PERCENT=0.7
TAKE_PROFIT_1_PERCENT=0.4
# Take Profit 1 Size: What % of position to close at TP1
# Example: 50 = close 50% of position
TAKE_PROFIT_1_SIZE_PERCENT=50
TAKE_PROFIT_1_SIZE_PERCENT=75
# Take Profit 2: Close remaining 50% at this profit level
# Example: +1.5% on 10x = +15% account gain
TAKE_PROFIT_2_PERCENT=1.5
TAKE_PROFIT_2_PERCENT=0.8
# Take Profit 2 Size: What % of remaining position to close at TP2
# Example: 100 = close all remaining position
TAKE_PROFIT_2_SIZE_PERCENT=50
TAKE_PROFIT_2_SIZE_PERCENT=100
# Emergency Stop: Hard stop if this level is breached
# Example: -2.0% on 10x = -20% account loss (rare but protects from flash crashes)