Organization: - Created docs/ with setup/, guides/, history/ subdirectories - Created workflows/ with trading/, analytics/, telegram/, archive/ subdirectories - Created scripts/ with docker/, setup/, testing/ subdirectories - Created tests/ for TypeScript test files - Created archive/ for unused reference files Moved files: - 17 documentation files → docs/ - 16 workflow JSON files → workflows/ - 10 shell scripts → scripts/ - 4 test files → tests/ - 5 unused files → archive/ Updated: - README.md with new file structure and documentation paths Deleted: - data/ (empty directory) - screenshots/ (empty directory) Critical files remain in root: - telegram_command_bot.py (active bot - used by Dockerfile) - watch-restart.sh (systemd service dependency) - All Dockerfiles and docker-compose files - All environment files Validation: Containers running (trading-bot-v4, telegram-trade-bot, postgres) API responding (positions endpoint tested) Telegram bot functional (/status command tested) All critical files present in root No code changes - purely organizational. System continues running without interruption. Recovery: git revert HEAD or git reset --hard cleanup-before
156 lines
4.0 KiB
JSON
156 lines
4.0 KiB
JSON
{
|
|
"name": "Manual Trade Command - ADD TO MONEY MACHINE",
|
|
"nodes": [
|
|
{
|
|
"parameters": {
|
|
"httpMethod": "POST",
|
|
"path": "manual-trade",
|
|
"responseMode": "responseNode",
|
|
"options": {}
|
|
},
|
|
"id": "webhook-manual-trade",
|
|
"name": "Manual Trade Webhook",
|
|
"type": "n8n-nodes-base.webhook",
|
|
"typeVersion": 1.1,
|
|
"position": [
|
|
-840,
|
|
280
|
|
],
|
|
"webhookId": "manual-trade-webhook"
|
|
},
|
|
{
|
|
"parameters": {
|
|
"fields": {
|
|
"values": [
|
|
{
|
|
"name": "command",
|
|
"stringValue": "={{ $json.body.text || $json.body.message || $json.body }}"
|
|
},
|
|
{
|
|
"name": "symbol",
|
|
"stringValue": "={{ ($json.body.text || $json.body.message || $json.body).toString().match(/\\b(SOL|BTC|ETH)\\b/i) ? ($json.body.text || $json.body.message || $json.body).toString().match(/\\b(SOL|BTC|ETH)\\b/i)[0].toUpperCase() + '-PERP' : 'SOL-PERP' }}"
|
|
},
|
|
{
|
|
"name": "direction",
|
|
"stringValue": "={{ ($json.body.text || $json.body.message || $json.body).toString().match(/\\b(sell|short)\\b/i) ? 'short' : 'long' }}"
|
|
},
|
|
{
|
|
"name": "timeframe",
|
|
"stringValue": "5"
|
|
},
|
|
{
|
|
"name": "source",
|
|
"stringValue": "manual"
|
|
}
|
|
]
|
|
},
|
|
"options": {}
|
|
},
|
|
"id": "parse-manual-command",
|
|
"name": "Parse Command",
|
|
"type": "n8n-nodes-base.set",
|
|
"typeVersion": 3.2,
|
|
"position": [
|
|
-660,
|
|
280
|
|
]
|
|
},
|
|
{
|
|
"parameters": {
|
|
"chatId": "579304651",
|
|
"text": "🤖 Manual Trade Command\n\n📊 {{ $json.symbol }}\n{{ $json.direction === 'long' ? '📈' : '📉' }} {{ $json.direction.toUpperCase() }}\n⏰ {{ $now.toFormat('HH:mm:ss') }}\n\n✅ Sending to bot...",
|
|
"additionalFields": {
|
|
"appendAttribution": false
|
|
}
|
|
},
|
|
"id": "telegram-confirm",
|
|
"name": "Send Telegram Confirmation",
|
|
"type": "n8n-nodes-base.telegram",
|
|
"typeVersion": 1.1,
|
|
"position": [
|
|
-480,
|
|
280
|
|
],
|
|
"credentials": {
|
|
"telegramApi": {
|
|
"id": "Csk5cg4HtaSqP5jJ",
|
|
"name": "Telegram account"
|
|
}
|
|
}
|
|
},
|
|
{
|
|
"parameters": {
|
|
"respondWith": "json",
|
|
"responseBody": "={{ { \"status\": \"received\", \"symbol\": $json.symbol, \"direction\": $json.direction } }}"
|
|
},
|
|
"id": "webhook-response",
|
|
"name": "Webhook Response",
|
|
"type": "n8n-nodes-base.respondToWebhook",
|
|
"typeVersion": 1,
|
|
"position": [
|
|
-480,
|
|
380
|
|
]
|
|
},
|
|
{
|
|
"parameters": {
|
|
"mode": "raw",
|
|
"jsonOutput": "={{ { \"symbol\": $json.symbol, \"direction\": $json.direction, \"timeframe\": $json.timeframe } }}"
|
|
},
|
|
"id": "output-to-check-risk",
|
|
"name": "➡️ Connect to Check Risk Node",
|
|
"type": "n8n-nodes-base.set",
|
|
"typeVersion": 3.3,
|
|
"position": [
|
|
-300,
|
|
280
|
|
],
|
|
"notes": "Connect this node to your Money Machine's Check Risk node (same place as TradingView webhook)"
|
|
}
|
|
],
|
|
"connections": {
|
|
"Manual Trade Webhook": {
|
|
"main": [
|
|
[
|
|
{
|
|
"node": "Parse Command",
|
|
"type": "main",
|
|
"index": 0
|
|
}
|
|
]
|
|
]
|
|
},
|
|
"Parse Command": {
|
|
"main": [
|
|
[
|
|
{
|
|
"node": "Send Telegram Confirmation",
|
|
"type": "main",
|
|
"index": 0
|
|
},
|
|
{
|
|
"node": "Webhook Response",
|
|
"type": "main",
|
|
"index": 0
|
|
}
|
|
]
|
|
]
|
|
},
|
|
"Send Telegram Confirmation": {
|
|
"main": [
|
|
[
|
|
{
|
|
"node": "➡️ Connect to Check Risk Node",
|
|
"type": "main",
|
|
"index": 0
|
|
}
|
|
]
|
|
]
|
|
}
|
|
},
|
|
"active": false,
|
|
"settings": {
|
|
"executionOrder": "v1"
|
|
}
|
|
}
|