Tools · finance
Prediction markets (Polymarket)
Live Polymarket markets: each outcome's price (the market's implied probability), 24h and total volume, liquidity, closing date and link. Search by topic (bitcoin, fed rates, election…) or send {} for the markets with the most 24h volume. A search with no open market is 404 and not charged. Pay-per-call via x402.
$0.0045 per call, paid in USDC on Base or Solana with x402 — no account, no API key. POST https://fiatdock.com/v1/markets/prediction (or GET with the same fields as query parameters) · MCP tool prediction_markets. An answer the tool cannot produce is refused with 4xx/5xx and is not charged.
Inputs
| Field | Type | Description | Example |
|---|---|---|---|
query | string | What to look for (e.g. bitcoin, fed rates, election). Omit for the markets with the most 24h volume | "bitcoin" |
limit | integer | How many markets, 1-50, default 10 | 10 |
Example
Request body
{"query":"bitcoin"}
Answer (the published example)
{"venue":"Polymarket","query":"bitcoin","count":1,"markets":[{"question":"Will Bitcoin reach $150,000 in October?","event":"What price will Bitcoin hit in October?","outcomes":[{"name":"Yes","price":0.0025,"impliedProbabilityPct":0.3},{"name":"No","price":0.9975,"impliedProbabilityPct":99.8}],"volume24hUsd":115925,"volumeUsd":2400000,"liquidityUsd":310000,"endDate":"2026-11-01T04:00:00Z","url":"https://polymarket.com/event/what-price-will-bitcoin-hit-in-october-2026"}],"source":"Polymarket Gamma API (public)","asOf":"2026-10-05T00:00:00.000Z","note":"price = the market price of one share of that outcome (0-1 USDC), read as its implied probability. Not financial advice."}
Call it
curl
# 1) ask: an unpaid call answers 402 with the exact price (free)
curl -i -X POST https://fiatdock.com/v1/markets/prediction -H 'content-type: application/json' -d '{"query":"bitcoin"}'
# 2) pay: any x402 client signs that 402 and resends — see Node or Python below
Node
// npm i @x402/fetch @x402/evm viem
import { wrapFetchWithPaymentFromConfig } from "@x402/fetch";
import { ExactEvmScheme } from "@x402/evm";
import { privateKeyToAccount } from "viem/accounts";
const pay = wrapFetchWithPaymentFromConfig(fetch, {
schemes: [{ network: "eip155:*", client: new ExactEvmScheme(privateKeyToAccount(process.env.AGENT_PRIVATE_KEY)) }],
});
const r = await pay("https://fiatdock.com/v1/markets/prediction", {
method: "POST",
headers: { "content-type": "application/json" },
body: JSON.stringify({"query":"bitcoin"}),
});
console.log(r.status, await r.json());
Python
# pip install "x402[httpx,evm]"
import asyncio, json, os
from eth_account import Account
from x402 import x402Client
from x402.http.clients import x402HttpxClient
from x402.mechanisms.evm.exact import register_exact_evm_client
async def main():
client = register_exact_evm_client(x402Client(), Account.from_key(os.environ["AGENT_PRIVATE_KEY"]))
async with x402HttpxClient(client) as http:
r = await http.post("https://fiatdock.com/v1/markets/prediction", json=json.loads("{\"query\":\"bitcoin\"}"))
print(r.status_code, r.json())
asyncio.run(main())
MCP (Claude, Cursor, any MCP client)
{"mcpServers":{"fiatdock":{"command":"npx","args":["-y","fiatdock-mcp"],"env":{"AGENT_PRIVATE_KEY":"0x<your agent wallet key>"}}}}
// then call the tool "prediction_markets" — the package pays each call from that wallet
The wallet needs USDC on Base. Prefer no install? The remote server https://fiatdock.com/mcp answers the 402 as tool output for an agent that signs its own payments.
Related tools
- Token safety check — $0.0045
- Token report (price + safety) — $0.0045
- Stablecoin supply and peg — $0.002
- Perp market + funding (Hyperliquid, Binance, Bybit) — $0.001
- Best DeFi yields by chain and token (DefiLlama) — $0.001
- FX rates + conversion (live, with the ECB rate beside it) — $0.001
Machine-readable: OpenAPI · tools.json · llms.txt · /.well-known/x402