From 90d0d7bf0da291a5bd6ac49b9c1c00bd9e238534 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=D0=92=D0=B8=D0=BA=D1=82=D0=BE=D1=80?= <78488229+viktor138irk@users.noreply.github.com> Date: Fri, 8 May 2026 03:49:59 +0900 Subject: [PATCH] Replace live acknowledgement UI with simple mode switch --- app/static/index.html | 25 ++++++++----------------- 1 file changed, 8 insertions(+), 17 deletions(-) diff --git a/app/static/index.html b/app/static/index.html index d63157f..1021bc3 100644 --- a/app/static/index.html +++ b/app/static/index.html @@ -31,7 +31,7 @@ - + подключение... source: — @@ -51,15 +51,14 @@
-
Бот
+
Настройки
-
- - + +
@@ -158,8 +157,8 @@ async function decide() { document.getElementById('aiResult').textContent = JSON.stringify(json, null, 2); } -async function autoDemoTrade() { - const res = await fetch(`/api/v1/bot/auto-demo-trade?market=${getMarket()}`, { method: 'POST' }); +async function autoTrade() { + const res = await fetch(`/api/v1/bot/auto-trade?market=${getMarket()}`, { method: 'POST' }); const json = await res.json(); document.getElementById('aiResult').textContent = JSON.stringify(json, null, 2); await loadAccount(); @@ -171,16 +170,8 @@ async function setBotEnabled(enabled) { await loadBotSettings(); } -async function enableLive() { - const ack = encodeURIComponent(document.getElementById('ack').value.trim()); - const res = await fetch(`/api/v1/bot/live/enable?ack=${ack}`, { method: 'POST' }); - const json = await res.json(); - document.getElementById('aiResult').textContent = JSON.stringify(json, null, 2); - await loadBotSettings(); -} - -async function disableLive() { - const res = await fetch('/api/v1/bot/live/disable', { method: 'POST' }); +async function setMode(mode) { + const res = await fetch(`/api/v1/bot/settings?trade_mode=${mode}`, { method: 'POST' }); const json = await res.json(); document.getElementById('aiResult').textContent = JSON.stringify(json, null, 2); await loadBotSettings();