Sand AISand AI MAGI-2MAGI-2 agora está na SandBase: vídeo em 1080p com áudio nativoExperimente agora

Polymarket Get market by token

Docs da API
https://api.sandbase.ai/v1/api/polymarket/markets-by-token

Get market by token from Polymarket. Returns the official Polymarket API response unchanged.

Preço
$0.00044USD / chamada
Método
POST
Resposta
JSON
Parâmetros
1 obrigatórios · 0 opcionais

Playground

Entrada
The token ID to look up the parent market for
SaídaPronto

Sua saída aparecerá aqui

Preencha as entradas e clique em Executar.

README da API

Polymarket Get market by token API

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.

Use cases

  • Map a token ID seen in a trade or order book to its market condition_id.
  • Find the opposite outcome token for a token you already hold.
  • Collect the condition_id needed to call market-level APIs from a list of token IDs.

Request

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.

Parameters

NameTypeRequiredDescription
token_idstringYesThe token ID to look up the parent market for

Example response

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…"
}

Response fields

FieldMeaning
condition_idIdentifier of the parent market. It is a hex string starting with 0x.
primary_token_idToken ID of the market's first outcome token.
secondary_token_idToken ID of the market's second outcome token. In the example it matches the requested token_id.

Notes

  • The request needs only token_id. Token IDs are long numeric strings, so send them as strings.
  • The response gives the two token IDs for the market. Whichever one you send, the other is also returned.
  • Use the condition_id with Polymarket Get CLOB market info to get more detail on the market.
  • Pass a token ID to Polymarket Get order book to see current bids and asks for that outcome.

Pricing

$0.00044 per successful call. Failed calls are not charged. It is included in the daily free quota of each organization.

Explorar mais

APIs relacionadas

Todas as APIs
APIPreçoResposta
Polymarket$0.00044 por chamadaJSON
Polymarket$0.012 por chamadaJSON
Polymarket$0.012 por chamadaJSON
Polymarket$0.012 por chamadaJSON
Polymarket$0.012 por chamadaJSON
Polymarket$0.012 por chamadaJSON

Perguntas

FAQ

Como eu uso a API Polymarket Get market by token?

Envie uma solicitação POST para https://api.sandbase.ai/v1/api/polymarket/markets-by-token com sua chave de API da SandBase no cabeçalho Authorization (Bearer) e os parâmetros no corpo JSON. Você também pode testar no Playground desta página sem escrever código.

Quanto custa a API Polymarket Get market by token?

$0.00044 por chamada, cobrado do seu saldo SandBase. Você paga apenas pelas chamadas que fizer; não há assinatura.

Quais parâmetros a API Polymarket Get market by token aceita?

Obrigatórios: token_id (string). A tabela de Parâmetros e o Playground nesta página listam todos os campos.

O que a API Polymarket Get market by token retorna?

Uma resposta JSON retornada na mesma solicitação HTTP (síncrona). O README desta página inclui um exemplo de resposta.

Preciso de uma conta de desenvolvedor Polymarket ou de uma chave de API?

Não. Polymarket Get market by token funciona via SandBase, então uma única chave de API da SandBase cobre este endpoint e todas as outras APIs e modelos do catálogo. Você não precisa solicitar acesso à API do Polymarket separadamente.