Sand AISand AI MAGI-2MAGI-2 jest teraz na SandBase: wideo 1080p z natywnym dźwiękiemWypróbuj teraz

Polymarket Get market by id

Dokumentacja API
https://api.sandbase.ai/v1/api/polymarket/markets-by-id

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

Cena
$0.00044USD / wywołanie
Metoda
POST
Odpowiedź
JSON
Parametry
1 wymaganych · 1 opcjonalnych
100 darmowych wywołań / dzieńPierwsze 100 wywołań dziennie za darmo (współdzielone w ramach organizacji) · Reset o 00:00 UTC. Później płatność za każde wywołanie.

Playground

Wejście
id
include_tag
WyjścieGotowe

Twój wynik pojawi się tutaj

Uzupełnij dane wejściowe, a następnie kliknij Uruchom.

README API

Polymarket Get market by id API

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.

Use cases

  • Show the current best bid, best ask and last trade price for a single prediction market.
  • Check whether a market is active, closed, archived or accepting orders before you place or display it.
  • Read the conditionId and clobTokenIds of a market to query its order book or trades.
  • Read the fee schedule and rewards settings for a market to estimate trading costs.

Request

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.

Parameters

NameTypeRequiredDescription
idintegerYesid
include_tagbooleanNoinclude_tag

Example response

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

Response fields

FieldMeaning
idThe market id as a string. It matches the id you sent in the request.
conditionIdThe condition id of the market, a 0x-prefixed hex string. The same value appears in clobRewards[].conditionId.
clobTokenIdsA JSON-encoded string that holds a list of token ids for the market outcomes. Parse it before use.
bestBid / bestAsk / lastTradePriceThe highest bid, the lowest ask and the last trade price for the market. Values are decimals such as 0.02.
liquidityLiquidity of the market, returned as a numeric string.
active / closed / archived / acceptingOrdersStatus flags that show whether the market is live, finished, archived or taking orders right now.
endDate / endDateIsoThe scheduled end of the market, as a full UTC timestamp and as a plain date.
descriptionThe resolution rules of the market in plain text.
feeSchedule.rate / feeSchedule.rebateRate / feeSchedule.takerOnlyFee settings for the market. takerOnly shows whether the fee applies only to takers.
clobRewards[].rewardsDailyRateThe daily rewards rate in a rewards entry for this market. Each entry also has startDate and endDate.

Notes

Pricing

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

Odkryj więcej

Powiązane APIs

Wszystkie APIs
APICenaOdpowiedź
Polymarket$0.00044 za wywołanieJSON
Polymarket$0.012 za wywołanieJSON
Polymarket$0.012 za wywołanieJSON
Polymarket$0.012 za wywołanieJSON
Polymarket$0.012 za wywołanieJSON
Polymarket$0.012 za wywołanieJSON

Pytania

FAQ

Jak używać API Polymarket Get market by id?

Wyślij żądanie POST do https://api.sandbase.ai/v1/api/polymarket/markets-by-id z kluczem API SandBase w nagłówku Authorization (Bearer) oraz parametrami w treści JSON. Możesz też wypróbować je w Playground na tej stronie bez pisania kodu.

Ile kosztuje API Polymarket Get market by id?

$0.00044 za wywołanie. Każda organizacja otrzymuje 100 bezpłatnych wywołań na dzień UTC, współdzielonych między kwalifikującymi się API SandBase, w tym to; potem każde wywołanie jest rozliczane według tej stawki z salda SandBase. Nie ma subskrypcji.

Jakie parametry przyjmuje API Polymarket Get market by id?

Wymagane: id (integer). Opcjonalne: include_tag (boolean). Tabela Parameters oraz Playground na tej stronie zawierają wszystkie pola.

Co zwraca API Polymarket Get market by id?

Odpowiedź JSON zwrócona w tym samym żądaniu HTTP (synchronicznie). README na tej stronie zawiera przykładową odpowiedź.

Czy potrzebuję konta deweloperskiego Polymarket lub klucza API?

Nie. Polymarket Get market by id działa przez SandBase, więc jeden klucz API SandBase obejmuje ten endpoint i każde inne API oraz model w katalogu. Nie musisz osobno ubiegać się o dostęp do API Polymarket.