Pre-trade execution guard for Polymarket taker bots

Quote the book.
Not the headline probability.

Before a 50–500 USDC BUY or FOK order, turn a URL, token ID, or market search into executable shares, book-walk VWAP, worst fill, fees, and all-in cost. Reject trades whose visible execution cost erases the model edge. JSON over x402; no account or custody.

BASE MAINNETUSDCX402 V2PUBLIC CLOB DATA

No slug hunting

Find the market before you pay.

Polymarket’s free APIs expose raw books. Bookproof’s paid value is the decision layer: executable size, order-book walk, modeled taker fee, slippage, and all-in cost in one stable response.

Free and read-only. The server stores only a one-way hash of the input for aggregate funnel measurement.

NO ORDER PLACEMENTNO WALLET ACCESSNO PROFIT CLAIMSNO SUBSCRIPTION

Why this exists

A displayed probability is not an executable price.

A taker bot needs to know what its exact budget costs after walking the book—and whether fees erase its model edge. Bookproof packages those checks into one deterministic pre-submit response.

01

Full-book VWAP

Walks every visible ask level instead of repeating the top-of-book price.

02

Fee-aware cost

Models the market’s enabled taker schedule and rounds fee output to USDC precision.

03

Freshness flags

Returns the source timestamp, book hash, age, crossed-book and stale-state flags.

04

Zero execution

Reads public Gamma and CLOB data. It never signs, routes, or places an order.

One free resolver · two paid decisions

Small calls. Explicit prices. Structured outputs.

Resolve first at no charge, then make a normal HTTP request. The server returns HTTP 402 with Base USDC payment instructions. Pay, retry, and receive the response—no signup or account session.

GET/api/v1/market-health?market=…$0.005

Market health

Inspect both binary outcome books before a model reasons about price. Includes spread, 1/2/5¢ depth, two-cent imbalance, freshness, fee schedule, tick size, and negative-risk status.

  • URL, slug, token ID, or market search
  • Point-in-time public snapshot
  • Binary markets only in v1
{
  "health": { "status": "healthy", "stale": false },
  "fee": { "takerRate": 0.04, "exponent": 1 },
  "books": [{
    "outcome": "Yes",
    "bestBid": 0.42,
    "bestAsk": 0.43,
    "spread": 0.01,
    "imbalance2c": -0.12
  }]
}
POST/api/v1/execution-quote$0.015

Execution quote

Model a hypothetical BUY against current asks. The budget is treated as all-in: raw shares plus the modeled taker fee.

POST /api/v1/execution-quote
{
  "market": "https://polymarket.com/event/wti-up-or-down-on-july-22-2026",
  "outcome": "Up",
  "budgetUsd": 100
}
{
  "quote": {
    "filledShares": 219.78022,
    "rawCostUsd": 97.83,
    "takerFeeUsd": 2.17,
    "allInCostUsd": 100,
    "averageFillPrice": 0.445,
    "priceImpactBps": 348.84
  }
}

Copy, run, integrate

HTTP for scripts. MCP for agents.

The free resolver works with plain curl. Official x402 clients handle the paid 402 retry. Agents can discover the same tools over a stateless Streamable HTTP MCP endpoint.

01

curl · free resolver

curl --get 'https://bookproof-api.sn95wjq846.chatgpt.site/api/v1/resolve-market' \
  --data-urlencode 'input=Fed rate cut July 2026'
02

JavaScript · x402

import { wrapFetchWithPayment } from "@x402/fetch";
import { x402Client } from "@x402/core/client";
import { ExactEvmScheme } from "@x402/evm/exact/client";
import { privateKeyToAccount } from "viem/accounts";

const signer = privateKeyToAccount(process.env.EVM_PRIVATE_KEY);
const client = new x402Client();
client.register("eip155:*", new ExactEvmScheme(signer));
const paidFetch = wrapFetchWithPayment(fetch, client);

const response = await paidFetch(
  "https://bookproof-api.sn95wjq846.chatgpt.site/api/v1/market-health?" +
  new URLSearchParams({ market: "Fed rate cut July 2026" })
);
console.log(await response.json());
03

Python · x402

# pip install "x402[httpx]"
import asyncio
import os
from eth_account import Account
from x402 import x402Client
from x402.http.clients import x402HttpxClient
from x402.mechanisms.evm import EthAccountSigner
from x402.mechanisms.evm.exact.register import register_exact_evm_client

async def main():
    client = x402Client()
    account = Account.from_key(os.environ["EVM_PRIVATE_KEY"])
    register_exact_evm_client(client, EthAccountSigner(account))
    async with x402HttpxClient(client) as http:
        response = await http.get(
            "https://bookproof-api.sn95wjq846.chatgpt.site/api/v1/market-health",
            params={"market": "Fed rate cut July 2026"},
        )
        print(response.json())

asyncio.run(main())
04

MCP · remote server

{
  "mcpServers": {
    "bookproof": {
      "type": "streamable-http",
      "url": "https://bookproof-api.sn95wjq846.chatgpt.site/mcp"
    }
  }
}

Tools: resolve_market (free), market_health (0.005 USDC), execution_quote (0.015 USDC).

The honest economics

This is an experiment, not a fake revenue story.

$0capital risked

The $500 bankroll stays untouched. Hosting and the first 1,000 facilitated settlements use free tiers.

7dvalidation window

100 qualified projects, 30 personalized public interactions, 10 technical discussions, five testers, and one real payment.

0self-paid calls

No wash volume, no buying our own endpoint, and no confusing internal settlements with customer demand.

Data & limits

Public inputs. Visible assumptions.

Market metadata comes from Polymarket Gamma; executable levels and timestamps come from the public CLOB order book. Taker fees follow the enabled market schedule, with the published category table as a labeled fallback.