Polymarket API

Polymarket 市场 API

按关键词或按活跃度排序,发现 Polymarket 预测市场(问题、结果价格、交易量、流动性和截止日期),以标准化 JSON 返回。

POST/v1/run/polymarket.markets
可用率
100.00%
30d · 10 次调用
请求数
12
30d · 按周,近 12 周
响应时间
7.3s
中位数 · 30d

调用方式

发出你的第一个请求

import os, requests

res = requests.post(
    "https://api.getanyapi.com/v1/run/polymarket.markets",
    headers={"Authorization": f"Bearer {os.environ['ANYAPI_KEY']}"},
    json={
        "query": ""
    },
)
print(res.json())
打开于
获取免费密钥
示例响应
{
  "data": {
    "items": [
      {
        "bestAsk": 12.5,
        "bestBid": 1024,
        "commentCount": 12500,
        "conditionId": "a1b2c3d4",
        "createdUtc": 12.5,
        "description": "A short example description of this item.",
        "endsUtc": 12.5,
        "eventId": "a1b2c3d4",
        "eventTitle": "Example title",
        "id": "a1b2c3d4",
        "image": "https://example.com/image.jpg",
        "lastTradePrice": 19.99,
        "liquidityUsd": 1024,
        "openInterestUsd": 12.5,
        "outcomes": [
          {
            "name": "Example title",
            "price": 19.99
          }
        ],
        "slug": "alex_rivera",
        "spread": 12.5,
        "startsUtc": 12.5,
        "status": "active",
        "tags": [
          {
            "name": "Example title",
            "slug": "alex_rivera"
          }
        ],
        "title": "Example title",
        "updatedUtc": 12.5,
        "url": "https://example.com/page",
        "volume1mUsd": 12500,
        "volume1wUsd": 12500,
        "volume24hUsd": 12500,
        "volumeUsd": 12500
      }
    ]
  },
  "found": true,
  "reason": "not_found"
}
响应类型定义
interface PolymarketMarketsResponse {
  data: {
    items: {
      bestAsk?: number;
      bestBid?: number;
      commentCount?: number;
      conditionId?: string;
      createdUtc?: number;
      description?: string;
      endsUtc?: number;
      eventId?: string;
      eventTitle?: string;
      id: string;
      image?: string;
      lastTradePrice?: number;
      liquidityUsd?: number;
      openInterestUsd?: number;
      outcomes?: {
        name?: string;
        price?: number;
      }[];
      slug?: string;
      spread?: number;
      startsUtc?: number;
      status?: string;
      tags?: {
        name?: string;
        slug?: string;
      }[];
      title: string;
      updatedUtc?: number;
      url: string;
      volume1mUsd?: number;
      volume1wUsd?: number;
      volume24hUsd?: number;
      volumeUsd?: number;
    }[];
  } | null;
  found: boolean;
  reason?: "not_found";
}

完整的参数与响应参考:这个接口的每个字段、类型和示例。

参考

请求、响应与价格

最近验证于 2026-09-29 · 可用率和延迟按 30d 统计
POST /v1/run/polymarket.markets
curl -X POST https://api.getanyapi.com/v1/run/polymarket.markets \
  -H "Authorization: Bearer $ANYAPI_KEY" \
  -H "Content-Type: application/json" \
  -d '{"limit":10,"query":"election"}'
