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.
Votre sortie apparaîtra ici
Complétez les entrées, puis cliquez sur Exécuter.
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.
Commencer à construire
Point de terminaison de l'API de la plateforme avec authentification unifiée et suivi de l'utilisation.
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
}'Définissez votre clé API SandBase dans l'environnement de votre serveur. Les requêtes utilisent l'authentification Bearer.
export SANDBASE_API_KEY="YOUR_API_KEY"Conservez votre clé côté serveur. Ne l'exposez pas dans le code du navigateur.
after_cursorstringOpaque cursor token from a previous response's next_cursor
ascendingbooleanSort direction. Only used when order is set.
Par défaut : 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.
Valeurs possibles : 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)
Par défaut : 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
Exemple de réponse enregistré pour cette API ; aucune requête en direct n'est effectuée lors de l'affichage.
Aucune réponse enregistrée n'a été publiée. Exécutez l'API dans Playground pour inspecter sa réponse.
Explorer plus
| API | Prix | Réponse |
|---|---|---|
Polymarket | $0.00044 par appel | JSON |
Polymarket | $0.012 par appel | JSON |
Polymarket | $0.012 par appel | JSON |
Polymarket | $0.012 par appel | JSON |
Polymarket | $0.012 par appel | JSON |
Polymarket | $0.012 par appel | JSON |
Questions
Envoyez une requête POST à https://api.sandbase.ai/v1/api/polymarket/events-keyset avec votre clé API SandBase dans l’en-tête Authorization (Bearer) et les paramètres dans un corps JSON. Vous pouvez aussi l’essayer dans le Playground sur cette page sans écrire de code.
$0.00044 par appel. Chaque organisation bénéficie de 100 appels gratuits par jour UTC, partagés entre les API SandBase éligibles, y compris celle-ci ; au-delà, chaque appel est facturé à ce tarif depuis votre solde SandBase. Aucun abonnement.
Aucun paramètre n’est requis. Facultatif : after_cursor (string), ascending (boolean), closed (l’un de any), created_by (array), cyom (boolean) et end_date_max (string) et 35 de plus. Le tableau des paramètres et le Playground sur cette page listent tous les champs.
Une réponse JSON renvoyée dans la même requête HTTP (synchrone). Le README sur cette page inclut un exemple de réponse.
Non. Polymarket List events (keyset pagination) fonctionne via SandBase, donc une seule clé API SandBase couvre ce point de terminaison ainsi que toutes les autres API et tous les modèles du catalogue. Vous n’avez pas besoin de demander un accès API Polymarket séparément.