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
# ONLY RECORD if order was SUCCESSFUL
if result and result.get('status') in ['FILLED', 'NEW', 'PARTIALLY_FILLED']:
# Ensure current_trades reflects completed trade
if result and (result.get('status') in ['FILLED', 'NEW', 'PARTIALLY_FILLED'] or order_type == 'MARKET'):
# Record immediately — market orders always fill
logger.info(f'🔍 DEBUG: Storing BUY position {pair}: qty={qty}, price={price}')
self.current_trades[pair] = {
'qty': qty,

View File

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