Logic · logic_api

Read-only view of active client JSON

{
    "version": "2026-05-27.v1_complete_split",
    "file_name": "05_manual_logic_update_api.json",
    "engine": "MANUAL_LOGIC_UPDATE_API",
    "purpose": "Allow owner\/developer to update rules, weights, scanner categories, thresholds, and kill switches without editing code.",
    "security": {
        "auth_required": true,
        "roles": {
            "owner": [
                "read",
                "propose",
                "approve",
                "apply",
                "rollback",
                "toggle_live"
            ],
            "developer": [
                "read",
                "propose",
                "apply_non_live",
                "rollback_non_live"
            ],
            "viewer": [
                "read"
            ]
        },
        "audit_log_required": true,
        "rollback_required": true,
        "schema_validation_required": true
    },
    "endpoints": [
        {
            "method": "GET",
            "path": "\/logic\/files",
            "purpose": "List active logic files and versions."
        },
        {
            "method": "GET",
            "path": "\/logic\/{engine}",
            "purpose": "Read active Fast News, A+, learning, tracking, or guardrail logic."
        },
        {
            "method": "POST",
            "path": "\/logic\/propose",
            "purpose": "Submit proposed rule update; does not apply automatically."
        },
        {
            "method": "POST",
            "path": "\/logic\/validate",
            "purpose": "Validate JSON schema, conflicts, safety limits, and required fields."
        },
        {
            "method": "POST",
            "path": "\/logic\/approve",
            "purpose": "Owner approves validated update."
        },
        {
            "method": "POST",
            "path": "\/logic\/apply",
            "purpose": "Apply approved update and create new version."
        },
        {
            "method": "POST",
            "path": "\/logic\/rollback",
            "purpose": "Rollback to prior version."
        },
        {
            "method": "POST",
            "path": "\/risk\/kill-switch",
            "purpose": "Turn global or strategy-specific kill switch on\/off."
        },
        {
            "method": "POST",
            "path": "\/learning\/run-eod",
            "purpose": "Manually trigger end-of-day full-data learning review."
        },
        {
            "method": "POST",
            "path": "\/scanner\/category",
            "purpose": "Add, disable, or edit scanner category."
        },
        {
            "method": "POST",
            "path": "\/weights\/update",
            "purpose": "Update scoring weights after approved learning report."
        }
    ],
    "update_payload_schema": {
        "required": [
            "request_id",
            "requested_by",
            "engine",
            "change_type",
            "field_path",
            "old_value",
            "new_value",
            "reason",
            "effective_mode"
        ],
        "properties": {
            "engine": [
                "fast_news",
                "a_plus",
                "learning_engine",
                "realtime_tracking",
                "shared_guardrails"
            ],
            "change_type": [
                "threshold",
                "weight",
                "scanner_category",
                "risk_rule",
                "exit_rule",
                "holiday_rule",
                "kill_switch",
                "schema_fix"
            ],
            "effective_mode": [
                "paper_only",
                "live_after_owner_approval",
                "disabled"
            ],
            "requires_owner_approval": true
        }
    },
    "blocked_updates_without_owner_approval": [
        "enable_live_execution",
        "increase_position_size",
        "increase_daily_loss_limit",
        "remove_stop_loss",
        "allow_market_orders",
        "disable_data_quality_check",
        "disable_holiday_check",
        "disable_spread_check",
        "merge_fast_news_and_a_plus_logic"
    ],
    "audit_log_schema": [
        "timestamp",
        "request_id",
        "requested_by",
        "approved_by",
        "engine",
        "field_path",
        "old_value",
        "new_value",
        "reason",
        "validation_status",
        "applied_status",
        "rollback_version"
    ]
}