feat: production paper trading platform
This commit is contained in:
@@ -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")
|
||||
|
||||
Reference in New Issue
Block a user