INNER CODE UNIT · Python

main

btcusdt-cc/BTCAlpha · main.py:18

def main():
    args = sys.argv[1:]

    if "--init-db" in args:
        print("初始化数据库:", db.init_db())
        return

    db.init_db()

    if "--no-scheduler" not in args:
        scheduler.start()
    else:
        log.info("已禁用后台调度,仅启动 Web")

    rt = config.get("runtime")
    host = rt.get("web_host", "0.0.0.0")
    port = int(rt.get("web_port", 5000))
    live = "实盘" if config.get("trade", "live_enabled") else "模拟盘"

View source record →

📰 Research Paper
Loading…
⏳ Fetching content…