Bot auto-update: src/__pycache__/main_ml.cpython-310.pyc,src/__pycache__/web_dashboard.cpython-310.pyc,src/main_ml.py,src/web_dashboard.py

This commit is contained in:
Marc Blatter 2026-07-04 14:08:08 +02:00
parent 882e5adaaf
commit 887822efb6
4 changed files with 4 additions and 4 deletions

View File

@ -737,8 +737,8 @@ class MLTradingBot:
result = None result = None
# ONLY RECORD if order was SUCCESSFUL # ONLY RECORD if order was SUCCESSFUL
if result and result.get('status') in ['FILLED', 'NEW', 'PARTIALLY_FILLED']: if result and (result.get('status') in ['FILLED', 'NEW', 'PARTIALLY_FILLED'] or order_type == 'MARKET'):
# Ensure current_trades reflects completed trade # Record immediately — market orders always fill
logger.info(f'🔍 DEBUG: Storing BUY position {pair}: qty={qty}, price={price}') logger.info(f'🔍 DEBUG: Storing BUY position {pair}: qty={qty}, price={price}')
self.current_trades[pair] = { self.current_trades[pair] = {
'qty': qty, 'qty': qty,

View File

@ -68,7 +68,7 @@ async def websocket_endpoint(websocket: WebSocket):
active_connections.remove(websocket) active_connections.remove(websocket)
# @app.get("/api/state") # @app.get("/api/state")
n@app.get("/api/state") @app.get("/api/state")
async def get_state(): async def get_state():
"""Proxy to State Manager""" """Proxy to State Manager"""
try: try:
@ -208,7 +208,7 @@ async def trigger_liquidation():
@app.get("/") @app.get("/")
n@app.get("/api/state") @app.get("/api/state")
async def get_state(): async def get_state():
"""Proxy to State Manager""" """Proxy to State Manager"""
try: try: