Skip to content

Add market-state check to Risk Management step before trade execution #514

@LembaGang

Description

@LembaGang

The Risk Management agent has no check for whether the target exchange is actually open before the Portfolio Manager approves execution. The framework can submit orders during market closures, DST transition windows, or exchange halts — there's no circuit breaker for this.

I put together an integration guide showing how to add a signed pre-trade check as a single function call in the risk management step:
https://headlessoracle.com/docs/integrations/trading-agents

It returns a cryptographically signed receipt (OPEN/CLOSED/HALTED/UNKNOWN). If UNKNOWN, the safe default is halt — don't let the trade proceed. Takes about 5 lines to wire in.

Happy to send a PR if this is useful to the maintainers.

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