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:
parent
882e5adaaf
commit
887822efb6
Binary file not shown.
Binary file not shown.
|
|
@ -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,
|
||||
|
|
|
|||
|
|
@ -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:
|
||||
|
|
|
|||
Loading…
Reference in New Issue