feat: production paper trading platform

This commit is contained in:
Курнат Андрей
2026-07-14 22:52:47 +03:00
parent 7186acb9a1
commit 5c4aecfe5f
29 changed files with 396 additions and 564 deletions
+3 -1
View File
@@ -12,6 +12,7 @@ from fastapi.responses import JSONResponse, PlainTextResponse
from crypto_spot_bot.analytics import analytics_snapshot
from crypto_spot_bot.auth import ApiAuthorizer
from crypto_spot_bot.bot import CryptoSpotBot
from crypto_spot_bot import __version__
from crypto_spot_bot.bybit import BybitClient
from crypto_spot_bot.config import Settings, load_settings, update_env_value
from crypto_spot_bot.execution import LiveBroker, PaperBroker
@@ -58,7 +59,7 @@ def create_app(settings: Settings | None = None) -> FastAPI:
finally:
await bot.stop()
app = FastAPI(title="Крипто спот-бот", lifespan=lifespan)
app = FastAPI(title="Крипто спот-бот", version=__version__, lifespan=lifespan)
app.state.settings = settings
app.state.storage = storage
app.state.bot = bot
@@ -76,6 +77,7 @@ def create_app(settings: Settings | None = None) -> FastAPI:
"running": bot.running,
"mode": settings.trading_mode,
"auth_configured": authorizer.configured(),
"version": __version__,
}
@app.get("/api/ready")