chore: Organize workspace structure - move docs, workflows, scripts to subdirectories
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
This commit is contained in:
105
archive/quick-trade.html
Normal file
105
archive/quick-trade.html
Normal file
@@ -0,0 +1,105 @@
|
||||
<!DOCTYPE html>
|
||||
<html>
|
||||
<head>
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1">
|
||||
<title>Quick Trade</title>
|
||||
<style>
|
||||
body {
|
||||
font-family: Arial, sans-serif;
|
||||
max-width: 500px;
|
||||
margin: 50px auto;
|
||||
padding: 20px;
|
||||
background: #1a1a1a;
|
||||
color: #fff;
|
||||
}
|
||||
button {
|
||||
width: 48%;
|
||||
padding: 30px;
|
||||
margin: 5px 1%;
|
||||
font-size: 20px;
|
||||
border: none;
|
||||
border-radius: 10px;
|
||||
cursor: pointer;
|
||||
font-weight: bold;
|
||||
}
|
||||
.buy { background: #10b981; color: white; }
|
||||
.sell { background: #ef4444; color: white; }
|
||||
.row { margin: 20px 0; }
|
||||
h2 { text-align: center; color: #10b981; }
|
||||
#status {
|
||||
margin-top: 20px;
|
||||
padding: 15px;
|
||||
border-radius: 10px;
|
||||
display: none;
|
||||
text-align: center;
|
||||
}
|
||||
.success { background: #10b981; }
|
||||
.error { background: #ef4444; }
|
||||
</style>
|
||||
</head>
|
||||
<body>
|
||||
<h2>📱 Quick Trade</h2>
|
||||
|
||||
<div class="row">
|
||||
<button class="buy" onclick="trade('buy', 'sol')">BUY SOL</button>
|
||||
<button class="sell" onclick="trade('sell', 'sol')">SELL SOL</button>
|
||||
</div>
|
||||
|
||||
<div class="row">
|
||||
<button class="buy" onclick="trade('buy', 'btc')">BUY BTC</button>
|
||||
<button class="sell" onclick="trade('sell', 'btc')">SELL BTC</button>
|
||||
</div>
|
||||
|
||||
<div class="row">
|
||||
<button class="buy" onclick="trade('buy', 'eth')">BUY ETH</button>
|
||||
<button class="sell" onclick="trade('sell', 'eth')">SELL ETH</button>
|
||||
</div>
|
||||
|
||||
<div id="status"></div>
|
||||
|
||||
<script>
|
||||
// SECRET TOKEN - Keep this file private! Only accessible from localhost
|
||||
const SECRET_TOKEN = 'YOUR_SECRET_HERE_' + Math.random().toString(36).substring(7);
|
||||
|
||||
// Only allow from localhost/internal network
|
||||
if (!window.location.hostname.match(/^(localhost|127\.0\.0\.1|10\.|192\.168\.|172\.)/)) {
|
||||
document.body.innerHTML = '<h2 style="color:red">Access Denied</h2>';
|
||||
}
|
||||
|
||||
async function trade(action, symbol) {
|
||||
const status = document.getElementById('status');
|
||||
status.style.display = 'block';
|
||||
status.className = '';
|
||||
status.textContent = '⏳ Sending...';
|
||||
|
||||
try {
|
||||
const response = await fetch('http://10.0.0.48:8098/webhook/3371ad7c-0866-4161-90a4-f251de4aceb8', {
|
||||
method: 'POST',
|
||||
headers: {
|
||||
'Content-Type': 'application/json',
|
||||
'X-Secret-Token': SECRET_TOKEN
|
||||
},
|
||||
body: JSON.stringify({
|
||||
body: `${action} ${symbol}`,
|
||||
secret: SECRET_TOKEN
|
||||
})
|
||||
});
|
||||
|
||||
if (response.ok) {
|
||||
status.className = 'success';
|
||||
status.textContent = `✅ ${action.toUpperCase()} ${symbol.toUpperCase()} sent!`;
|
||||
} else {
|
||||
throw new Error(`HTTP ${response.status}`);
|
||||
}
|
||||
} catch (error) {
|
||||
status.className = 'error';
|
||||
status.textContent = `❌ Error: ${error.message}`;
|
||||
}
|
||||
|
||||
setTimeout(() => {
|
||||
status.style.display = 'none';
|
||||
}, 3000);
|
||||
}
|
||||
</script>
|
||||
</body>
|
||||
</html>
|
||||
Reference in New Issue
Block a user