token_idstringzorunlu
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.
Çıktınız burada görünecek
Girdileri tamamlayın, ardından Çalıştır'a tıklayın.
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.
Geliştirmeye başlayın
Birleşik kimlik doğrulama ve kullanım takibi sunan Platform API uç noktası.
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 anahtarınızı sunucu ortamınıza ayarlayın. İstekler Bearer kimlik doğrulaması kullanır.
export SANDBASE_API_KEY="YOUR_API_KEY"Anahtarınızı sunucuda tutun. Tarayıcı kodunda açığa çıkarmayın.
token_idstringzorunluToken ID (asset ID)
Bu API için kaydedilmiş örnek yanıt; görüntülerken canlı istek yapılmaz.
Yayınlanmış bir kaydedilmiş yanıt yok. Yanıtını incelemek için API'yi Playground'da çalıştırın.
Daha fazlasını keşfedin
| API | Fiyat | Yanıt |
|---|---|---|
Polymarket Get spreadBu API Polymarket | $0.012 çağrı başına | JSON |
Polymarket | $0.012 çağrı başına | JSON |
Polymarket | $0.012 çağrı başına | JSON |
Polymarket | $0.012 çağrı başına | JSON |
Polymarket | $0.012 çağrı başına | JSON |
Polymarket | $0.012 çağrı başına | JSON |
Sorular
SandBase API anahtarınızı Authorization başlığında (Bearer) ve parametreleri JSON gövdesi olarak ile https://api.sandbase.ai/v1/api/polymarket/spread adresine bir POST isteği gönderin. Ayrıca bu sayfadaki Playground’da kod yazmadan da deneyebilirsiniz.
çağrı başına $0.012, SandBase bakiyenizden tahsil edilir. Yalnızca yaptığınız çağrılar için ücretlendirilirsiniz; abonelik yoktur.
Gerekli: token_id (string). Parametreler tablosu ve bu sayfadaki Playground, tüm alanları listeler.
Aynı HTTP isteğinde döndürülen bir JSON yanıtı (senkron). Bu sayfadaki README'de örnek bir yanıt yer alır.
Hayır. Polymarket Get spread, SandBase üzerinden çalışır; bu nedenle tek bir SandBase API anahtarı bu uç noktayı ve katalogdaki diğer tüm API'leri ve modelleri kapsar. Polymarket API erişimi için ayrıca başvuru yapmanız gerekmez.