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"}'| 字段 | 类型 | 示例值 |
|---|---|---|
| 请求体 | ||
| query | string | "election"市场搜索词(例如 election、bitcoin、super bowl)。 |
| limit | integer | 10最多返回的结果数(1-25,默认 25)。按返回的结果数扣费,所以上限越低,费用越少。 |
| sortBy | enum | 返回结果前,发现的市场按什么排序(例如 volume_24hr 表示近期势头)。 |
| status | enum | 返回 "active" 市场以获取当前价格和交易量,或返回 "resolved" 市场以获取历史结果。 |
| 响应 | ||
| data | object | The result wrapper, or null when nothing was found. |
| data.items | object[] | 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[].bestAsk | number | Best ask currently on the order book (0 to 1). |
| data.items[].bestBid | number | Best bid currently on the order book (0 to 1). |
| data.items[].commentCount | integer | Number of comments on the event. |
| data.items[].conditionId | string | On-chain condition identifier for the market. |
| data.items[].createdUtc | number | UTC epoch timestamp in seconds (Unix time). Multiply by 1000 for a JS Date in milliseconds. When the market was created. |
| data.items[].description | string | Resolution rules for the market. |
| data.items[].endsUtc | number | UTC epoch timestamp in seconds (Unix time). Multiply by 1000 for a JS Date in milliseconds. When the market resolves/ends. |
| data.items[].eventId | string | Identifier of the parent event grouping this market. |
| data.items[].eventTitle | string | Title of the parent event grouping this market. |
| data.items[].id | string | Polymarket market identifier. Populated whenever the provider has data for the entity. |
| data.items[].image | string | Event image URL. |
| data.items[].lastTradePrice | number | Price of the most recent trade (0 to 1). |
| data.items[].liquidityUsd | number | Available liquidity in USD. |
| data.items[].openInterestUsd | number | Open interest in USD. |
| data.items[].outcomes | object[] | Market outcomes with their current implied prices. |
| data.items[].outcomes[].name | string | Outcome label, e.g. Yes or No. |
| data.items[].outcomes[].price | number | Current implied probability price for the outcome (0 to 1). |
| data.items[].slug | string | URL slug of the market. |
| data.items[].spread | number | Difference between the best ask and the best bid. |
| data.items[].startsUtc | number | UTC epoch timestamp in seconds (Unix time). Multiply by 1000 for a JS Date in milliseconds. When trading opened. |
| data.items[].status | string | Market status, e.g. active or closed. |
| data.items[].tags | object[] | Polymarket topic tags for the event. |
| data.items[].tags[].name | string | Tag label, e.g. Politics. |
| data.items[].tags[].slug | string | Tag slug. |
| data.items[].title | string | The market question. Populated whenever the provider has data for the entity. |
| data.items[].updatedUtc | number | UTC epoch timestamp in seconds (Unix time). Multiply by 1000 for a JS Date in milliseconds. When the market was last updated. |
| data.items[].url | string | Polymarket URL for the market event. Populated whenever the provider has data for the entity. |
| data.items[].volume1mUsd | number | Traded volume in USD over the past month. |
| data.items[].volume1wUsd | number | Traded volume in USD over the past week. |
| data.items[].volume24hUsd | number | Traded volume in USD over the past 24 hours. |
| data.items[].volumeUsd | number | Total traded volume in USD. |
| found | boolean | True 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. |
| 价格 | ||
| 每次请求价格(上限) | USD | US$0.132 |
| 价格(/千条结果) | USD | US$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 对经过网关的流量的自有测量,持续重新计算,并非公开承诺的服务等级目标。