Sand AISand AI MAGI-2MAGI-2 hiện đã có trên SandBase: video 1080p với âm thanh gốcDùng thử ngay

Polymarket Get event by slug

Tài liệu API
https://api.sandbase.ai/v1/api/polymarket/events-slug

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

Giá
$0.00044USD / lượt gọi
Phương thức
POST
Phản hồi
JSON
Tham số
1 bắt buộc · 2 tùy chọn
100 lượt gọi miễn phí / ngày100 lượt gọi đầu tiên mỗi ngày miễn phí (chia sẻ theo tổ chức) · Đặt lại lúc 00:00 UTC. Sau đó tính phí theo mỗi lượt gọi.

Phòng thử nghiệm

Đầu vào
slug
include_chat
include_template
Đầu raSẵn sàng

Đầu ra của bạn sẽ xuất hiện ở đây

Hoàn tất đầu vào, rồi nhấp Run.

README API

Polymarket Get event by slug API

Returns one Polymarket event for a given slug. The response includes the event's dates, status flags, tags, series, and the list of markets inside it. Optional flags include_chat and include_template add extra data to the call.

Use cases

  • Load the full record of a known Polymarket event page from the slug in its URL.
  • Read the markets inside an event, with their condition IDs and token IDs, before you query prices or order books.
  • Check whether an event is active, closed, or archived before you show it in an app.
  • Group events by series or tag, such as the NBA series, for sports dashboards.

Request

curl -X POST "https://api.sandbase.ai/v1/api/polymarket/events-slug" \
  -H "Authorization: Bearer $SANDBASE_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{"slug": "nba-will-the-mavericks-beat-the-grizzlies-by-more-than-5pt5-points-in-their-december-4-matchup"}'

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

Parameters

NameTypeRequiredDescription
slugstringYesslug
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 of the event. id is a numeric string, and slug and ticker hold the URL-style name.
active / closed / archivedStatus flags for the event. closedTime shows when the event was closed.
startDate / endDate / creationDateDates of the event in ISO 8601 format.
description / resolutionSourceThe resolution rules in text, and the URL of the source used to settle the event.
commentCountNumber of comments on the event.
liquidity / openInterestNumeric liquidity and open interest of the event. Both are 0 in this example.
markets[].id / markets[].conditionIdID of each market in the event, and its 0x condition ID.
markets[].clobTokenIdsJSON string that holds the token IDs of the market, one for each outcome.
markets[].bestBid / markets[].bestAsk / markets[].lastTradePriceBest bid, best ask, and last trade price of the market.
series[].title / series[].slug / series[].recurrenceName, slug, and recurrence of the series the event belongs to, such as NBA and daily.
tags[].label / tags[].slugLabel and slug of each tag on the event.

Notes

Pricing

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

Khám phá thêm

APIs liên quan

Tất cả APIs
APIGiáPhản hồi
Polymarket$0.00044 mỗi lần gọiJSON
Polymarket$0.012 mỗi lần gọiJSON
Polymarket$0.012 mỗi lần gọiJSON
Polymarket$0.012 mỗi lần gọiJSON
Polymarket$0.012 mỗi lần gọiJSON
Polymarket$0.012 mỗi lần gọiJSON

Câu hỏi

FAQ

Làm thế nào để dùng API Polymarket Get event by slug?

Gửi yêu cầu POST đến https://api.sandbase.ai/v1/api/polymarket/events-slug với khóa API SandBase của bạn trong tiêu đề Authorization (Bearer) và các tham số trong phần thân JSON. Bạn cũng có thể thử trực tiếp trong Playground trên trang này mà không cần viết code.

API Polymarket Get event by slug có giá bao nhiêu?

$0.00044 mỗi lần gọi. Mỗi tổ chức được 100 lần gọi miễn phí mỗi ngày UTC, dùng chung cho các API SandBase đủ điều kiện, bao gồm API này; sau đó mỗi lần gọi sẽ được tính theo mức giá này từ số dư SandBase của bạn. Không có gói đăng ký.

API Polymarket Get event by slug chấp nhận những tham số nào?

Bắt buộc: slug (string). Tùy chọn: include_chat (boolean) và include_template (boolean). Bảng Parameters và Playground trên trang này liệt kê mọi trường.

API Polymarket Get event by slug trả về gì?

Phản hồi JSON được trả về trong cùng một yêu cầu HTTP (đồng bộ). README trên trang này có ví dụ phản hồi.

Tôi có cần tài khoản nhà phát triển hoặc API key của Polymarket không?

Không. Polymarket Get event by slug chạy thông qua SandBase, nên chỉ cần một API key SandBase là đủ cho endpoint này và mọi API cùng model khác trong danh mục. Bạn không cần đăng ký riêng để có quyền truy cập API của Polymarket.