परिभाषा
Gamma API
Polymarket का सार्वजनिक REST API जो markets, events, tags, और series के लिए है।
Gamma API
Polymarket Gamma API सार्वजनिक REST API है जो market-स्तरीय डेटा उजागर करता है: markets, events, tags, series, और profiles. डेवलपर्स और ट्रेडर्स इसका उपयोग markets की लिस्ट पाने, event मेटाडेटा फ़ेच करने, और बिना प्रमाणिकरण के index पेज या market directories बनाने के लिए करते हैं।
Key takeaways
- Gamma API सार्वजनिक है और reads के लिए किसी authentication की जरूरत नहीं है। इसका उपयोग markets, events, tags, series, और profiles लिस्ट करने के लिए करें।
/marketsपर rate-limit है: 300 requests प्रति 10 सेकंड। पेजिनेशन cursor-basedafter_cursorका उपयोग करता है (offset reject होता है)।- उपयोगी query पैरामीटर में
limit(max 1000),after_cursor, filtering arrays जैसेslugयाcondition_ids, और boolean flags जैसेclosedयाactiveशामिल हैं। /marketsऔर/eventsको संयोजित करते समय सावधानी रखें: combined listing limit 900 req / 10 s है; समग्र API limit 4000 req / 10 s है।
How the Gamma API is used
Gamma API वह canonical सार्वजनिक surface है जो Polymarket markets के डिस्प्ले-उन्मुख डेटा के लिए मिलता है। फ्रंट-एंड, एग्रीगेटर और research tools /markets और /events जैसे endpoints को कॉल करते हैं ताकि market लिस्ट, category पेज और tag फिल्टर्स भरे जा सकें।
Important parameters and behaviors
- limit: पेज साइज नियंत्रित करता है। डिफ़ॉल्ट 20, अधिकतम 1000।
- after_cursor: cursor-based pagination;
offsetHTTP 422 के साथ reject होता है—offsets का प्रयोग न करें। - Filtering: कई query params arrays को स्वीकार करते हैं (उदाहरण के लिए
slug,id,condition_ids,clob_token_ids,question_ids,market_maker_address)। - Flags:
closed(डिफ़ॉल्ट false),active, औरarchivedmarket स्थिति द्वारा फ़िल्टर करते हैं। - Ordering:
orderपैरामीटर comma-separated field list स्वीकार करता है (उदाहरण के लिएvolume24hr,volume,liquidity,endDate), जिसेascending(boolean) के साथ जोड़ा जा सकता है।
Rate limits and practical guidance
/marketsविशिष्ट लिमिट: 300 requests प्रति 10 सेकंड।/markets+/eventsके लिए combined listing लिमिट: 900 requests प्रति 10 सेकंड।- समग्र Gamma API surface: 4000 requests प्रति 10 सेकंड।
यदि आप high-throughput indexing की योजना बना रहे हैं, तो exponential backoff लागू करें और cursor-based pagination पैटर्न का सम्मान करें। जहाँ उपयुक्त हो listings को cache करें; उसी resource को बार-बार aggressive polling करने से बचें।
Example request (curl)
curl "https://gamma-api.polymarket.com/markets?limit=50&order=volume24hr&ascending=false"
In context on Polymarket
Gamma वह public, unauthenticated read API है जिसे आप तब हिट करेंगे जब आपको UI lists, tag pages, या उन integrations के लिए market metadata चाहिए जो on-chain state की मांग नहीं करते (on-chain positions और trades के लिए Data API का उपयोग करें; order-book ऑपरेशन्स के लिए CLOB API)। क्योंकि Gamma read-only और public है, यह market directories और exploratory tools बनाने के लिए सही जगह है।
See also
- /glossary/data-api
- /glossary/clob-api
Closing note
Polymarket Gamma API market metadata के लिए पहला स्टॉप है। दस्तावेज़ीकृत पैरामीटर का उपयोग करें और rejected requests से बचने के लिए rate limits का सम्मान करें।