idintegerobrigatório
id
https://api.sandbase.ai/v1/api/polymarket/markets-by-idGet market by id from Polymarket. Returns the official Polymarket API response unchanged.
Sua saída aparecerá aqui
Preencha as entradas e clique em Executar.
Returns the full record for one Polymarket market, including its prices, order book settings, fees, dates and status flags. It needs the numeric market id. You can set include_tag to ask for tag data as well.
conditionId and clobTokenIds of a market to query its order book or trades.curl -X POST "https://api.sandbase.ai/v1/api/polymarket/markets-by-id" \
-H "Authorization: Bearer $SANDBASE_API_KEY" \
-H "Content-Type: application/json" \
-d '{"id": 559651}'
The result is returned in outputs[0].data.
| Name | Type | Required | Description |
|---|---|---|---|
id | integer | Yes | id |
include_tag | boolean | No | include_tag |
Real response for the request above, trimmed: lists keep their first item and long strings are cut.
{
"$schema": "https://gamma-api.polymarket.com/schemas/Market.json",
"acceptingOrders": true,
"acceptingOrdersTimestamp": "2025-07-03T20:36:33Z",
"active": true,
"approved": true,
"archived": false,
"automaticallyActive": true,
"bestAsk": 0.021,
"bestBid": 0.02,
"clearBookOnStart": true,
"clobRewards": [
{
"assetAddress": "0x2791Bca1f2de4661ED88A30C99A7a9449Aa84174",
"conditionId": "0xa467b14d51f01b957109d9cbb1d6c124fab2a089d52ed8f471d23c2812e743b7",
"endDate": "2500-12-31",
"id": "303430",
"rewardsAmount": 0,
"rewardsDailyRate": 5,
"startDate": "2026-09-16"
}
],
"clobTokenIds": "[\"323382…"
}
| Field | Meaning |
|---|---|
id | The market id as a string. It matches the id you sent in the request. |
conditionId | The condition id of the market, a 0x-prefixed hex string. The same value appears in clobRewards[].conditionId. |
clobTokenIds | A JSON-encoded string that holds a list of token ids for the market outcomes. Parse it before use. |
bestBid / bestAsk / lastTradePrice | The highest bid, the lowest ask and the last trade price for the market. Values are decimals such as 0.02. |
liquidity | Liquidity of the market, returned as a numeric string. |
active / closed / archived / acceptingOrders | Status flags that show whether the market is live, finished, archived or taking orders right now. |
endDate / endDateIso | The scheduled end of the market, as a full UTC timestamp and as a plain date. |
description | The resolution rules of the market in plain text. |
feeSchedule.rate / feeSchedule.rebateRate / feeSchedule.takerOnly | Fee settings for the market. takerOnly shows whether the fee applies only to takers. |
clobRewards[].rewardsDailyRate | The daily rewards rate in a rewards entry for this market. Each entry also has startDate and endDate. |
createdAt use ISO 8601 UTC format. endDateIso is a date only.clobTokenIds to Polymarket Get order book to see the live order book.$0.00044 per successful call. Failed calls are not charged. It is included in the daily free quota of each organization.
Comece a construir
Endpoint da API da plataforma com autenticação unificada e rastreamento de uso.
curl -X POST "https://api.sandbase.ai/v1/api/polymarket/markets-by-id" \
-H "Authorization: Bearer $SANDBASE_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"id": 559651
}'Defina sua chave da API SandBase no ambiente do seu servidor. As requisições usam autenticação Bearer.
export SANDBASE_API_KEY="YOUR_API_KEY"Mantenha sua chave no servidor. Não a exponha em código do navegador.
idintegerobrigatórioid
include_tagbooleaninclude_tag
Resposta de exemplo salva para esta API; nenhuma requisição ao vivo é feita ao visualizá-la.
Nenhuma resposta salva foi publicada. Execute a API no Playground para inspecionar a resposta.
Explorar mais
| API | Preço | Resposta |
|---|---|---|
Polymarket Get market by idEsta API Polymarket | $0.00044 por chamada | JSON |
Polymarket | $0.012 por chamada | JSON |
Polymarket | $0.012 por chamada | JSON |
Polymarket | $0.012 por chamada | JSON |
Polymarket | $0.012 por chamada | JSON |
Polymarket | $0.012 por chamada | JSON |
Perguntas
Envie uma solicitação POST para https://api.sandbase.ai/v1/api/polymarket/markets-by-id 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.
$0.00044 por chamada. Cada organização recebe 100 chamadas grátis por dia UTC, compartilhadas entre as APIs elegíveis da SandBase, incluindo esta; depois disso, cada chamada é cobrada nesse valor do seu saldo SandBase. Não há assinatura.
Obrigatórios: id (integer). Opcionais: include_tag (boolean). A tabela de Parâmetros e o Playground nesta página listam todos os campos.
Uma resposta JSON retornada na mesma solicitação HTTP (síncrona). O README desta página inclui um exemplo de resposta.
Não. Polymarket Get market by id 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.