Sand AISand AI MAGI-2MAGI-2 теперь на SandBase: видео 1080p с нативным звукомПопробовать сейчас

Polymarket Get event by id

Документация API
https://api.sandbase.ai/v1/api/polymarket/events-by-id

Get event by id from Polymarket. Returns the official Polymarket API response unchanged.

Цена
$0.00044USD / вызов
Метод
POST
Ответ
JSON
Параметры
1 обязательных · 2 необязательных
100 бесплатных вызовов в деньПервые 100 вызовов в день — бесплатно (общий лимит для организации) · Сброс в 00:00 UTC. Далее оплата за каждый вызов.

Песочница

Ввод
id
include_chat
include_template
ВыходГотово

Ваш результат появится здесь

Заполните входные данные, затем нажмите «Запустить».

README по API

Polymarket Get event by id API

Returns one Polymarket event by its numeric id. The response includes the event details, its markets, the series it belongs to, and its tags. You can also set include_chat and include_template to add extra data.

Use cases

  • Load the title, dates, resolution source and status of a single Polymarket event after you found its id in a list.
  • Read the markets inside an event to get each market's condition ID, CLOB token IDs and last trade price.
  • Check whether an event is closed and when it closed.
  • Find which series and tags an event belongs to, for grouping sports events.

Request

curl -X POST "https://api.sandbase.ai/v1/api/polymarket/events-by-id" \
  -H "Authorization: Bearer $SANDBASE_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{"id": 2890}'

The result is returned in outputs[0].data.

Parameters

NameTypeRequiredDescription
idintegerYesid
include_chatbooleanNoinclude_chat
include_templatebooleanNoinclude_template

Example response

Real response for the request above, trimmed: lists keep their first item and long strings are cut.

{
  "$schema": "https://gamma-api.polymarket.com/schemas/Event.json",
  "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
}

Response fields

FieldMeaning
id / slug / tickerIdentifiers for the event. id is a numeric string, and slug and ticker are text names you can use in URLs and lookups.
active / closed / archivedStatus flags for the event. In this example the event is closed and still marked active.
startDate / endDate / closedTimeISO 8601 timestamps for when the event starts, ends and was closed.
description / resolutionSourceThe resolution rules in plain text and the URL of the source used to settle the event.
category / seriesSlugThe event category, such as Sports, and the slug of the series it belongs to.
commentCountThe number of comments on the event.
markets[].id / markets[].conditionIdThe market's Polymarket id and its on-chain condition ID.
markets[].clobTokenIdsA JSON-encoded string that lists the CLOB token IDs for the market's outcomes.
markets[].bestBid / markets[].bestAsk / markets[].lastTradePriceThe best bid, best ask and last trade price of the market.
series[].title / series[].recurrenceThe name of the series and how often it recurs, such as daily.

Notes

Pricing

$0.00044 per successful call. Failed calls are not charged. It is included in the daily free quota of each organization.

Посмотреть больше

Связанные APIs

Все APIs
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

Вопросы

FAQ

Как использовать API Polymarket Get event by id?

Отправьте POST-запрос на https://api.sandbase.ai/v1/api/polymarket/events-by-id, указав ключ SandBase API в заголовке Authorization (Bearer), а параметры — в теле JSON. Вы также можете попробовать это в Playground на этой странице без написания кода.

Сколько стоит API Polymarket Get event by id?

$0.00044 за вызов. Каждой организации предоставляется 100 бесплатных вызовов в сутки по UTC, общих для всех подходящих API SandBase, включая этот; после этого каждый вызов тарифицируется по этой цене и списывается с баланса SandBase. Подписка не требуется.

Какие параметры принимает API Polymarket Get event by id?

Обязательные: id (integer). Необязательные: include_chat (boolean) и include_template (boolean). В таблице Parameters и в Playground на этой странице перечислены все поля.

Что возвращает API Polymarket Get event by id?

JSON-ответ, возвращаемый в том же HTTP-запросе (синхронно). В README на этой странице приведен пример ответа.

Нужен ли мне аккаунт разработчика Polymarket или API key?

Нет. Polymarket Get event by id работает через SandBase, поэтому один API key SandBase покрывает этот endpoint и все остальные API и модели в каталоге. Вам не нужно отдельно запрашивать доступ к API Polymarket.