Skip to content

Add real-time market state verification for live execution path #2185

@LembaGang

Description

@LembaGang

Hi,

I saw qlib's trade_calendar handles scheduling for backtesting, but for live agent execution it doesn't cover unplanned halts, circuit breakers, or real-time session state. That's the gap that bites when agents go from backtest to production.

I've been building Headless Oracle — a signed market oracle for AI agents. It returns Ed25519-signed receipts confirming an exchange is OPEN, CLOSED, HALTED, or UNKNOWN. 60-second TTL. 28 exchanges. The rule: UNKNOWN must be treated as CLOSED.

import requests

r = requests.get('https://headlessoracle.com/v5/demo?mic=XNYS')
receipt = r.json()

if receipt['status'] != 'OPEN':
raise Exception(f"Market not open: {receipt['status']}")

Free to try (no key needed). pypi.org/project/headless-oracle

If there's interest in adding a pre-trade verification step to qlib's live execution path, happy to contribute.

— Mike (headlessoracle.com)

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions