BlockRun

Prediction Markets API

Access real-time prediction market data via x402 micropayments. Powered by Predexon.

Unified access to Polymarket, Kalshi, Binance, Limitless, Opinion and Predict.Fun, plus UMA Oracle resolution data and on-chain wallet identity & clustering — all through a single API.

Mirrors the Predexon v2 Data API (docs.predexon.com/openapi-v2.json) — read-only market data. To move funds, see the Polymarket Funding API (gasless, non-custodial deposit). Predexon's separate order-placement Trading API is not exposed.

Networks

NetworkBase URLAsset
Base (Ethereum L2)https://blockrun.aiUSDC
Solanahttps://sol.blockrun.aiUSDC

Pricing

TierPriceUse Case
Tier 1$0.0085Market data, events, trades, orderbooks, positions, leaderboards
Tier 2$0.0085Wallet analytics (incl. identity + clustering), smart money, cross-venue search, Binance data

Both tiers are a flat $0.0075 base plus the $0.001 per-transaction fee, so every call costs $0.0085 regardless of tier. The 402 body reports the charged price (price.amount: "0.0085") together with endpoint, method, description, category and tier; the signable x402 v2 requirements are in the X-Payment-Required / PAYMENT-REQUIRED headers (base64 JSON, also mirrored in WWW-Authenticate).


Endpoints

Polymarket — Market Data (Tier 1: $0.0085)

EndpointMethodDescription
/api/v1/pm/polymarket/marketsGETQuery markets with filtering, sorting, and pagination
/api/v1/pm/polymarket/markets/keysetGETSame filters as /polymarket/markets, with cursor-based keyset pagination
/api/v1/pm/polymarket/eventsGETList events with filtering and sorting
/api/v1/pm/polymarket/events/keysetGETList events with cursor-based keyset pagination
/api/v1/pm/polymarket/crypto-updownGETList crypto up/down prediction markets
/api/v1/pm/polymarket/market-price/{token_id}GETGet current or historical price for a token
/api/v1/pm/polymarket/candlesticks/{condition_id}GETGet historical OHLCV candlestick data for a market
/api/v1/pm/polymarket/candlesticks/token/{token_id}GETGet historical OHLCV candlestick data for a single outcome token
/api/v1/pm/polymarket/volume-chart/{condition_id}GETGet volume chart with YES/NO breakdown
/api/v1/pm/polymarket/orderbooksGETGet historical orderbook snapshots
/api/v1/pm/polymarket/tradesGETQuery historical trade data
/api/v1/pm/polymarket/activityGETFetch trading activity (merges, splits, redeems)
/api/v1/pm/polymarket/markets/{token_id}/volumeGETGet historical cumulative volume
/api/v1/pm/polymarket/markets/{condition_id}/open_interestGETGet historical open interest
/api/v1/pm/polymarket/positionsGETFetch all user positions

Polymarket — Analytics (Tier 1: $0.0085)

EndpointMethodDescription
/api/v1/pm/polymarket/leaderboardGETGlobal leaderboard of smart wallets
/api/v1/pm/polymarket/leaderboard/market/{condition_id}GETLeaderboard for a specific market
/api/v1/pm/polymarket/cohorts/statsGETCompare performance across trading style cohorts
/api/v1/pm/polymarket/market/{condition_id}/top-holdersGETTop holders ranked by position size

Polymarket — Wallet Analytics (Tier 2: $0.0085)

EndpointMethodDescription
/api/v1/pm/polymarket/wallet/{wallet}GETComplete smart wallet profile
/api/v1/pm/polymarket/wallet/{wallet}/marketsGETPer-market performance breakdown
/api/v1/pm/polymarket/wallet/{wallet}/similarGETFind wallets with similar portfolios
/api/v1/pm/polymarket/wallet/pnl/{wallet}GETP&L summary and time series
/api/v1/pm/polymarket/wallet/positions/{wallet}GETOpen and historical positions
/api/v1/pm/polymarket/wallet/volume-chart/{wallet}GETVolume chart by BUY/SELL side
/api/v1/pm/polymarket/wallets/profilesGETBatch wallet profiles (max 20)
/api/v1/pm/polymarket/wallets/filterGETFilter wallets by market trades

Polymarket — Smart Money (Tier 2: $0.0085)

EndpointMethodDescription
/api/v1/pm/polymarket/market/{condition_id}/smart-moneyGETSmart money positioning on a market
/api/v1/pm/polymarket/markets/smart-activityGETMarkets where top wallets are active

UMA Oracle — Polymarket Resolution (Tier 1: $0.0085)

EndpointMethodDescription
/api/v1/pm/polymarket/uma/marketsGETList UMA oracle questions filtered by state (proposed, disputed, resolved, …)
/api/v1/pm/polymarket/uma/market/{condition_id}GETCurrent UMA oracle status and event timeline for a single market

Wallet Identity & Clustering (Tier 2: $0.0085)

Cross-context wallet labels and on-chain relationship graph data.

EndpointMethodDescription
/api/v1/pm/polymarket/wallet/identity/{wallet}GETIdentity and profile metadata for a single wallet address
/api/v1/pm/polymarket/wallet/identitiesPOSTBulk identity lookup — body {"addresses":[...]} (up to 200 addresses)
/api/v1/pm/polymarket/wallet/{address}/clusterGETWallets connected to a seed address via on-chain transfers and identity proofs

Kalshi (Tier 1: $0.0085)

EndpointMethodDescription
/api/v1/pm/kalshi/marketsGETQuery markets with filtering, sorting, and pagination
/api/v1/pm/kalshi/tradesGETFetch historical trade data
/api/v1/pm/kalshi/orderbooksGETFetch historical orderbook snapshots

Binance (Tier 2: $0.0085)

EndpointMethodDescription
/api/v1/pm/binance/candles/{symbol}GETOHLCV candlestick data (BTCUSDT, ETHUSDT, SOLUSDT, XRPUSDT)
/api/v1/pm/binance/ticks/{symbol}GETRaw book ticker data at microsecond granularity

Cross-Platform Search (Tier 2: $0.0085)

EndpointMethodDescription
/api/v1/pm/markets/searchGETSearch markets across Polymarket, Kalshi, Limitless, Opinion, and Predict.Fun in a single call

Retired. Predexon discontinued market matching on 2026-07-20, and the whole canonical layer went with it: matching-markets, matching-markets/pairs, markets, markets/listings and outcomes/{predexon_id} were removed from the gateway (upstream answers 410; the gateway now returns 404 Not Found for them). The dflow/* endpoints (dflow/trades, dflow/wallet/positions/{wallet}, dflow/wallet/pnl/{wallet}) were removed on 2026-08-04 for the same reason — they no longer exist upstream. markets/search above is the surviving cross-venue endpoint.

Sports Markets — temporarily unavailable

/api/v1/pm/sports/* (sports/categories, sports/markets, sports/markets/{game_id}, sports/outcomes/{predexon_id}, all Tier 1) is returning an upstream 500 as of 2026-08-04 and is withheld from discovery until Predexon restores it. The routes still resolve (they answer 402 unpaid), so existing integrations keep working the moment upstream recovers; new ones should not build on it yet. While upstream is down a paid call returns 502 and is not charged.

Other Platforms (Tier 1: $0.0085)

EndpointMethodDescription
/api/v1/pm/limitless/marketsGETList Limitless markets with filtering and sorting
/api/v1/pm/limitless/orderbooksGETHistorical orderbook snapshots for Limitless
/api/v1/pm/opinion/marketsGETList Opinion markets with filtering and sorting
/api/v1/pm/opinion/orderbooksGETHistorical orderbook snapshots for Opinion
/api/v1/pm/predictfun/marketsGETList Predict.Fun markets with filtering and sorting
/api/v1/pm/predictfun/orderbooksGETHistorical orderbook snapshots for Predict.Fun

Example: Polymarket Markets

GET https://blockrun.ai/api/v1/pm/polymarket/markets

Query Parameters

ParameterTypeDescription
searchstringSearch query (3-100 chars)
statusstringFilter by status (active, closed, archived)
sortstringSort by volume, liquidity, created
limitintegerResults per page (1-100, default 20)
pagination_keystringCursor for pagination

Example

curl "https://blockrun.ai/api/v1/pm/polymarket/markets?search=bitcoin&limit=10"

Returns 402 with payment requirements. Attach an x402 payment header to get results.


Example: Kalshi Markets

GET https://blockrun.ai/api/v1/pm/kalshi/markets

Query Parameters

ParameterTypeDescription
statusstringopen or closed
searchstringSearch in title (3-100 chars)
tickerstringFilter by ticker(s) (max 50)
event_tickerstringFilter by event ticker(s)
sortstringvolume, open_interest, price_desc, price_asc, close_time
limitintegerResults per page (1-100, default 20)
pagination_keystringCursor for pagination

Example

curl "https://blockrun.ai/api/v1/pm/kalshi/markets?search=bitcoin&sort=volume"

Example: Binance Candles

GET https://blockrun.ai/api/v1/pm/binance/candles/{symbol}

Path Parameters

ParameterTypeDescription
symbolstringBTCUSDT, ETHUSDT, SOLUSDT, or XRPUSDT

Query Parameters

ParameterTypeDescription
intervalstring1s, 1m, 5m, 15m, 1h, 4h, 1d (default 1m)
start_timeintegerUnix timestamp (seconds)
end_timeintegerUnix timestamp (seconds)
limitintegerMax candles (1-1500, default 500)

Example

curl "https://blockrun.ai/api/v1/pm/binance/candles/BTCUSDT?interval=1h&limit=24"

Example: Wallet Profile

GET https://blockrun.ai/api/v1/pm/polymarket/wallet/{wallet}

Example

curl "https://blockrun.ai/api/v1/pm/polymarket/wallet/0x1234...abcd"

Returns a complete smart wallet profile with trading stats, P&L, labels, and activity metrics.


Example: Bulk Wallet Identity (POST)

POST https://blockrun.ai/api/v1/pm/polymarket/wallet/identities

Body shape:

{ "addresses": ["0xabc...", "0xdef...", "..."] }

Up to 200 addresses per call. For a single wallet, prefer GET /polymarket/wallet/identity/{wallet}.

curl -X POST "https://blockrun.ai/api/v1/pm/polymarket/wallet/identities" \
  -H "content-type: application/json" \
  -d '{"addresses":["0x1234...abcd","0x5678...ef01"]}'

Example: Cross-Venue Search

GET https://blockrun.ai/api/v1/pm/markets/search
curl "https://blockrun.ai/api/v1/pm/markets/search?q=bitcoin%202026"
curl "https://blockrun.ai/api/v1/pm/markets/search?q=election&venue=kalshi"

Searches Polymarket, Kalshi, Limitless, Opinion and Predict.Fun in one call. q is required — omitting it returns 422.


SDK Usage

Works on all clients: LLMClient (Base), AsyncLLMClient, and SolanaLLMClient.


Errors

Payment is verified before the request is forwarded and settled only after Predexon answers, so a rejected or failed request is never charged. Upstream calls time out after 30 seconds.

CodeDescription
402Payment required (no payment header), payment verification failed (see codes below), authorization reused (code: "PAYMENT_REPLAY"), or settlement failed after the call (error: "Payment settlement failed")
400–499Predexon rejected the request — its status is passed through unchanged with error: "Bad Request", a message of the form Predexon <status>: <upstream reason> (payment NOT charged), status, endpoint, method, Predexon's body in details, and for known endpoints a hint with the correct call shape. 422 is what a missing required param (e.g. q on markets/search) produces
404Unknown or retired endpoint (error: "Not Found")
502Predexon returned a 5xx (error: "Upstream provider error"). Payment was NOT charged, and the payment nonce is released so the SDKs can retry with the same signed header
503Predexon integration not configured, or temporarily paused
500Gateway error (error: "Internal server error"), including an upstream timeout

Successful responses carry X-Payment-Response (x402 v2 settlement receipt) and X-Payment-Receipt (the settlement transaction hash).

Predexon returns 200 with unfiltered data when it receives an unknown query-parameter name — it never rejects one. Use the exact names above: free-text search is search on every list endpoint but q on markets/search; the slug filter is slug on polymarket/events but event_slug / market_slug on polymarket/markets.

Payment verification codes

A verification 402 spreads a machine-readable code:

codeMeaning
PAYMENT_INVALIDSignature, amount, network or recipient did not match the requirements (default; message omitted)
PAYMENT_UNFUNDEDThe authorization could not execute on-chain — usually insufficient USDC on Base, or an expired validAfter/validBefore window
PAYMENT_BLOCKHASH_STALESolana gateway only: signed against an expired blockhash — re-sign and retry
PAYMENT_REPLAYThat authorization was already used. Sign a fresh one for each request

Partner

These endpoints are powered by Predexon — a unified prediction market data aggregator. Payments go directly to the Predexon treasury via x402.

Full Predexon API documentation: docs.predexon.com

What's next?