15trust / 100

Polymarket Markets

by tienda.textokit.store in Markets & finance

x402 APIFailing, checked 3 h ago

Polymarket markets and wallet data: one page of public prediction markets from the Gamma API (text and status filters, ordering by volume or liquidity) or a wallet's positions and activity from the Data API, with source URL and read time. Use this when an agent needs prediction-market odds or a trader's positions as evidence. 0.002 USDC per call on Base; free sample at /api/polymarket-markets/sample.

POST
https://tienda.textokit.store/api/polymarket-markets
Price
$0.002
per call in USDC
Uptime
8.3%
last 30 days
Response time
1.1 s
1.1 s slowest 5%
Last check
Failed
3 h ago, next in 3 days

Run a free test callHow to call it

Reliability

All checks passedSome failedAll failedNot checked

Latest check failed 3 h ago: Expected HTTP 402, got 530

Status and outage history · Atom feed · Watch with other listings

How to call it

POST https://tienda.textokit.store/api/polymarket-markets

Each call costs $0.002 in USDC on Base, paid with the request over x402.

Run a free test callOne unpaid request, the way an agent sends it. You see the payment challenge it gets back. Nothing is charged.

Example request

From the listing.

POST https://tienda.textokit.store/api/polymarket-markets
content-type: application/json

{
  "limit": 1,
  "offset": 0,
  "resource": "markets"
}

Parameters

ParameterTypeRequiredDescription
limitintegerNoUpstream page size before local filtering; defaults to 5. A filtered page may return fewer records or none.
offsetintegerNoOffset passed to the upstream endpoint before local filtering; defaults to 0. Endpoint-specific restrictions may cause an upstream error.
orderstringNoDescending ordering within the received market page; missing numeric values sort last. Defaults to volume. Markets only. One of: volume, liquidity.
querystringNoCase-insensitive substring search in question and slug within the received market page. Whitespace-only values are rejected. Markets only.
resourcestringNoDefaults to markets. Positions and activity require user. One of: markets, positions, activity.
statusstringNoFilter the received market page. Active requires active=true and closed=false; closed requires closed=true. Defaults to all. Markets only. One of: all, active, closed.
userstringNoPublic wallet address required for positions and activity; rejected for markets.

Example response

The provider's example. We can't check it without paying.

Example response, 44 lines
{
  "items": [
    {
      "active": true,
      "archived": false,
      "clobTokenIds": "[\"32338220190071351435772801779725302244575775216413325951443816017994629993401\", \"25659310674993675562345759665114759892400026242514633218387667107987341231962\"]",
      "closed": false,
      "conditionId": "0xa467b14d51f01b957109d9cbb1d6c124fab2a089d52ed8f471d23c2812e743b7",
      "endDate": "2027-01-01T04:59:00Z",
      "id": "559651",
      "liquidity": "626904.29825",
      "liquidityNum": 626904.29825,
      "outcomePrices": "[\"0.0285\", \"0.9715\"]",
      "outcomes": "[\"Yes\", \"No\"]",
      "question": "Xi Jinping out before 2027?",
      "slug": "xi-jinping-out-before-2027",
      "volume": "14770807.421027988",
      "volumeNum": 14770807.421027988
    }
  ],
  "pagination": {
    "limit": 1,
    "offset": 0,
    "offsetScope": "upstream_page",
    "returned": 1,
    "sourceReturned": 1,
    "totalKnown": false
  },
  "readAt": "2026-10-12T19:12:18.241Z",
  "resource": "markets",
  "scope": "Text and status filters and ordering apply only to this source page. Results do not establish global matches or global ranking; an empty selection does not establish absence of matching markets.",
  "selection": {
    "direction": "descending",
    "missingOrderValues": "last",
    "order": "volume",
    "queryFields": [
      "question",
      "slug"
    ],
    "scope": "received_page_only",
    "status": "all"
  },
  "sourceUrl": "https://gamma-api.polymarket.com/markets?limit=1&offset=0"
}

Call it from code

The curl command shows the payment challenge. The JavaScript and Python versions pay and call, and never pay more than $0.002.

curl: see the payment challenge
# bash or zsh: see the payment challenge. Nothing is charged.
curl -sS -g -i -X POST 'https://tienda.textokit.store/api/polymarket-markets' \
  -H 'content-type: application/json' \
  --data-raw '{"limit":1,"offset":0,"resource":"markets"}'

# x402 v2 sends the challenge base64-encoded in the PAYMENT-REQUIRED header (v1 sends it in the body).
# To read the header:
curl -sS -g -o /dev/null -D - -X POST 'https://tienda.textokit.store/api/polymarket-markets' \
  -H 'content-type: application/json' \
  --data-raw '{"limit":1,"offset":0,"resource":"markets"}' \
  | grep -i '^payment-required:' | cut -d' ' -f2 | tr -d '\r' | base64 --decode
JavaScript: pay and call
// npm i @x402/fetch @x402/evm viem
import { wrapFetchWithPayment, x402Client } from "@x402/fetch";
import { registerExactEvmScheme } from "@x402/evm/exact/client";
import { privateKeyToAccount } from "viem/accounts";

// Pays at most $0.002 per call.
const client = new x402Client().setSpendControls({ maxAmountPerPayment: "$0.002" });
registerExactEvmScheme(client, { signer: privateKeyToAccount(process.env.EVM_PRIVATE_KEY) });
const pay = wrapFetchWithPayment(fetch, client);

// Not sure it's safe to pay? ToolVet checks it first for $0.005. Pay for that from a separate
// client: this one is capped at $0.002 per payment. GET https://toolvet.app/api/v1/check?url=https%3A%2F%2Ftienda.textokit.store%2Fapi%2Fpolymarket-markets&method=POST
const res = await pay("https://tienda.textokit.store/api/polymarket-markets", {
  method: "POST",
  headers: { "content-type": "application/json" },
  body: JSON.stringify({
    "limit": 1,
    "offset": 0,
    "resource": "markets"
  }),
});
console.log(res.status, await res.text());
Python: pay and call
# pip install "x402[requests,evm]"
import os
from eth_account import Account
from x402 import x402ClientSync
from x402.http.clients import x402_requests
from x402.mechanisms.evm import EthAccountSigner
from x402.mechanisms.evm.exact.register import register_exact_evm_client

# Pays at most $0.002 per call.
client = x402ClientSync().set_spend_controls({"max_amount_per_payment": "$0.002"})
register_exact_evm_client(client, EthAccountSigner(Account.from_key(os.environ["EVM_PRIVATE_KEY"])))

with x402_requests(client) as session:
    res = session.post(
        "https://tienda.textokit.store/api/polymarket-markets",
        json={
            "limit": 1,
            "offset": 0,
            "resource": "markets",
        },
    )
    print(res.status_code, res.text)

Security scan

No findings

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

Recent checks

WhenResultHTTPTimePrice
3 h agoExpected HTTP 402, got 530530186 ms-
8 h agoExpected HTTP 402, got 530530197 ms-
14 h agoExpected HTTP 402, got 530530167 ms-
20 h agoExpected HTTP 402, got 53053060 ms-
26 h agoExpected HTTP 402, got 530530189 ms-
Show 7 older checks
31 h agoExpected HTTP 402, got 530530174 ms-
37 h agoExpected HTTP 402, got 530530137 ms-
42 h agoExpected HTTP 402, got 53053059 ms-
47 h agoExpected HTTP 402, got 530530219 ms-
2 days agoExpected HTTP 402, got 530530167 ms-
2 days agoExpected HTTP 402, got 53053039 ms-
3 days agoPassed4021.1 s$0.002