81trust / 100

Markets Prediction

by api.x-402.online in Markets & finance

x402 APIPassing, checked 1 h ago

Open prediction markets from Polymarket and Kalshi in one call: question, outcome probabilities, 24 h volume, liquidity, closing time and link, sorted by volume, with an optional keyword filter. Query: ?q=election&limit=10&sources=polymarket,kalshi

GET https://api.x-402.online/v1/markets/prediction

Last 30 days

All checks passedSome failedAll failedNot checked
Uptime
100%
Response time
132 ms typical, 132 ms slowest 5%
Last check
1 h ago
Next check
any minute now

How to call it

# See the payment challenge (nothing is charged)
curl -i -X GET "https://api.x-402.online/v1/markets/prediction?limit=5&q=fed"
import { wrapFetchWithPayment } from "@x402/fetch";
import { x402Client } from "@x402/core/client";
import { ExactEvmScheme } from "@x402/evm/exact/client";
import { privateKeyToAccount } from "viem/accounts";

const client = new x402Client().register(
  "eip155:8453",
  new ExactEvmScheme(privateKeyToAccount(process.env.AGENT_KEY)),
);
const pay = wrapFetchWithPayment(fetch, client);

// Not sure it's safe to pay? Preflight it first for $0.005:
// GET https://toolvet.app/api/v1/check?url=https%3A%2F%2Fapi.x-402.online%2Fv1%2Fmarkets%2Fprediction
const res = await pay("https://api.x-402.online/v1/markets/prediction?limit=5&q=fed");
console.log(await res.json());

Example input

{
  "limit": 5,
  "q": "fed"
}

Example output

{
  "count": 5,
  "markets": [
    {
      "outcomes": [
        {
          "outcome": "Yes",
          "probability": 0.62
        }
      ],
      "question": "…",
      "source": "polymarket",
      "volume_24h_usd": 125000
    }
  ],
  "sources_answered": [
    "polymarket",
    "kalshi"
  ]
}

Security scan

  • No findings. We scan names, descriptions and tool definitions for hidden instructions and other prompt-injection patterns.

Recent checks

WhenResultHTTPTimePrice
1 h agoPassed402146 ms$0.005
6 h agoPassed402132 ms$0.005