字段类型示例值
请求体
querystring"election"市场搜索词(例如 election、bitcoin、super bowl)。
limitinteger10最多返回的结果数(1-25,默认 25)。按返回的结果数扣费,所以上限越低,费用越少。
sortByenum返回结果前,发现的市场按什么排序(例如 volume_24hr 表示近期势头)。
statusenum返回 "active" 市场以获取当前价格和交易量,或返回 "resolved" 市场以获取历史结果。
响应
dataobjectThe result wrapper, or null when nothing was found.
data.itemsobject[]Prediction-market records: market question, outcomes with current prices, volume, liquidity, and end date. Populated whenever the provider has data for the entity.
data.items[].bestAsknumberBest ask currently on the order book (0 to 1).
data.items[].bestBidnumberBest bid currently on the order book (0 to 1).
data.items[].commentCountintegerNumber of comments on the event.
data.items[].conditionIdstringOn-chain condition identifier for the market.
data.items[].createdUtcnumberUTC epoch timestamp in seconds (Unix time). Multiply by 1000 for a JS Date in milliseconds. When the market was created.
data.items[].descriptionstringResolution rules for the market.
data.items[].endsUtcnumberUTC epoch timestamp in seconds (Unix time). Multiply by 1000 for a JS Date in milliseconds. When the market resolves/ends.
data.items[].eventIdstringIdentifier of the parent event grouping this market.
data.items[].eventTitlestringTitle of the parent event grouping this market.
data.items[].idstringPolymarket market identifier. Populated whenever the provider has data for the entity.
data.items[].imagestringEvent image URL.
data.items[].lastTradePricenumberPrice of the most recent trade (0 to 1).
data.items[].liquidityUsdnumberAvailable liquidity in USD.
data.items[].openInterestUsdnumberOpen interest in USD.
data.items[].outcomesobject[]Market outcomes with their current implied prices.
data.items[].outcomes[].namestringOutcome label, e.g. Yes or No.
data.items[].outcomes[].pricenumberCurrent implied probability price for the outcome (0 to 1).
data.items[].slugstringURL slug of the market.
data.items[].spreadnumberDifference between the best ask and the best bid.
data.items[].startsUtcnumberUTC epoch timestamp in seconds (Unix time). Multiply by 1000 for a JS Date in milliseconds. When trading opened.
data.items[].statusstringMarket status, e.g. active or closed.
data.items[].tagsobject[]Polymarket topic tags for the event.
data.items[].tags[].namestringTag label, e.g. Politics.
data.items[].tags[].slugstringTag slug.
data.items[].titlestringThe market question. Populated whenever the provider has data for the entity.
data.items[].updatedUtcnumberUTC epoch timestamp in seconds (Unix time). Multiply by 1000 for a JS Date in milliseconds. When the market was last updated.
data.items[].urlstringPolymarket URL for the market event. Populated whenever the provider has data for the entity.
data.items[].volume1mUsdnumberTraded volume in USD over the past month.
data.items[].volume1wUsdnumberTraded volume in USD over the past week.
data.items[].volume24hUsdnumberTraded volume in USD over the past 24 hours.
data.items[].volumeUsdnumberTotal traded volume in USD.
foundbooleanTrue when at least one market record was returned.
reason"not_found"Present only when `found` is false, and says why there is no result. `not_found`: the source states the target does not exist, or returned nothing for it. A `found: false` answer is a successful call, not an error, and `costUsd` is what it actually cost.
价格
每次请求价格(上限)USDUS$0.132
价格(/千条结果)USDUS$5.28

常见问题

关于 Polymarket 市场 API

AnyAPI 的 Polymarket 市场 API 只需一次 POST 请求 /v1/run/polymarket.markets,就以统一格式的 JSON 返回 Polymarket 数据。按关键词或按活跃度排序,发现 Polymarket 预测市场(问题、结果价格、交易量、流动性和截止日期),以标准化 JSON 返回。无论哪个数据源提供服务,AnyAPI 都返回同一套统一的 schema。费用:每千条结果 US$5.28,单次请求最多 US$0.132,以美元计价,无需订阅,也没有每月最低消费。过去 30 天,通过 AnyAPI 发起的 Polymarket 市场 API 调用中有 100.0% 成功,响应时间中位数为 7.3 秒,共测量 10 次调用。

费用:每千条结果 US$5.28,单次请求最多 US$0.132,以美元计价,无需订阅,也没有每月最低消费。你只需为一个美元钱包充值,每次调用从中扣费。部分由钱包付费的失败请求会产生处理费用,我们按成本原价转嫁,不加价;错误响应会显示收取的金额。

按关键词或按活跃度排序,发现 Polymarket 预测市场(问题、结果价格、交易量、流动性和截止日期),以标准化 JSON 返回。响应是统一格式的 JSON,外层结构与每个 AnyAPI 接口相同,所以解析另一个接口只需换一个 URL,别的都不用改。

过去 30 天,通过 AnyAPI 发起的 Polymarket 市场 API 调用中有 100.0% 成功,响应时间中位数为 7.3 秒,共测量 10 次调用。这些是 AnyAPI 对经过网关的流量的自有测量,持续重新计算,并非公开承诺的服务等级目标。