Research · Python
Prediction Engine
A combined prediction-market oracle, paper-trading engine, and strategy backtesting toolkit.
View repositoryGordon boundary
Gordon governs the project's paid agent actions. The repository keeps its own strategy, runtime, data ingestion, and execution logic.
How it works
Each backtest run is assigned a session_id. The engine can call Exa and CoinGecko through Gordon for paid data fetches. Gordon groups successful paid x402 settlements by session, letting you compare research spend across model variants alongside P&L.
Integration recipe
How Gordon fits
Model research
SupportedRoute paid evidence and market-data calls from live and replay runs through the same Gordon agent policy.
Backtest audit
SupportedSet session_id to the backtest run ID so the project can compare Gordon's per-run research costs with P&L.
Integration code
BACKTEST_PROMPT = """
Research the current evidence for {market_title}.
Use gordon_call_service with:
operation: exa.search.web
max_payment_units: 20000
session_id: {run_id}
Return the sources and a short probability assessment.
"""Connection path
Create an agent
Give this project its own Gordon identity, wallet, and API key.
Add MCP or SDK
Use Gordon MCP for hosted agents or gordon.fetch for application code.
Set policy
Allow only required services, then cap calls and daily spend.