token_idstringerforderlich
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.
Ihre Ausgabe wird hier angezeigt
Vervollständigen Sie die Eingaben und klicken Sie dann auf Ausführen.
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.
Jetzt loslegen
Plattform-API-Endpunkt mit einheitlicher Authentifizierung und Nutzungsnachverfolgung.
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"
}'Legen Sie Ihren SandBase API-Schlüssel in Ihrer Serverumgebung fest. Anfragen verwenden Bearer-Authentifizierung.
export SANDBASE_API_KEY="YOUR_API_KEY"Bewahren Sie Ihren Schlüssel auf dem Server auf. Geben Sie ihn nicht in Browser-Code preis.
token_idstringerforderlichThe token ID to look up the parent market for
Gespeicherte Beispielantwort für diese API; beim Anzeigen wird keine Live-Anfrage gesendet.
Es wurde keine gespeicherte Antwort veröffentlicht. Führen Sie die API in Playground aus, um die Antwort zu prüfen.
Mehr entdecken
| API | Preis | Antwort |
|---|---|---|
Polymarket Get market by tokenDiese API Polymarket | $0.00044 pro Aufruf | JSON |
Polymarket | $0.012 pro Aufruf | JSON |
Polymarket | $0.012 pro Aufruf | JSON |
Polymarket | $0.012 pro Aufruf | JSON |
Polymarket | $0.012 pro Aufruf | JSON |
Polymarket | $0.012 pro Aufruf | JSON |
Fragen
Senden Sie eine POST-Anfrage an https://api.sandbase.ai/v1/api/polymarket/markets-by-token mit Ihrem SandBase API-Schlüssel im Authorization-Header (Bearer) und den Parametern als JSON-Body. Sie können das auch ohne Code direkt auf dieser Seite im Playground testen.
$0.00044 pro Aufruf, abgerechnet von Ihrem SandBase-Guthaben. Es werden nur die von Ihnen getätigten Aufrufe berechnet; es gibt kein Abo.
Erforderlich: token_id (string). Die Parametertabelle und der Playground auf dieser Seite listen jedes Feld auf.
Eine JSON-Antwort, die in derselben HTTP-Anfrage zurückgegeben wird (synchron). Die README auf dieser Seite enthält eine Beispielantwort.
Nein. Polymarket Get market by token läuft über SandBase, daher deckt ein SandBase API-Schlüssel diesen Endpunkt und jede andere API sowie jedes Modell im Katalog ab. Sie müssen keinen separaten Zugang für Polymarket API beantragen.