From 3e2491e1f84776e52bf2ea0f7492da7a3ddafac8 Mon Sep 17 00:00:00 2001 From: Mukan Erkin Date: Sun, 19 Apr 2026 10:39:51 +0300 Subject: [PATCH] =?UTF-8?q?fix:=20sembol=20listesi=20ve=20WS=20stream=20he?= =?UTF-8?q?r=20zaman=20canl=C4=B1=20Binance'tan?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/api/bots.rs | 10 ++-------- src/bot/runner.rs | 3 ++- 2 files changed, 4 insertions(+), 9 deletions(-) diff --git a/src/api/bots.rs b/src/api/bots.rs index 07c19e8..5d11f00 100644 --- a/src/api/bots.rs +++ b/src/api/bots.rs @@ -18,14 +18,8 @@ pub struct SymbolInfo { } pub async fn list_symbols(State(state): State) -> impl IntoResponse { - let mode = state.current_mode.lock().await.clone(); - let is_testnet = mode == "testnet"; - let (key, secret) = if is_testnet { - (state.testnet_api_key, state.testnet_api_secret) - } else { - (state.live_api_key, state.live_api_secret) - }; - let client = BinanceClient::new(key, secret, is_testnet); + // Sembol listesi her zaman canlı Binance'tan çekilir + let client = BinanceClient::new(state.live_api_key, state.live_api_secret, false); match client.get_usdt_symbols_with_min().await { Ok(mut symbols) => { symbols.sort_by(|a, b| a.0.cmp(&b.0)); diff --git a/src/bot/runner.rs b/src/bot/runner.rs index 720e9ff..fcf7f79 100644 --- a/src/bot/runner.rs +++ b/src/bot/runner.rs @@ -41,7 +41,8 @@ impl BotRunner { event_tx: broadcast::Sender, ) { let client = BinanceClient::new(api_key, api_secret, config.testnet); - let ws_base = if config.testnet { BINANCE_TESTNET_WS_URL } else { BINANCE_WS_URL }; + // Fiyat verisi her zaman canlı Binance stream'inden gelir + let ws_base = BINANCE_WS_URL; let stream = format!( "{}/{}@kline_{}", ws_base,