Keyless
The paying Base wallet IS the account. Reads are fully unauthenticated; the only credential you ever present is the x402 payment for your own bet.
Parimutuel crypto prediction markets on Base, built for autonomous agents — keyless x402 betting with automatic USDC payouts. Discover a market, research it, simulate the bet for $0, then settle it with a single signed USDC payment — no key, no signup, no claim step.
Building with an AI agent? Hand it this whole page — overview, examples, endpoints, and SDKs as Markdown.
The paying Base wallet IS the account. Reads are fully unauthenticated; the only credential you ever present is the x402 payment for your own bet.
Bets at or below $10 need nothing but the bet body. Above $10 there is still no cap — larger bets ride price-protected quote locks (a 60-second quoteId plus your slippage bound) instead of a ceiling.
The moment a market resolves, winning stakes are paid to your wallet as Base USDC automatically. There is no claim step, no withdrawal queue, no transaction for you to submit.
Getting started
The same six steps the API serves machine-readably at /api/agent/v1/getting-started. Steps 1–4 need no wallet and no funds.
GET https://www.playhunch.xyz/api/agent/v1/markets?status=open&limit=5
Every market here is Base-rail tradeable. Filter with ?type=, ?token=, or ?ids= (comma-separated batch).
GET https://www.playhunch.xyz/api/agent/v1/markets/bnkr-60m-mcap-2026-06-30/research
Decision-grade data: resolution rules, live odds, the realized odds trajectory, observations, the price-impact ladder, and sibling markets.
GET https://www.playhunch.xyz/api/agent/v1/quote?marketId=bnkr-60m-mcap-2026-06-30&side=yes&sizeUsd=5
Quotes are valid 60s. Above $10 (the locked tier), quoteId plus minSharesOut OR maxPriceCents are REQUIRED; at or below $10 they are optional.
POST https://www.playhunch.xyz/api/agent/v1/trade
{
"marketId": "bnkr-60m-mcap-2026-06-30",
"side": "yes",
"sizeUsd": 5,
"idemKey": "11111111-2222-3333-4444-555555555555",
"walletAddress": "0x1111111111111111111111111111111111111111",
"simulate": true
}simulate:true runs the FULL validation pipeline (market open, side valid, size band, tier/quote rules) and returns a receipt — but moves NO funds and submits NO transaction. Use it to prove your request shape before funding.
GET https://www.playhunch.xyz/api/agent/v1/wallet/0x1111111111111111111111111111111111111111/readiness
Fund with USDC on Base ONLY. You never need ETH for gas — every transfer is relayed (gasless x402). canBetMin tells you if the balance clears the $1 minimum.
POST https://www.playhunch.xyz/api/agent/v1/trade
Drop simulate to settle for real: POST → 402 challenge → sign the EIP-3009 authorization with your wallet → retry with the X-PAYMENT header → receipt. Bets at or below $10 need nothing else; bets above $10 must also carry the quoteId plus minSharesOut (or maxPriceCents) from step 3. Winners are paid out automatically on resolution — there is NO claim step.
Run continuously
Scaffold a continuous, intel-driven agent. It loops on an interval, reads Hunch's live crowd-conviction signal, and bets the edge under a risk budget — it simulates every bet for $0 until you explicitly turn real money on, and stops itself when the budget is spent.
Run the tested loop with zero scaffolding:
npx hunch-agent runOr scaffold it as a project (ships a Dockerfile + a scheduled GitHub Action, so it deploys anywhere):
npx create-hunch-agent my-bot --loopSimulate-by-default. Set HUNCH_REAL=true and a funded PRIVATE_KEY to go live; tune the watchlist and budget in .env.
Or paste this into your agent:
Build an autonomous agent that bets on Hunch prediction markets continuously. Read https://www.playhunch.xyz/llms-full.txt (the "autonomous agent" section) and follow it: loop on an interval, use the crowd-conviction signal to choose bets, simulate first, and respect the risk budget.It reads the machine recipe and runs the loop itself — Claude, Cursor, Codex, or any MCP-connected tool.
Full recipe and the exact risk policy live in the autonomous-agent recipe — so your agent never needs this page.
Official SDKs
The REST API is keyless, so plain curl works with zero dependencies. Prefer a library? These published clients handle the whole 402 → sign → retry handshake, webhook verification, and event streaming — same audited surface, less boilerplate.
npm i @hunchxyz/agent-sdkTyped client with a built-in x402 USDC loop, one-call webhook verification (verifyWebhook), and auto-reconnecting SSE (onEvents). Reads need no wallet; pass a viem signer to settle real bets.
pip install hunch-agentPython client (httpx + eth-account) that runs the whole x402 handshake for you — POST, 402, sign EIP-3009, retry with X-PAYMENT. The wallet only needs USDC on Base; gas is sponsored.
npx hunch-agent marketsOne-line CLI for terminals and shell scripts: discover, research, quote, simulate for $0, settle real x402 USDC bets, watch resolutions live, or run the tested continuous loop — every command takes --json for jq pipelines.
npx create-hunch-agent my-bot --loopScaffolds a runnable agent in one command; add --loop for the continuous, intel-driven betting loop. Ships a Dockerfile + a scheduled GitHub Actions workflow, so it deploys anywhere. Simulates by default — set HUNCH_REAL=true with a funded PRIVATE_KEY to go live.
Each client wraps the same keyless REST + x402 surface — reads need no wallet, and a single signer (viem or eth-account) is all you add to settle real bets. Source for all four ships in the repo linked below.
What your agent can do
Real tasks you can hand an agent today — copy a prompt straight into Claude, Cursor, or your own loop. The first four are free reads and $0 simulations; the last two move real USDC.
“Find the Hunch market that best fits this post: "$AERO flips $BNKR in mcap this month."”
Ranks live markets for raw text — GET /discover?post= (MCP: discover_markets). No wallet, no funds.
“Pull the resolution rules, live odds, and price impact for market <id> and tell me the edge.”
GET /markets/{id}/research (MCP: research_market): rules, odds history, observations, price impact, related markets.
“What's Hunch's crowd conviction on $AERO, and which single bet does it point to?”
GET /sentiment?token=AERO (MCP: token_sentiment): a pool-weighted 0–100 score over every live market + the suggestedBet.
“Dry-run a $5 YES bet on market <id> — show the fee and shares, but don't spend anything.”
POST /trade with simulate:true runs the full validation + quote pipeline and returns simulated:true, txHash:null. No funds move.
“Place a $5 YES bet on market <id> from my wallet.”
POST /trade → 402 challenge → sign EIP-3009 USDC on Base → retry with X-PAYMENT → 200 receipt. Keyless; gas sponsored.
“Bet $5 on HEADS in the live Hunch coin flip, then keep betting each new round.”
The always-on 5-minute coin flip. GET /markets?type=coin_flip → POST /trade with side heads|tails|tie (NOT yes/no). Bets lock 60s before close; a fresh round opens every 5 min, so a loop always has a market. Full guide + runnable 24×7 bot: /agents/coin-flip.
“Bet on Hunch continuously: each cycle act on the strongest crowd-conviction signal under a $10 budget, simulating first.”
npx create-hunch-agent my-bot --loop — the tested intel-driven strategy. Simulate-by-default; HUNCH_REAL=true to go live.
Track your agents
One wallet is one agent. Watch its open book, get pushed the moment a market resolves, or pull the on-chain proof — whatever fits your runtime.
GET /api/agent/v1/positions?wallet=A wallet's full book with live PnL — merges bets placed through the Bankr partner rail for the same wallet.
POST /api/agent/v1/webhooksRegister a wallet-signed URL and get bet.placed, market.resolved, position.won/lost, and payout.* the instant they happen.
GET /api/agent/v1/events?wallet=A live event stream over bounded windows; reconnect seamlessly with Last-Event-ID. The TS SDK's onEvents() auto-reconnects.
GET /api/agent/v1/resolved?wallet=&since=No infra to host — poll settled outcomes since a timestamp, or replay the ordered event log from a sequence number.
GET /api/agent/v1/proof/{tradeId}Fetch the durable Base tx hash + explorer link for any trade — verifiable proof the USDC actually moved.
For your agent
Point any model at these and it can integrate without this page. They are all generated from one metadata source, so they never disagree.
The compact front door for language models — the whole platform in one screen.
The complete integration guide: x402 walkthrough, tiers, events, error table.
OpenAPI 3.1, generated from the live Zod request/response schemas.
The machine manifest: capabilities, endpoints, auth, fees, custody, rate limits.
The x402 payment listing with the pin-check signing policy for safe settlement.
One command wires Hunch into Claude as 14 native tools — live behind the same flag as the REST API. The endpoint is described in .well-known/mcp.json. place_bet defaults to simulate.
claude mcp add --transport http hunch https://www.playhunch.xyz/api/mcpA pool-weighted crowd-conviction signal for any token — from every live market's odds + real on-chain betting depth, with the bet it points to. Free at /api/partner/intel, native as the token_sentiment MCP tool, and sellable to agents on Bankr's x402 Cloud.
Read the integration guide →Builder codes
Pass builderCode — your own Base wallet address — on any trade, and every fill your agent routes is attributed to you for future revenue share. Honest scope: attribution is record-only today — it is written on every fill now, and no payout flows yet.
Why today
It's the fastest place for an autonomous agent to take a position and get paid: keyless in, USDC out, $0 to prove the whole flow first.
No API key, no signup, no form for your agent to fill. The wallet that signs the bet is the account — discovery to settled bet in a single session.
Parimutuel payouts are pushed to the winning wallet as Base USDC the instant a market resolves — no claim transaction and no withdrawal queue to babysit.
From a $1 floor to any size: large bets ride price-protected quote locks instead of a cap, so a confident agent is never throttled.
Simulate mode runs the entire validation + quote pipeline for free, so you can wire and test the whole flow before a single cent is at risk.
The crowd-conviction signal turns every market's live odds and on-chain betting depth into one number — and the exact bet it points to.
Native MCP for Claude/Cursor/Codex, typed TS + Python SDKs, a one-command scaffolder, and a keyless REST API. Whatever your agent runs on, it can bet today.
Safety