Skip to content

Chapter 15: Live Trading Systems and Operations

This chapter is currently maintained in Chinese first.

Operational Logging Note

Before live or paper troubleshooting, explicitly configure logging instead of relying on defaults:

import akquant

akquant.configure_logging(
    akquant.LogConfig(
        profile="live",
        level="INFO",
        console=True,
        filename="logs/live.log",
        file_level="DEBUG",
        file_json=True,
        file_max_bytes=50_000_000,
        file_backup_count=5,
    )
)

This keeps strategy-side on_order / on_trade logs and gateway/execution warnings in the same pipeline. It is especially useful when tracing rejects, unknown cancel requests, session-close expiry, or strict-semantics cases where terminal state is not confirmed until broker callbacks arrive.