token_idstringआवश्यक
Token ID (asset ID)
https://api.sandbase.ai/v1/api/polymarket/spreadRetrieves the spread for a specific token ID. The spread is the difference between the best ask and best bid prices.
आपका आउटपुट यहाँ दिखाई देगा
इनपुट पूरा करें, फिर Run पर क्लिक करें।
Returns the current spread for one Polymarket outcome token. The spread is the gap between the best ask price and the best bid price. You send one token_id.
curl -X POST "https://api.sandbase.ai/v1/api/polymarket/spread" \
-H "Authorization: Bearer $SANDBASE_API_KEY" \
-H "Content-Type: application/json" \
-d '{"token_id": "32338220190071351435772801779725302244575775216413325951443816017994629993401"}'
The result is returned in outputs[0].data.
| Name | Type | Required | Description |
|---|---|---|---|
token_id | string | Yes | Token ID (asset ID) |
Real response for the request above, trimmed: lists keep their first item and long strings are cut.
{
"spread": "0.001"
}
| Field | Meaning |
|---|---|
spread | The difference between the best ask price and the best bid price for the token. |
spread | Returned as a decimal string. In the sample, 0.001 means the best ask and best bid are 0.001 apart. |
spread | A smaller value means the best bid and best ask sit closer together. A larger value means they sit further apart. |
token_id is the long numeric asset ID of one outcome. Get it from Polymarket Get market by slug or Polymarket List markets.spread value is a string. Convert it to a number before you compare or calculate with it.$0.012 per successful call. Failed calls are not charged. It is included in the daily free quota of each organization.
बिल्डिंग शुरू करें
एकीकृत authentication और usage tracking के साथ Platform API endpoint.
curl -X POST "https://api.sandbase.ai/v1/api/polymarket/spread" \
-H "Authorization: Bearer $SANDBASE_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"token_id": "0xabc123def456..."
}'अपने SandBase API key को अपने सर्वर environment में सेट करें। Requests Bearer authentication का उपयोग करती हैं।
export SANDBASE_API_KEY="YOUR_API_KEY"अपना key सर्वर पर रखें। इसे browser code में expose न करें।
token_idstringआवश्यकToken ID (asset ID)
इस API के लिए सेव किया गया example response; इसे देखते समय कोई live request नहीं की जाती।
कोई सेव response प्रकाशित नहीं किया गया है। इसका response देखने के लिए Playground में API चलाएँ।
और जानें
| API | कीमत | प्रतिक्रिया |
|---|---|---|
Polymarket Get spreadयह API Polymarket | $0.012 प्रति कॉल | JSON |
Polymarket | $0.012 प्रति कॉल | JSON |
Polymarket | $0.012 प्रति कॉल | JSON |
Polymarket | $0.012 प्रति कॉल | JSON |
Polymarket | $0.012 प्रति कॉल | JSON |
Polymarket | $0.012 प्रति कॉल | JSON |
प्रश्न
https://api.sandbase.ai/v1/api/polymarket/spread पर Authorization header (Bearer) में अपनी SandBase API key और parameters को JSON body के रूप में भेजें। आप इस पेज के Playground में बिना code लिखे भी इसे आज़मा सकते हैं।
$0.012 प्रति call, आपकी SandBase balance से बिल किया जाएगा। आपसे केवल आपके किए गए calls के लिए शुल्क लिया जाता है; कोई subscription नहीं है।
आवश्यक: token_id (string)। Parameters table और इस पेज का Playground हर field सूचीबद्ध करते हैं।
एक JSON response जो उसी HTTP request में लौटाया जाता है (synchronous)। इस पेज का README एक sample response शामिल करता है।
नहीं। Polymarket Get spread SandBase के माध्यम से चलता है, इसलिए एक SandBase API key इस endpoint और catalog के हर अन्य API और model को कवर करती है। आपको अलग से Polymarket API access के लिए आवेदन करने की आवश्यकता नहीं है।