after_cursorstring
Opaque cursor token from a previous response's next_cursor
https://api.sandbase.ai/v1/api/polymarket/events-keysetList events with cursor based keyset pagination. Use next_cursor as after_cursor to fetch the next page. The offset parameter is rejected.
您的输出将显示在这里
完成输入,然后点击运行。
Returns a page of Polymarket events, each with its markets, series and tags. All inputs are optional filters, and you page through results with a cursor instead of an offset.
volume_min or liquidity_min.title_search to track markets on a topic.curl -X POST "https://api.sandbase.ai/v1/api/polymarket/events-keyset" \
-H "Authorization: Bearer $SANDBASE_API_KEY" \
-H "Content-Type: application/json" \
-d '{"limit": 2}'
The result is returned in outputs[0].data.
| Name | Type | Required | Description |
|---|---|---|---|
after_cursor | string | No | Opaque cursor token from a previous response's next_cursor |
ascending | boolean | No | Sort direction. Only used when order is set. |
closed | boolean | No | Filter by closed state. Omitted includes open and closed events. Use true for closed events, false for open events, or any (case-insensitive) for both states. Unlike markets, any does not require an identifier filter. In |
created_by | array | No | created_by |
cyom | boolean | No | cyom |
end_date_max | string | No | end_date_max |
end_date_min | string | No | end_date_min |
event_date | string | No | event_date |
event_week | integer | No | event_week |
exclude_tag_id | array | No | Tag IDs to exclude. Cannot overlap with tag_id. |
featured | boolean | No | featured |
featured_order | boolean | No | featured_order |
game_id | array | No | game_id |
id | array | No | id |
include_best_lines | boolean | No | When true, includes BestLines relation |
include_chat | boolean | No | When true, includes Chats and Series.Chats relations |
include_children | boolean | No | include_children |
include_template | boolean | No | When true, includes Templates relation |
limit | integer | No | Maximum number of results to return (max 100) |
liquidity_max | number | No | liquidity_max |
liquidity_min | number | No | liquidity_min |
live | boolean | No | live |
locale | string | No | locale |
offset | integer | No | Not allowed. Returns 422 if provided. |
order | string | No | Comma-separated list of JSON field names to order by |
parent_event_id | integer | No | parent_event_id |
partner_slug | string | No | When set, external_partners are attached to matching events |
recurrence | string | No | recurrence |
related_tags | boolean | No | related_tags |
series_id | array | No | series_id |
slug | array | No | slug |
start_date_max | string | No | start_date_max |
start_date_min | string | No | start_date_min |
start_time_max | string | No | start_time_max |
start_time_min | string | No | start_time_min |
tag_id | array | No | tag_id |
tag_match | string | No | tag_match |
tag_slug | string | No | tag_slug |
title_search | string | No | title_search |
volume_max | number | No | volume_max |
volume_min | number | No | volume_min |
Real response for the request above, trimmed: lists keep their first item and long strings are cut.
{
"$schema": "https://gamma-api.polymarket.com/schemas/EventsKeysetListResponse.json",
"events": [
{
"active": true,
"archived": false,
"category": "Sports",
"closed": true,
"closedTime": "2022-07-27T14:40:02.074Z",
"commentCount": 8128,
"competitive": 0,
"createdAt": "2022-07-27T14:40:02.074Z",
"creationDate": "2021-12-04T00:00:00Z",
"cyom": false,
"deploying": false,
"description": "In the upcoming NBA game, scheduled for December 4:\n\nIf the Dallas Mavericks win…"
}
],
"next_cursor": "baQCMe2wl4-1BqJJ87F6fVlbWuykHjYlEXNrqgeisfJ7InYiOjEsImsiOiJldmVudHMiLCJvaCI6IjRm…"
}
| Field | Meaning |
|---|---|
events[].id / events[].slug / events[].ticker | Identifiers for the event. id is a numeric string, and slug and ticker are readable keys that match the event URL name. |
events[].title / events[].description | The event question and the text that explains how its markets resolve. |
events[].active / events[].closed / events[].archived | Flags for the event state. closedTime gives the time the event was closed. |
events[].startDate / events[].endDate / events[].createdAt | ISO 8601 timestamps for when the event starts, ends and was created. |
events[].liquidity / events[].openInterest / events[].commentCount | Liquidity, open interest and comment count for the event. |
events[].resolutionSource | URL of the source used to settle the event. |
events[].markets[].bestBid / events[].markets[].bestAsk | Best bid and best ask price for a market inside the event. |
events[].markets[].clobTokenIds | Token IDs for the market outcomes, returned as a JSON-encoded string. Parse it before use. |
events[].tags[].id / events[].tags[].label / events[].tags[].slug | Tags attached to the event. Use the id values with tag_id or exclude_tag_id to filter. |
events[].series[] / events[].seriesSlug | The series the event belongs to, such as nba or nfl. |
next_cursor from the response into after_cursor to get the next page. Do not send offset, which returns a 422 error.limit accepts 1 to 100 and defaults to 20.$0.00044 per successful call. Failed calls are not charged. It is included in the daily free quota of each organization.
开始构建
具备统一身份验证和使用情况跟踪的平台 API 端点。
curl -X POST "https://api.sandbase.ai/v1/api/polymarket/events-keyset" \
-H "Authorization: Bearer $SANDBASE_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"limit": 2,
"ascending": true
}'将您的 SandBase API 密钥设置到服务器环境中。请求使用 Bearer 身份验证。
export SANDBASE_API_KEY="YOUR_API_KEY"请将密钥保存在服务器端。不要在浏览器代码中暴露它。
after_cursorstringOpaque cursor token from a previous response's next_cursor
ascendingbooleanSort direction. Only used when order is set.
默认值:true
closedbooleanFilter by closed state. Omitted includes open and closed events. Use true for closed events, false for open events, or any (case-insensitive) for both states. Unlike markets, any does not require an identifier filter. Invalid closed values return 422.
可选值:any
created_byarraycreated_by
cyombooleancyom
end_date_maxstringend_date_max
end_date_minstringend_date_min
event_datestringevent_date
event_weekintegerevent_week
exclude_tag_idarrayTag IDs to exclude. Cannot overlap with tag_id.
featuredbooleanfeatured
featured_orderbooleanfeatured_order
game_idarraygame_id
idarrayid
include_best_linesbooleanWhen true, includes BestLines relation
include_chatbooleanWhen true, includes Chats and Series.Chats relations
include_childrenbooleaninclude_children
include_templatebooleanWhen true, includes Templates relation
limitintegerMaximum number of results to return (max 100)
默认值:20
liquidity_maxnumberliquidity_max
liquidity_minnumberliquidity_min
livebooleanlive
localestringlocale
offsetintegerNot allowed. Returns 422 if provided.
orderstringComma-separated list of JSON field names to order by
parent_event_idintegerparent_event_id
partner_slugstringWhen set, external_partners are attached to matching events
recurrencestringrecurrence
related_tagsbooleanrelated_tags
series_idarrayseries_id
slugarrayslug
start_date_maxstringstart_date_max
start_date_minstringstart_date_min
start_time_maxstringstart_time_max
start_time_minstringstart_time_min
tag_idarraytag_id
tag_matchstringtag_match
tag_slugstringtag_slug
title_searchstringtitle_search
volume_maxnumbervolume_max
volume_minnumbervolume_min
这是该 API 保存的示例响应;查看时不会发起实时请求。
尚未发布已保存的响应。请在 Playground 中运行 API 以查看其响应。
探索更多
| API | 价格 | 响应 |
|---|---|---|
Polymarket | $0.00044 每次调用 | JSON |
Polymarket | $0.012 每次调用 | JSON |
Polymarket | $0.012 每次调用 | JSON |
Polymarket | $0.012 每次调用 | JSON |
Polymarket | $0.012 每次调用 | JSON |
Polymarket | $0.012 每次调用 | JSON |
问题
向 https://api.sandbase.ai/v1/api/polymarket/events-keyset 发送 POST 请求,在 Authorization 请求头中使用您的 SandBase API key(Bearer),并将参数作为 JSON 请求体传入。您也可以直接在本页的 Playground 中试用,无需编写代码。
每次调用 $0.00044。每个组织在每个 UTC 日可获得 100 次免费调用,适用于包括此接口在内的所有符合条件的 SandBase APIs;超过后,每次调用将按此价格从您的 SandBase 余额中扣费。无需订阅。
无需参数。 可选:after_cursor (string), ascending (boolean), closed(any 之一), created_by (array), cyom (boolean) 和 end_date_max (string) 以及另外 35 项。 Parameters 表和本页的 Playground 列出了每个字段。
在同一个 HTTP 请求中返回的 JSON 响应(同步)。 本页的 README 包含一个示例响应。
不需要。Polymarket List events (keyset pagination) 通过 SandBase 运行,因此一个 SandBase API key 即可覆盖此端点以及目录中的其他所有 API 和模型。您无需单独申请 Polymarket API 访问权限。