Get Market By ID
curl --request GET \
--url https://gateway.polymarket.us/v1/market/id/{id}import requests
url = "https://gateway.polymarket.us/v1/market/id/{id}"
response = requests.get(url)
print(response.text)const options = {method: 'GET'};
fetch('https://gateway.polymarket.us/v1/market/id/{id}', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://gateway.polymarket.us/v1/market/id/{id}",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "GET",
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"net/http"
"io"
)
func main() {
url := "https://gateway.polymarket.us/v1/market/id/{id}"
req, _ := http.NewRequest("GET", url, nil)
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.get("https://gateway.polymarket.us/v1/market/id/{id}")
.asString();require 'uri'
require 'net/http'
url = URI("https://gateway.polymarket.us/v1/market/id/{id}")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Get.new(url)
response = http.request(request)
puts response.read_body{
"market": {
"id": "<string>",
"question": "<string>",
"slug": "<string>",
"endDate": "<string>",
"category": "<string>",
"startDate": "<string>",
"image": "<string>",
"description": "<string>",
"active": true,
"marketType": "<string>",
"closed": true,
"createdAt": "<string>",
"updatedAt": "<string>",
"archived": true,
"orderPriceMinTickSize": 123,
"gameStartTime": "<string>",
"manualActivation": true,
"sportsMarketType": "<string>",
"line": 123,
"marketSides": [
{
"id": "<string>",
"identifier": "<string>",
"createdAt": "<string>",
"updatedAt": "<string>",
"description": "<string>",
"price": "<string>",
"marketId": 123,
"long": true,
"teamId": 123,
"team": {
"id": 123,
"name": "<string>",
"abbreviation": "<string>",
"league": "<string>",
"record": "<string>",
"logo": "<string>",
"alias": "<string>",
"safeName": "<string>",
"homeIcon": "<string>",
"awayIcon": "<string>",
"colorPrimary": "<string>",
"providerId": 123,
"ordering": "<string>",
"longIcon": "<string>",
"shortIcon": "<string>",
"displayAbbreviation": "<string>",
"ranking": "<string>",
"conference": "<string>",
"providerIds": [
{
"providerId": "<string>"
}
],
"longIconDark": "<string>",
"shortIconDark": "<string>",
"color": {
"light": "<string>",
"dark": "<string>"
}
},
"quote": {
"value": 123.45,
"currency": "<string>"
},
"tradable": true
}
],
"outcomes": "<string>",
"outcomePrices": "<string>",
"ep3Status": "<string>",
"hidden": true,
"tags": [
{
"id": "<string>",
"label": "<string>",
"slug": "<string>",
"createdAt": "<string>",
"updatedAt": "<string>",
"image": "<string>",
"tradable": true,
"league": {
"id": 123,
"name": "<string>",
"sportId": 123,
"tagId": 123,
"image": "<string>",
"resolution": "<string>",
"ordering": "<string>",
"activeSeriesId": 123,
"isOperational": true,
"automaticResolution": true,
"createdAt": "<string>",
"slug": "<string>",
"abbreviation": "<string>"
},
"sport": {
"id": 123,
"name": "<string>",
"tagId": 123,
"createdAt": "<string>",
"slug": "<string>",
"image": "<string>"
},
"parentId": 123,
"subtags": [
{}
]
}
],
"title": "<string>",
"subtitle": "<string>",
"color": "<string>",
"darkColor": "<string>",
"subjectId": 123,
"subject": {
"id": 123,
"name": "<string>",
"displayName": "<string>",
"description": "<string>",
"subjectType": "<string>",
"image": "<string>",
"color": "<string>",
"darkColor": "<string>",
"createdAt": "<string>",
"updatedAt": "<string>",
"slug": "<string>"
},
"feeCoefficient": 123,
"spreadTotalSuffix": "<string>",
"sortOrder": 123,
"bestBidQuote": {
"value": 123.45,
"currency": "<string>"
},
"bestAskQuote": {
"value": 123.45,
"currency": "<string>"
},
"metadata": {},
"titleShort": "<string>",
"ep3SyncedAt": "<string>",
"minimumTradeQty": 123,
"volume": 123,
"volume24hr": 123,
"volume1wk": 123,
"volume1mo": 123,
"volume1yr": 123,
"rulesDisclaimer": "<string>",
"rulesDisclaimerPopup": true,
"comboEnabled": true
}
}Get Market By ID
Retrieve a specific market by its ID
GET
/
v1
/
market
/
id
/
{id}
Get Market By ID
curl --request GET \
--url https://gateway.polymarket.us/v1/market/id/{id}import requests
url = "https://gateway.polymarket.us/v1/market/id/{id}"
response = requests.get(url)
print(response.text)const options = {method: 'GET'};
fetch('https://gateway.polymarket.us/v1/market/id/{id}', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://gateway.polymarket.us/v1/market/id/{id}",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "GET",
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"net/http"
"io"
)
func main() {
url := "https://gateway.polymarket.us/v1/market/id/{id}"
req, _ := http.NewRequest("GET", url, nil)
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.get("https://gateway.polymarket.us/v1/market/id/{id}")
.asString();require 'uri'
require 'net/http'
url = URI("https://gateway.polymarket.us/v1/market/id/{id}")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Get.new(url)
response = http.request(request)
puts response.read_body{
"market": {
"id": "<string>",
"question": "<string>",
"slug": "<string>",
"endDate": "<string>",
"category": "<string>",
"startDate": "<string>",
"image": "<string>",
"description": "<string>",
"active": true,
"marketType": "<string>",
"closed": true,
"createdAt": "<string>",
"updatedAt": "<string>",
"archived": true,
"orderPriceMinTickSize": 123,
"gameStartTime": "<string>",
"manualActivation": true,
"sportsMarketType": "<string>",
"line": 123,
"marketSides": [
{
"id": "<string>",
"identifier": "<string>",
"createdAt": "<string>",
"updatedAt": "<string>",
"description": "<string>",
"price": "<string>",
"marketId": 123,
"long": true,
"teamId": 123,
"team": {
"id": 123,
"name": "<string>",
"abbreviation": "<string>",
"league": "<string>",
"record": "<string>",
"logo": "<string>",
"alias": "<string>",
"safeName": "<string>",
"homeIcon": "<string>",
"awayIcon": "<string>",
"colorPrimary": "<string>",
"providerId": 123,
"ordering": "<string>",
"longIcon": "<string>",
"shortIcon": "<string>",
"displayAbbreviation": "<string>",
"ranking": "<string>",
"conference": "<string>",
"providerIds": [
{
"providerId": "<string>"
}
],
"longIconDark": "<string>",
"shortIconDark": "<string>",
"color": {
"light": "<string>",
"dark": "<string>"
}
},
"quote": {
"value": 123.45,
"currency": "<string>"
},
"tradable": true
}
],
"outcomes": "<string>",
"outcomePrices": "<string>",
"ep3Status": "<string>",
"hidden": true,
"tags": [
{
"id": "<string>",
"label": "<string>",
"slug": "<string>",
"createdAt": "<string>",
"updatedAt": "<string>",
"image": "<string>",
"tradable": true,
"league": {
"id": 123,
"name": "<string>",
"sportId": 123,
"tagId": 123,
"image": "<string>",
"resolution": "<string>",
"ordering": "<string>",
"activeSeriesId": 123,
"isOperational": true,
"automaticResolution": true,
"createdAt": "<string>",
"slug": "<string>",
"abbreviation": "<string>"
},
"sport": {
"id": 123,
"name": "<string>",
"tagId": 123,
"createdAt": "<string>",
"slug": "<string>",
"image": "<string>"
},
"parentId": 123,
"subtags": [
{}
]
}
],
"title": "<string>",
"subtitle": "<string>",
"color": "<string>",
"darkColor": "<string>",
"subjectId": 123,
"subject": {
"id": 123,
"name": "<string>",
"displayName": "<string>",
"description": "<string>",
"subjectType": "<string>",
"image": "<string>",
"color": "<string>",
"darkColor": "<string>",
"createdAt": "<string>",
"updatedAt": "<string>",
"slug": "<string>"
},
"feeCoefficient": 123,
"spreadTotalSuffix": "<string>",
"sortOrder": 123,
"bestBidQuote": {
"value": 123.45,
"currency": "<string>"
},
"bestAskQuote": {
"value": 123.45,
"currency": "<string>"
},
"metadata": {},
"titleShort": "<string>",
"ep3SyncedAt": "<string>",
"minimumTradeQty": 123,
"volume": 123,
"volume24hr": 123,
"volume1wk": 123,
"volume1mo": 123,
"volume1yr": 123,
"rulesDisclaimer": "<string>",
"rulesDisclaimerPopup": true,
"comboEnabled": true
}
}⌘I