token_idstringzorunlu
The token ID to look up the parent market for
https://api.sandbase.ai/v1/api/polymarket/markets-by-tokenGet market by token from Polymarket. Returns the official Polymarket API response unchanged.
Çıktınız burada görünecek
Girdileri tamamlayın, ardından Çalıştır'a tıklayın.
Returns the parent market identifiers for a Polymarket outcome token. You send one token_id and get back the market's condition_id and the token IDs of both outcomes.
condition_id.condition_id needed to call market-level APIs from a list of token IDs.curl -X POST "https://api.sandbase.ai/v1/api/polymarket/markets-by-token" \
-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 | The token ID to look up the parent market for |
Real response for the request above, trimmed: lists keep their first item and long strings are cut.
{
"condition_id": "0xa467b14d51f01b957109d9cbb1d6c124fab2a089d52ed8f471d23c2812e743b7",
"primary_token_id": "25659310…",
"secondary_token_id": "32338220…"
}
| Field | Meaning |
|---|---|
condition_id | Identifier of the parent market. It is a hex string starting with 0x. |
primary_token_id | Token ID of the market's first outcome token. |
secondary_token_id | Token ID of the market's second outcome token. In the example it matches the requested token_id. |
token_id. Token IDs are long numeric strings, so send them as strings.condition_id with Polymarket Get CLOB market info to get more detail on the market.$0.00044 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/markets-by-token" \
-H "Authorization: Bearer $SANDBASE_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"token_id": "32338220190071351435772801779725302244575775216413325951443816017994629993401"
}'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_idstringzorunluThe token ID to look up the parent market for
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 | $0.00044 ç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/markets-by-token adresine bir POST isteği gönderin. Ayrıca bu sayfadaki Playground’da kod yazmadan da deneyebilirsiniz.
çağrı başına $0.00044, 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 market by token, 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.