diff --git a/src/web_dashboard.py b/src/web_dashboard.py index 8c0a9cb..edddb6a 100644 --- a/src/web_dashboard.py +++ b/src/web_dashboard.py @@ -1,9 +1,7 @@ #!/usr/bin/env python3 from fastapi import FastAPI -from fastapi.responses import HTMLResponse, FileResponse -from fastapi.staticfiles import StaticFiles +from fastapi.responses import HTMLResponse from fastapi.middleware.cors import CORSMiddleware -import json app = FastAPI() @@ -15,7 +13,6 @@ app.add_middleware( allow_headers=['*'], ) -# Global state state = { 'current_trades': {}, 'completed_trades': [], @@ -39,127 +36,570 @@ async def get_state(): @app.get('/', response_class=HTMLResponse) async def dashboard(): - html = ''' - + return ''' + -Bot Dashboard + + +Trading Bot -

Trading Bot Dashboard

-
-
Liquid USDT
bash.00
-
Trades Today
0
-
Daily P&L
bash.00
-
Win Rate
0%
-
Open Positions
0
-
-
-

Open Trades

-
No open trades
-
+
+ + -
-

Closed Trades

-
No closed trades
-
+ +
+ +
+ +
+
+ LIVE +
+
-
+ ''' - return html if __name__ == '__main__': import uvicorn