คำนิยาม
Gamma API
Polymarket's public REST API for markets, events, tags, and series.
Gamma API
Polymarket Gamma API คือ REST API สาธารณะที่ให้ข้อมูลระดับตลาด: markets, events, tags, series และ profiles นักพัฒนาและเทรดเดอร์ใช้เพื่อแสดงรายการตลาด ดึงเมตาดาต้าเหตุการณ์ และสร้างหน้าดัชนีหรือไดเร็กทอรีของตลาดโดยไม่ต้องยืนยันตัวตน
Key takeaways
- The Gamma API is public and requires no authentication for reads. Use it to list markets, events, tags, series, and profiles.
/marketsis rate-limited: 300 requests per 10 seconds. Pagination uses cursor-basedafter_cursor(offset is rejected).- Useful query parameters include
limit(max 1000),after_cursor, filtering arrays likeslugorcondition_ids, and boolean flags such asclosedoractive. - Combine
/marketsand/eventscarefully: the listing combined limit is 900 req / 10 s; the overall API limit is 4000 req / 10 s.
How the Gamma API is used
Gamma API เป็นแหล่งข้อมูลสาธารณะมาตรฐานสำหรับข้อมูลที่เน้นการแสดงผลเกี่ยวกับตลาดของ Polymarket ฟรอนต์เอนด์ ตัวรวบรวมข้อมูล และเครื่องมือวิจัยจะเรียก endpoints เช่น /markets และ /events เพื่อเติมรายการตลาด หน้าหมวดหมู่ และตัวกรองแท็ก
Important parameters and behaviors
- limit: ควบคุมขนาดหน้า ค่าเริ่มต้นเป็น 20 สูงสุด 1000.
- after_cursor: การแบ่งหน้าด้วยเคอร์เซอร์;
offsetจะถูกปฏิเสธพร้อม HTTP 422—อย่าใช้ offset. - Filtering: พารามิเตอร์ค้นหาบางตัวรับอาร์เรย์ (เช่น
slug,id,condition_ids,clob_token_ids,question_ids,market_maker_address). - Flags:
closed(ค่าเริ่มต้น false),active, และarchivedใช้กรองตามสถานะของตลาด. - Ordering: พารามิเตอร์
orderรับรายการฟิลด์คั่นด้วยคอมมา (เช่นvolume24hr,volume,liquidity,endDate), ทำงานคู่กับascending(boolean).
Rate limits and practical guidance
/marketsspecific limit: 300 requests per 10 seconds.- Combined listing limit for
/markets+/events: 900 requests per 10 seconds. - Overall Gamma API surface: 4000 requests per 10 seconds.
ถ้าคุณวางแผนทำการอินเด็กซ์ที่มีปริมาณสูง ให้ใช้ exponential backoff และเคารพรูปแบบการแบ่งหน้าด้วยเคอร์เซอร์ แคชรายการเมื่อเหมาะสม; หลีกเลี่ยงการโพลลิ่งทรัพยากรเดียวกันบ่อยเกินไป
Example request (curl)
curl "https://gamma-api.polymarket.com/markets?limit=50&order=volume24hr&ascending=false"
In context on Polymarket
Gamma เป็น API อ่านสาธารณะไม่ต้องยืนยันตัวตนที่คุณจะเรียกเมื่อคุณต้องการเมตาดาต้าตลาดเพื่อรายการ UI หน้าตารางแท็ก หรือการรวมที่ไม่ต้องการสถานะบนเชน (สำหรับตำแหน่งและการเทรดบนเชน ให้ใช้ the Data API; สำหรับการดำเนินการบน order-book ให้ใช้ the CLOB API). เพราะ Gamma เป็น read-only และสาธารณะ จึงเป็นที่เหมาะสำหรับสร้างไดเร็กทอรีตลาดและเครื่องมือสำรวจ
See also
- /glossary/data-api
- /glossary/clob-api
Closing note
Polymarket Gamma API เป็นจุดเริ่มต้นแรกสำหรับเมตาดาต้าตลาด ใช้พารามิเตอร์ที่เอกสารระบุและเคารพ rate limits เพื่อหลีกเลี่ยงคำขอที่ถูกปฏิเสธ