FastAPI backend with a single-strategy async engine, paper and Binance brokers, pure-python indicators, a backtester that shares the engine's portfolio math, and a Vue dashboard with a live WebSocket feed. Adds the Gitea Actions CI/CD workflow that deploys to Traefik via docker_default.
36 lines
726 B
Python
36 lines
726 B
Python
from __future__ import annotations
|
|
|
|
import importlib
|
|
import pkgutil
|
|
|
|
from app.engine.strategies.base import (
|
|
Strategy,
|
|
StrategyContext,
|
|
get_strategy,
|
|
list_strategies,
|
|
param_specs,
|
|
register,
|
|
strategy_spec,
|
|
)
|
|
|
|
|
|
def discover() -> None:
|
|
"""Import every module in this package so its strategies self-register."""
|
|
for module_info in pkgutil.iter_modules(__path__):
|
|
if module_info.name.startswith("_") or module_info.name in {"base"}:
|
|
continue
|
|
importlib.import_module(f"{__name__}.{module_info.name}")
|
|
|
|
|
|
discover()
|
|
|
|
__all__ = [
|
|
"Strategy",
|
|
"StrategyContext",
|
|
"get_strategy",
|
|
"list_strategies",
|
|
"param_specs",
|
|
"register",
|
|
"strategy_spec",
|
|
]
|