pg_prediction_market_integrity_gate
Pre-trade integrity gate for AI agents and compliance teams. ONE call returns ALLOW/WARN/BLOCK decision + risk_level (0-100) + signed evidence receipt. Aggregates orderbook analysis, resolution-window risk, CFTC Rule 5.17(z) conflict-of-interest check, and (Polymarket) insider signal scan. Supports both Polymarket (slug) and Kalshi (ticker). Optional inputs: wallet (Polymarket-side checks), candidate name (Kalshi Rule 5.17(z) name match), amount_usd (amplifies risk for large bets on thin markets). Returns hashable + ECDSA-signed receipt for audit. Designed for x402 paywall pre-trade calls — agent pays once, gets binary go/no-go.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| wallet | No | Optional: Polygon wallet address (Polymarket only) | |
| platform | Yes | Which prediction market | |
| candidate | No | Optional: candidate name for Kalshi Rule 5.17(z) name match | |
| market_id | Yes | Polymarket slug or Kalshi ticker/event_ticker | |
| amount_usd | No | Optional: bet size for risk amplification |