Polymarket Endpoints
Candlesticks
Fetches historical candlestick data for a market identified by condition_id, over a specified interval.
GET
/
polymarket
/
candlesticks
/
{condition_id}
Get Candlesticks
curl --request GET \
--url https://api.domeapi.io/v1/polymarket/candlesticks/{condition_id}import requests
url = "https://api.domeapi.io/v1/polymarket/candlesticks/{condition_id}"
response = requests.get(url)
print(response.text)const options = {method: 'GET'};
fetch('https://api.domeapi.io/v1/polymarket/candlesticks/{condition_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://api.domeapi.io/v1/polymarket/candlesticks/{condition_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://api.domeapi.io/v1/polymarket/candlesticks/{condition_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://api.domeapi.io/v1/polymarket/candlesticks/{condition_id}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.domeapi.io/v1/polymarket/candlesticks/{condition_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{
"candlesticks": [
[
[
{
"end_period_ts": 1727827200,
"open_interest": 8456498,
"price": {
"open": 0,
"high": 0,
"low": 0,
"close": 0,
"open_dollars": "0.0049",
"high_dollars": "0.0049",
"low_dollars": "0.0048",
"close_dollars": "0.0048",
"mean": 0,
"mean_dollars": "0.0049",
"previous": 0,
"previous_dollars": "0.0049"
},
"volume": 8456498,
"yes_ask": {
"open": 0.00489,
"close": 0.0048200000000000005,
"high": 0.00491,
"low": 0.0048,
"open_dollars": "0.0049",
"close_dollars": "0.0048",
"high_dollars": "0.0049",
"low_dollars": "0.0048"
},
"yes_bid": {
"open": 0.00489,
"close": 0.004829999990880811,
"high": 0.004910000000138527,
"low": 0.0048,
"open_dollars": "0.0049",
"close_dollars": "0.0048",
"high_dollars": "0.0049",
"low_dollars": "0.0048"
}
}
],
{
"token_id": "21742633143463906290569050155826241533067272736897614950488156847949938836455",
"side": "Yes"
}
]
]
}{
"error": "Missing required query parameters",
"required": "start_time, end_time"
}Path Parameters
Query Parameters
Unix timestamp (in seconds) for start of time range
Example:
1640995200
Unix timestamp (in seconds) for end of time range
Example:
1672531200
Interval length: 1 = 1m, 60 = 1h, 1440 = 1d. Defaults to 1m.
⚠️ Note: There are range limits for interval — specifically:
1(1m): max range 1 week60(1h): max range 1 month1440(1d): max range 1 year
Available options:
1, 60, 1440 Response
Candlestick response
Array of market candlestick data, where each element is a tuple containing candlestick data array and token metadata
Tuple of [candlestick_data_array, token_metadata]
Required array length:
2 elements- object[]
- object
Example:
[
[
{
"end_period_ts": 1727827200,
"open_interest": 8456498,
"price": {
"open": 0,
"high": 0,
"low": 0,
"close": 0,
"open_dollars": "0.0049",
"high_dollars": "0.0049",
"low_dollars": "0.0048",
"close_dollars": "0.0048",
"mean": 0,
"mean_dollars": "0.0049",
"previous": 0,
"previous_dollars": "0.0049"
},
"volume": 8456498,
"yes_ask": {
"open": 0.00489,
"close": 0.0048200000000000005,
"high": 0.00491,
"low": 0.0048,
"open_dollars": "0.0049",
"close_dollars": "0.0048",
"high_dollars": "0.0049",
"low_dollars": "0.0048"
},
"yes_bid": {
"open": 0.00489,
"close": 0.004829999990880811,
"high": 0.004910000000138527,
"low": 0.0048,
"open_dollars": "0.0049",
"close_dollars": "0.0048",
"high_dollars": "0.0049",
"low_dollars": "0.0048"
}
}
],
{
"token_id": "21742633143463906290569050155826241533067272736897614950488156847949938836455",
"side": "Yes"
}
]
Previous
Get positionsFetches all Polymarket positions for a proxy wallet address. Returns positions with balance >= 10,000 shares (0.01 normalized) with market info.
Next
⌘I
Get Candlesticks
curl --request GET \
--url https://api.domeapi.io/v1/polymarket/candlesticks/{condition_id}import requests
url = "https://api.domeapi.io/v1/polymarket/candlesticks/{condition_id}"
response = requests.get(url)
print(response.text)const options = {method: 'GET'};
fetch('https://api.domeapi.io/v1/polymarket/candlesticks/{condition_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://api.domeapi.io/v1/polymarket/candlesticks/{condition_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://api.domeapi.io/v1/polymarket/candlesticks/{condition_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://api.domeapi.io/v1/polymarket/candlesticks/{condition_id}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.domeapi.io/v1/polymarket/candlesticks/{condition_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{
"candlesticks": [
[
[
{
"end_period_ts": 1727827200,
"open_interest": 8456498,
"price": {
"open": 0,
"high": 0,
"low": 0,
"close": 0,
"open_dollars": "0.0049",
"high_dollars": "0.0049",
"low_dollars": "0.0048",
"close_dollars": "0.0048",
"mean": 0,
"mean_dollars": "0.0049",
"previous": 0,
"previous_dollars": "0.0049"
},
"volume": 8456498,
"yes_ask": {
"open": 0.00489,
"close": 0.0048200000000000005,
"high": 0.00491,
"low": 0.0048,
"open_dollars": "0.0049",
"close_dollars": "0.0048",
"high_dollars": "0.0049",
"low_dollars": "0.0048"
},
"yes_bid": {
"open": 0.00489,
"close": 0.004829999990880811,
"high": 0.004910000000138527,
"low": 0.0048,
"open_dollars": "0.0049",
"close_dollars": "0.0048",
"high_dollars": "0.0049",
"low_dollars": "0.0048"
}
}
],
{
"token_id": "21742633143463906290569050155826241533067272736897614950488156847949938836455",
"side": "Yes"
}
]
]
}{
"error": "Missing required query parameters",
"required": "start_time, end_time"
}