slugstringจำเป็น
slug
https://api.sandbase.ai/v1/api/polymarket/markets-slugGet market by slug from Polymarket. Returns the official Polymarket API response unchanged.
เอาต์พุตของคุณจะแสดงที่นี่
กรอกอินพุตให้ครบ แล้วคลิก Run
Returns one Polymarket market as a JSON object, looked up by its URL slug. The response includes current prices, order book status, dates, fee settings, and the parent event. The only required input is slug.
description and the endDate before you display or analyze a market.conditionId and clobTokenIds of a market so you can query order book and price APIs.curl -X POST "https://api.sandbase.ai/v1/api/polymarket/markets-slug" \
-H "Authorization: Bearer $SANDBASE_API_KEY" \
-H "Content-Type: application/json" \
-d '{"slug": "xi-jinping-out-before-2027"}'
The result is returned in outputs[0].data.
| Name | Type | Required | Description |
|---|---|---|---|
slug | string | Yes | slug |
include_tag | boolean | No | include_tag |
Real response for the request above, trimmed: lists keep their first item and long strings are cut.
{
"$schema": "https://gamma-api.polymarket.com/schemas/Market.json",
"acceptingOrders": true,
"acceptingOrdersTimestamp": "2025-07-03T20:36:33Z",
"active": true,
"approved": true,
"archived": false,
"automaticallyActive": true,
"bestAsk": 0.021,
"bestBid": 0.02,
"clearBookOnStart": true,
"clobRewards": [
{
"assetAddress": "0x2791Bca1f2de4661ED88A30C99A7a9449Aa84174",
"conditionId": "0xa467b14d51f01b957109d9cbb1d6c124fab2a089d52ed8f471d23c2812e743b7",
"endDate": "2500-12-31",
"id": "303430",
"rewardsAmount": 0,
"rewardsDailyRate": 5,
"startDate": "2026-09-16"
}
],
"clobTokenIds": "[\"323382…"
}
| Field | Meaning |
|---|---|
id / conditionId | The market's numeric ID and its condition ID (a hex string). Use conditionId to match the market in other Polymarket calls. |
clobTokenIds | A JSON string holding the token IDs for the market's outcomes. Parse it before use. |
bestBid / bestAsk / lastTradePrice | Current best buy price, best sell price and last trade price. In this example they are 0.02, 0.021 and 0.02. |
active / closed / archived / acceptingOrders | Flags that show whether the market is live, finished or hidden, and whether it takes orders now. |
description | The resolution rules in plain text. The response may cut long text. |
endDate / endDateIso | When the market ends, as a full UTC timestamp and as a plain date. |
competitive | A score between 0 and 1 for the market. The response gives no further definition. |
feesEnabled / feeType / feeSchedule | Whether fees apply, the fee category, and the fee rates. feeSchedule has rate, rebateRate, exponent and takerOnly. |
clobRewards[].rewardsDailyRate | The daily rewards rate set for this market, with startDate and endDate for the program. |
events[].title / volume / liquidity / openInterest | The parent event's title and its trading volume, liquidity and open interest. volume1wk and volume1mo give recent volume. |
slug from a Polymarket market URL, or from the slug field in results of Polymarket List markets or Polymarket Search markets, events, and profiles.include_tag to true to ask for tag data. The example request did not use it.id instead, call Polymarket Get market by id.2025-07-03T20:36:33Z.$0.00044 per successful call. Failed calls are not charged. It is included in the daily free quota of each organization.
เริ่มสร้าง
เอ็นด์พอยต์ของ Platform API ที่มีการยืนยันตัวตนและการติดตามการใช้งานแบบรวมศูนย์
curl -X POST "https://api.sandbase.ai/v1/api/polymarket/markets-slug" \
-H "Authorization: Bearer $SANDBASE_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"slug": "xi-jinping-out-before-2027"
}'ตั้งค่า SandBase API key ของคุณในสภาพแวดล้อมฝั่งเซิร์ฟเวอร์ คำขอจะใช้การยืนยันตัวตนแบบ Bearer
export SANDBASE_API_KEY="YOUR_API_KEY"เก็บ key ไว้บนเซิร์ฟเวอร์ อย่าเปิดเผยในโค้ดฝั่งเบราว์เซอร์
slugstringจำเป็นslug
include_tagbooleaninclude_tag
บันทึกตัวอย่างการตอบกลับสำหรับ API นี้; จะไม่มีการส่งคำขอจริงเมื่อเปิดดู
ยังไม่มีการเผยแพร่การตอบกลับที่บันทึกไว้ ให้รัน API ใน Playground เพื่อดูการตอบกลับ
สำรวจเพิ่มเติม
| 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 |
คำถาม
ส่งคำขอ POST ไปที่ https://api.sandbase.ai/v1/api/polymarket/markets-slug โดยใส่ SandBase API key ของคุณใน Authorization header (Bearer) และส่งพารามิเตอร์เป็น JSON body คุณยังสามารถลองใช้ได้ใน Playground บนหน้านี้โดยไม่ต้องเขียนโค้ด
$0.00044 ต่อครั้ง คิดจากยอดคงเหลือ SandBase ของคุณ คุณจะถูกเรียกเก็บเฉพาะคำขอที่คุณส่งเท่านั้น ไม่มีค่าสมาชิกรายเดือน
ที่ต้องระบุ: slug (string). ตัวเลือก: include_tag (boolean). ตาราง Parameters และ Playground ในหน้านี้แสดงทุกฟิลด์
การตอบกลับ JSON ที่ส่งกลับในคำขอ HTTP เดียวกัน (แบบซิงโครนัส) README บนหน้านี้มีตัวอย่างการตอบกลับ
ไม่จำเป็น Polymarket Get market by slug ทำงานผ่าน SandBase ดังนั้น SandBase API key เดียวครอบคลุม endpoint นี้และทุก API กับโมเดลอื่นในแค็ตตาล็อก คุณไม่ต้องสมัครขอสิทธิ์เข้าถึง Polymarket API แยกต่างหาก