Skip to content

Pre-trade market state verification for Strands financial agents #2110

@LembaGang

Description

@LembaGang

Building pre-trade verification tools for agent frameworks and wanted to flag a pattern relevant to Strands financial workflows.

Strands agents with tool access to broker APIs need a pre-execution gate: "Is the target exchange actually open right now?" Getting this wrong means orders placed during closures, DST phantom hours, or circuit breaker halts.

Headless Oracle provides this as an MCP server — compatible with Strands' MCP tool support:

from strands import Agent
from strands.tools.mcp import MCPClient

mcp = MCPClient(command="npx", args=["headless-oracle-mcp"])
agent = Agent(tools=[mcp])
# Agent can now call get_market_status(mic="XNYS")

Returns Ed25519-signed receipts for 28 exchanges. Fail-closed: UNKNOWN status always means CLOSED. 60-second TTL prevents stale state. Free via MCP, no API key required for basic calls.

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