PolyEdge

Real orderbook math for prediction markets.

Deterministic NegRisk arbitrage, multi-level CLOB VWAP slippage, and Polymarket vs. Kalshi spreads. Built for quant bots and AI trading agents.

GET /v1/arbitrage/scan?minEdgeBps=20&sizeUsd=250 HTTP 200
{
  "engine": "polyedge-deterministic-v1",
  "scannedNegRiskEvents": 18,
  "scannedOrderbooks": 94,
  "opportunities": [
    {
      "slug": "fed-decision-in-december",
      "direction": "BUY_COMPLETE_SET",
      "outcomeCount": 5,
      "sumVwapPrice": 0.9742,
      "estimatedFeePerSet": 0.0041,
      "netEdgeBps": 221.84,
      "maxSizeUsd": 1842.60,
      "isExhaustive": true,
      "riskLevel": "LOW"
    }
  ]
}
Deterministic JSON schema. Call /v1/sample for current live market books.

Deterministic API surface

Pure mathematical calculation directly against Polymarket Gamma, Polymarket CLOB, and Kalshi v2 orderbooks. Invalid inputs fail fast with HTTP 400 before billing.

Endpoint Deterministic Output Cache x402 Rate
GET/v1/arbitrage/scan Scans NegRisk multi-outcome events across full ask/bid ladders, deducts taker fees, computes max profitable USD capacity, and flags non-exhaustive markets. 12s $0.005
GET/v1/market/depth Walks sorted CLOB bids or asks for any target USD size. Returns exact VWAP, slippage bps, 2%/5% band depth, four-tier size ladder, and fillability. 10s $0.002
GET/v1/markets/compare Aligns active Polymarket and Kalshi events via weighted entity matching. Reports implied probability spread, cross-venue cost, and confidence score. 15s $0.005
GET/v1/sample Cached live arbitrage and orderbook depth response for zero-cost integration testing. 30s Free
GET/health Real-time upstream connectivity and latency probe across all three market APIs. 0s Free

Midpoint prices hide execution traps

Raw CLOB snapshots arrive unsorted and thin books distort midpoints. PolyEdge explicitly sorts every level, walks exact dollar depth, and detects one-sided books before your bot submits an order.

Fee-adjusted complete-set verification

Parabolic taker fees and augmented NegRisk markets erase naive spreads. Every scan applies real fee curves and surfaces NON_EXHAUSTIVE_OUTCOMES risk tags automatically.

Simple dual-track billing

Subscribe with a credit card on RapidAPI for predictable monthly quota, or pay per call in Base mainnet USDC via HTTP x402 with zero account setup.

RapidAPI Monthly Subscriptions

Managed billing, API key rotation, and automatic quota enforcement.

Basic
$0/mo
100 calls / month
Ultra
$25/mo
100,000 calls / month
  • All three deterministic endpoints included3 / 3
  • Constant-time RapidAPI gateway authHTTP 200
  • Invalid query pre-validationHTTP 400

RapidAPI forwards verified subscriber traffic directly via X-RapidAPI-Proxy-Secret.

HTTP x402 Pay-Per-Call

Instant machine-native settlement for autonomous AI agents and scripts.

/v1/market/depth $0.002 USDC
/v1/arbitrage/scan $0.005 USDC
/v1/markets/compare $0.005 USDC
Network Base Mainnet (eip155:8453) / Native USDC
Settlement Address 0x1519E99078EBaB798ef52326b67E5b28603A20ec
Facilitator https://facilitator.payai.network

Server holds zero private keys. Non-200 errors and invalid 400 queries are never billed.

Integrate in under a minute

Call the HTTP API directly, connect through RapidAPI or Apify Store, or attach the thin MCP wrapper to Claude and Cursor.

Free live sample (curl)
curl -s "https://polyedge.webcobit.com/v1/sample"
RapidAPI authenticated depth walkthrough
curl -sG "https://polyedge.webcobit.com/v1/market/depth" \
  --data-urlencode "slug=fed-decision-in-december" \
  --data-urlencode "side=buy" \
  --data-urlencode "sizeUsd=2000" \
  -H "X-RapidAPI-Key: YOUR_RAPIDAPI_KEY"
MCP thin client (Claude Desktop / Cursor)
{
  "mcpServers": {
    "polyedge": {
      "command": "npx",
      "args": ["-y", "poly-edge-mcp"],
      "env": {
        "POLYEDGE_BASE_URL": "https://polyedge.webcobit.com",
        "POLYEDGE_RAPIDAPI_KEY": "optional_rapidapi_key"
      }
    }
  }
}

Technical questions

Direct answers on orderbook methodology, fee math, expiry checks, and billing safety.

How does PolyEdge calculate real Polymarket CLOB VWAP and slippage?

PolyEdge fetches the full live CLOB orderbook, sorts asks ascending and bids descending, then walks dollar-notional depth level by level for your target sizeUsd. It returns exact VWAP, worst fill price, slippage in basis points, 2% and 5% band depth, and a four-tier size ladder ($100, $500, $2,000, $10,000).

How are Polymarket NegRisk complete-set arbitrage fees and capacity computed?

The scanner packs whole NegRisk multi-outcome events without slicing legs, applies Polymarket parabolic taker fees (rate * p * (1 - p)), discards dust fills below CLOB minOrderSize, and solves the exact piecewise-linear maximum profitable USD capacity across all legs.

How does cross-venue Polymarket vs. Kalshi comparison prevent false spreads?

PolyEdge matches active events via weighted entity and numerical tokenization while filtering Kalshi multi-leg sports parlays. If settlement years or close dates diverge by more than 90 days, the pair is tagged EXPIRY_MISMATCH and cross-venue arbitrage signals are suppressed.

What is the difference between RapidAPI subscriptions and HTTP x402 billing?

RapidAPI provides predictable credit-card monthly plans ($0 Basic, $9 Pro, $25 Ultra) verified in constant time via X-RapidAPI-Proxy-Secret. HTTP x402 lets AI agents pay per call in Base mainnet native USDC ($0.002 to $0.005) via PayAI with zero account setup. Invalid HTTP 400 parameters are rejected before billing.