curl -sS \
-H 'Authorization: Bearer $OXI_SK' \
'https://api.0xinsider.com/api/v1/market/{condition_id}/candles?resolution=1d'import requests
url = "https://api.0xinsider.com/api/v1/market/{condition_id}/candles"
headers = {"Authorization": "Bearer <token>"}
response = requests.get(url, headers=headers)
print(response.text)const options = {method: 'GET', headers: {Authorization: 'Bearer <token>'}};
fetch('https://api.0xinsider.com/api/v1/market/{condition_id}/candles', 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.0xinsider.com/api/v1/market/{condition_id}/candles",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "GET",
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>"
],
]);
$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.0xinsider.com/api/v1/market/{condition_id}/candles"
req, _ := http.NewRequest("GET", url, nil)
req.Header.Add("Authorization", "Bearer <token>")
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.0xinsider.com/api/v1/market/{condition_id}/candles")
.header("Authorization", "Bearer <token>")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.0xinsider.com/api/v1/market/{condition_id}/candles")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Get.new(url)
request["Authorization"] = 'Bearer <token>'
response = http.request(request)
puts response.read_body{
"object": "market_candles",
"data": {
"condition_id": "0xcond",
"resolution": "1d",
"outcomes": [
{
"token_id": "111111",
"outcome": "YES",
"candles": [
{
"t": 1700000000,
"o": 0.42,
"h": 0.45,
"l": 0.41,
"c": 0.44
}
]
}
]
},
"meta": {
"request_id": "req_example",
"cached": false,
"cost": 2
}
}{
"object": "error",
"error": {
"code": "bad_request",
"message": "<string>",
"doc_url": "<string>",
"param": "<string>",
"retry_at": "2023-11-07T05:31:56Z",
"reason": "cursor_expired"
},
"meta": {
"request_id": "<string>",
"cached": true,
"cost": 123,
"cache_age_s": 123,
"ranking_generation": 123,
"ranking_as_of": "2023-11-07T05:31:56Z",
"directional_source": "live",
"ranking_source": "live",
"category_skill_source": "live",
"category_skill_model_version": "<string>",
"category_skill_taxonomy_version": "<string>",
"category_skill_platform": "polymarket",
"category_skill_scope": "observed_goldsky_primary_taker_fill",
"category_skill_source_coverage": "partial_whale_threshold_fills",
"category_skill_observation_started_at": "2023-11-07T05:31:56Z",
"category_skill_model_operationally_degraded": true,
"category_skill_status_counts": {
"live": 1,
"insufficient": 1,
"stale": 1,
"unknown": 1,
"degraded": 1
},
"category_skill_base_payload_hash": "<string>",
"category_skill_enriched_base_payload_hash": "<string>"
}
}{
"object": "error",
"error": {
"code": "bad_request",
"message": "<string>",
"doc_url": "<string>",
"param": "<string>",
"retry_at": "2023-11-07T05:31:56Z",
"reason": "cursor_expired"
},
"meta": {
"request_id": "<string>",
"cached": true,
"cost": 123,
"cache_age_s": 123,
"ranking_generation": 123,
"ranking_as_of": "2023-11-07T05:31:56Z",
"directional_source": "live",
"ranking_source": "live",
"category_skill_source": "live",
"category_skill_model_version": "<string>",
"category_skill_taxonomy_version": "<string>",
"category_skill_platform": "polymarket",
"category_skill_scope": "observed_goldsky_primary_taker_fill",
"category_skill_source_coverage": "partial_whale_threshold_fills",
"category_skill_observation_started_at": "2023-11-07T05:31:56Z",
"category_skill_model_operationally_degraded": true,
"category_skill_status_counts": {
"live": 1,
"insufficient": 1,
"stale": 1,
"unknown": 1,
"degraded": 1
},
"category_skill_base_payload_hash": "<string>",
"category_skill_enriched_base_payload_hash": "<string>"
}
}{
"object": "error",
"error": {
"code": "bad_request",
"message": "<string>",
"doc_url": "<string>",
"param": "<string>",
"retry_at": "2023-11-07T05:31:56Z",
"reason": "cursor_expired"
},
"meta": {
"request_id": "<string>",
"cached": true,
"cost": 123,
"cache_age_s": 123,
"ranking_generation": 123,
"ranking_as_of": "2023-11-07T05:31:56Z",
"directional_source": "live",
"ranking_source": "live",
"category_skill_source": "live",
"category_skill_model_version": "<string>",
"category_skill_taxonomy_version": "<string>",
"category_skill_platform": "polymarket",
"category_skill_scope": "observed_goldsky_primary_taker_fill",
"category_skill_source_coverage": "partial_whale_threshold_fills",
"category_skill_observation_started_at": "2023-11-07T05:31:56Z",
"category_skill_model_operationally_degraded": true,
"category_skill_status_counts": {
"live": 1,
"insufficient": 1,
"stale": 1,
"unknown": 1,
"degraded": 1
},
"category_skill_base_payload_hash": "<string>",
"category_skill_enriched_base_payload_hash": "<string>"
}
}{
"object": "error",
"error": {
"code": "bad_request",
"message": "<string>",
"doc_url": "<string>",
"param": "<string>",
"retry_at": "2023-11-07T05:31:56Z",
"reason": "cursor_expired"
},
"meta": {
"request_id": "<string>",
"cached": true,
"cost": 123,
"cache_age_s": 123,
"ranking_generation": 123,
"ranking_as_of": "2023-11-07T05:31:56Z",
"directional_source": "live",
"ranking_source": "live",
"category_skill_source": "live",
"category_skill_model_version": "<string>",
"category_skill_taxonomy_version": "<string>",
"category_skill_platform": "polymarket",
"category_skill_scope": "observed_goldsky_primary_taker_fill",
"category_skill_source_coverage": "partial_whale_threshold_fills",
"category_skill_observation_started_at": "2023-11-07T05:31:56Z",
"category_skill_model_operationally_degraded": true,
"category_skill_status_counts": {
"live": 1,
"insufficient": 1,
"stale": 1,
"unknown": 1,
"degraded": 1
},
"category_skill_base_payload_hash": "<string>",
"category_skill_enriched_base_payload_hash": "<string>"
}
}{
"object": "error",
"error": {
"code": "bad_request",
"message": "<string>",
"doc_url": "<string>",
"param": "<string>",
"retry_at": "2023-11-07T05:31:56Z",
"reason": "cursor_expired"
},
"meta": {
"request_id": "<string>",
"cached": true,
"cost": 123,
"cache_age_s": 123,
"ranking_generation": 123,
"ranking_as_of": "2023-11-07T05:31:56Z",
"directional_source": "live",
"ranking_source": "live",
"category_skill_source": "live",
"category_skill_model_version": "<string>",
"category_skill_taxonomy_version": "<string>",
"category_skill_platform": "polymarket",
"category_skill_scope": "observed_goldsky_primary_taker_fill",
"category_skill_source_coverage": "partial_whale_threshold_fills",
"category_skill_observation_started_at": "2023-11-07T05:31:56Z",
"category_skill_model_operationally_degraded": true,
"category_skill_status_counts": {
"live": 1,
"insufficient": 1,
"stale": 1,
"unknown": 1,
"degraded": 1
},
"category_skill_base_payload_hash": "<string>",
"category_skill_enriched_base_payload_hash": "<string>"
}
}{
"object": "error",
"error": {
"code": "bad_request",
"message": "<string>",
"doc_url": "<string>",
"param": "<string>",
"retry_at": "2023-11-07T05:31:56Z",
"reason": "cursor_expired"
},
"meta": {
"request_id": "<string>",
"cached": true,
"cost": 123,
"cache_age_s": 123,
"ranking_generation": 123,
"ranking_as_of": "2023-11-07T05:31:56Z",
"directional_source": "live",
"ranking_source": "live",
"category_skill_source": "live",
"category_skill_model_version": "<string>",
"category_skill_taxonomy_version": "<string>",
"category_skill_platform": "polymarket",
"category_skill_scope": "observed_goldsky_primary_taker_fill",
"category_skill_source_coverage": "partial_whale_threshold_fills",
"category_skill_observation_started_at": "2023-11-07T05:31:56Z",
"category_skill_model_operationally_degraded": true,
"category_skill_status_counts": {
"live": 1,
"insufficient": 1,
"stale": 1,
"unknown": 1,
"degraded": 1
},
"category_skill_base_payload_hash": "<string>",
"category_skill_enriched_base_payload_hash": "<string>"
}
}{
"object": "error",
"error": {
"code": "bad_request",
"message": "<string>",
"doc_url": "<string>",
"param": "<string>",
"retry_at": "2023-11-07T05:31:56Z",
"reason": "cursor_expired"
},
"meta": {
"request_id": "<string>",
"cached": true,
"cost": 123,
"cache_age_s": 123,
"ranking_generation": 123,
"ranking_as_of": "2023-11-07T05:31:56Z",
"directional_source": "live",
"ranking_source": "live",
"category_skill_source": "live",
"category_skill_model_version": "<string>",
"category_skill_taxonomy_version": "<string>",
"category_skill_platform": "polymarket",
"category_skill_scope": "observed_goldsky_primary_taker_fill",
"category_skill_source_coverage": "partial_whale_threshold_fills",
"category_skill_observation_started_at": "2023-11-07T05:31:56Z",
"category_skill_model_operationally_degraded": true,
"category_skill_status_counts": {
"live": 1,
"insufficient": 1,
"stale": 1,
"unknown": 1,
"degraded": 1
},
"category_skill_base_payload_hash": "<string>",
"category_skill_enriched_base_payload_hash": "<string>"
}
}{
"object": "error",
"error": {
"code": "bad_request",
"message": "<string>",
"doc_url": "<string>",
"param": "<string>",
"retry_at": "2023-11-07T05:31:56Z",
"reason": "cursor_expired"
},
"meta": {
"request_id": "<string>",
"cached": true,
"cost": 123,
"cache_age_s": 123,
"ranking_generation": 123,
"ranking_as_of": "2023-11-07T05:31:56Z",
"directional_source": "live",
"ranking_source": "live",
"category_skill_source": "live",
"category_skill_model_version": "<string>",
"category_skill_taxonomy_version": "<string>",
"category_skill_platform": "polymarket",
"category_skill_scope": "observed_goldsky_primary_taker_fill",
"category_skill_source_coverage": "partial_whale_threshold_fills",
"category_skill_observation_started_at": "2023-11-07T05:31:56Z",
"category_skill_model_operationally_degraded": true,
"category_skill_status_counts": {
"live": 1,
"insufficient": 1,
"stale": 1,
"unknown": 1,
"degraded": 1
},
"category_skill_base_payload_hash": "<string>",
"category_skill_enriched_base_payload_hash": "<string>"
}
}Get Market Candles
Provider-first bucketed OHLC price candles for a market’s outcome tokens, derived from the stored token_price_snapshots series (the same series the market-detail chart renders; covers open and resolved markets). Because the stored data is daily, a 1d bucket typically carries one point so its open/high/low/close all equal that day’s close; 1w aggregates real OHLC across the observed daily closes. No intraday fidelity is fabricated.
curl -sS \
-H 'Authorization: Bearer $OXI_SK' \
'https://api.0xinsider.com/api/v1/market/{condition_id}/candles?resolution=1d'import requests
url = "https://api.0xinsider.com/api/v1/market/{condition_id}/candles"
headers = {"Authorization": "Bearer <token>"}
response = requests.get(url, headers=headers)
print(response.text)const options = {method: 'GET', headers: {Authorization: 'Bearer <token>'}};
fetch('https://api.0xinsider.com/api/v1/market/{condition_id}/candles', 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.0xinsider.com/api/v1/market/{condition_id}/candles",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "GET",
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>"
],
]);
$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.0xinsider.com/api/v1/market/{condition_id}/candles"
req, _ := http.NewRequest("GET", url, nil)
req.Header.Add("Authorization", "Bearer <token>")
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.0xinsider.com/api/v1/market/{condition_id}/candles")
.header("Authorization", "Bearer <token>")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.0xinsider.com/api/v1/market/{condition_id}/candles")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Get.new(url)
request["Authorization"] = 'Bearer <token>'
response = http.request(request)
puts response.read_body{
"object": "market_candles",
"data": {
"condition_id": "0xcond",
"resolution": "1d",
"outcomes": [
{
"token_id": "111111",
"outcome": "YES",
"candles": [
{
"t": 1700000000,
"o": 0.42,
"h": 0.45,
"l": 0.41,
"c": 0.44
}
]
}
]
},
"meta": {
"request_id": "req_example",
"cached": false,
"cost": 2
}
}{
"object": "error",
"error": {
"code": "bad_request",
"message": "<string>",
"doc_url": "<string>",
"param": "<string>",
"retry_at": "2023-11-07T05:31:56Z",
"reason": "cursor_expired"
},
"meta": {
"request_id": "<string>",
"cached": true,
"cost": 123,
"cache_age_s": 123,
"ranking_generation": 123,
"ranking_as_of": "2023-11-07T05:31:56Z",
"directional_source": "live",
"ranking_source": "live",
"category_skill_source": "live",
"category_skill_model_version": "<string>",
"category_skill_taxonomy_version": "<string>",
"category_skill_platform": "polymarket",
"category_skill_scope": "observed_goldsky_primary_taker_fill",
"category_skill_source_coverage": "partial_whale_threshold_fills",
"category_skill_observation_started_at": "2023-11-07T05:31:56Z",
"category_skill_model_operationally_degraded": true,
"category_skill_status_counts": {
"live": 1,
"insufficient": 1,
"stale": 1,
"unknown": 1,
"degraded": 1
},
"category_skill_base_payload_hash": "<string>",
"category_skill_enriched_base_payload_hash": "<string>"
}
}{
"object": "error",
"error": {
"code": "bad_request",
"message": "<string>",
"doc_url": "<string>",
"param": "<string>",
"retry_at": "2023-11-07T05:31:56Z",
"reason": "cursor_expired"
},
"meta": {
"request_id": "<string>",
"cached": true,
"cost": 123,
"cache_age_s": 123,
"ranking_generation": 123,
"ranking_as_of": "2023-11-07T05:31:56Z",
"directional_source": "live",
"ranking_source": "live",
"category_skill_source": "live",
"category_skill_model_version": "<string>",
"category_skill_taxonomy_version": "<string>",
"category_skill_platform": "polymarket",
"category_skill_scope": "observed_goldsky_primary_taker_fill",
"category_skill_source_coverage": "partial_whale_threshold_fills",
"category_skill_observation_started_at": "2023-11-07T05:31:56Z",
"category_skill_model_operationally_degraded": true,
"category_skill_status_counts": {
"live": 1,
"insufficient": 1,
"stale": 1,
"unknown": 1,
"degraded": 1
},
"category_skill_base_payload_hash": "<string>",
"category_skill_enriched_base_payload_hash": "<string>"
}
}{
"object": "error",
"error": {
"code": "bad_request",
"message": "<string>",
"doc_url": "<string>",
"param": "<string>",
"retry_at": "2023-11-07T05:31:56Z",
"reason": "cursor_expired"
},
"meta": {
"request_id": "<string>",
"cached": true,
"cost": 123,
"cache_age_s": 123,
"ranking_generation": 123,
"ranking_as_of": "2023-11-07T05:31:56Z",
"directional_source": "live",
"ranking_source": "live",
"category_skill_source": "live",
"category_skill_model_version": "<string>",
"category_skill_taxonomy_version": "<string>",
"category_skill_platform": "polymarket",
"category_skill_scope": "observed_goldsky_primary_taker_fill",
"category_skill_source_coverage": "partial_whale_threshold_fills",
"category_skill_observation_started_at": "2023-11-07T05:31:56Z",
"category_skill_model_operationally_degraded": true,
"category_skill_status_counts": {
"live": 1,
"insufficient": 1,
"stale": 1,
"unknown": 1,
"degraded": 1
},
"category_skill_base_payload_hash": "<string>",
"category_skill_enriched_base_payload_hash": "<string>"
}
}{
"object": "error",
"error": {
"code": "bad_request",
"message": "<string>",
"doc_url": "<string>",
"param": "<string>",
"retry_at": "2023-11-07T05:31:56Z",
"reason": "cursor_expired"
},
"meta": {
"request_id": "<string>",
"cached": true,
"cost": 123,
"cache_age_s": 123,
"ranking_generation": 123,
"ranking_as_of": "2023-11-07T05:31:56Z",
"directional_source": "live",
"ranking_source": "live",
"category_skill_source": "live",
"category_skill_model_version": "<string>",
"category_skill_taxonomy_version": "<string>",
"category_skill_platform": "polymarket",
"category_skill_scope": "observed_goldsky_primary_taker_fill",
"category_skill_source_coverage": "partial_whale_threshold_fills",
"category_skill_observation_started_at": "2023-11-07T05:31:56Z",
"category_skill_model_operationally_degraded": true,
"category_skill_status_counts": {
"live": 1,
"insufficient": 1,
"stale": 1,
"unknown": 1,
"degraded": 1
},
"category_skill_base_payload_hash": "<string>",
"category_skill_enriched_base_payload_hash": "<string>"
}
}{
"object": "error",
"error": {
"code": "bad_request",
"message": "<string>",
"doc_url": "<string>",
"param": "<string>",
"retry_at": "2023-11-07T05:31:56Z",
"reason": "cursor_expired"
},
"meta": {
"request_id": "<string>",
"cached": true,
"cost": 123,
"cache_age_s": 123,
"ranking_generation": 123,
"ranking_as_of": "2023-11-07T05:31:56Z",
"directional_source": "live",
"ranking_source": "live",
"category_skill_source": "live",
"category_skill_model_version": "<string>",
"category_skill_taxonomy_version": "<string>",
"category_skill_platform": "polymarket",
"category_skill_scope": "observed_goldsky_primary_taker_fill",
"category_skill_source_coverage": "partial_whale_threshold_fills",
"category_skill_observation_started_at": "2023-11-07T05:31:56Z",
"category_skill_model_operationally_degraded": true,
"category_skill_status_counts": {
"live": 1,
"insufficient": 1,
"stale": 1,
"unknown": 1,
"degraded": 1
},
"category_skill_base_payload_hash": "<string>",
"category_skill_enriched_base_payload_hash": "<string>"
}
}{
"object": "error",
"error": {
"code": "bad_request",
"message": "<string>",
"doc_url": "<string>",
"param": "<string>",
"retry_at": "2023-11-07T05:31:56Z",
"reason": "cursor_expired"
},
"meta": {
"request_id": "<string>",
"cached": true,
"cost": 123,
"cache_age_s": 123,
"ranking_generation": 123,
"ranking_as_of": "2023-11-07T05:31:56Z",
"directional_source": "live",
"ranking_source": "live",
"category_skill_source": "live",
"category_skill_model_version": "<string>",
"category_skill_taxonomy_version": "<string>",
"category_skill_platform": "polymarket",
"category_skill_scope": "observed_goldsky_primary_taker_fill",
"category_skill_source_coverage": "partial_whale_threshold_fills",
"category_skill_observation_started_at": "2023-11-07T05:31:56Z",
"category_skill_model_operationally_degraded": true,
"category_skill_status_counts": {
"live": 1,
"insufficient": 1,
"stale": 1,
"unknown": 1,
"degraded": 1
},
"category_skill_base_payload_hash": "<string>",
"category_skill_enriched_base_payload_hash": "<string>"
}
}{
"object": "error",
"error": {
"code": "bad_request",
"message": "<string>",
"doc_url": "<string>",
"param": "<string>",
"retry_at": "2023-11-07T05:31:56Z",
"reason": "cursor_expired"
},
"meta": {
"request_id": "<string>",
"cached": true,
"cost": 123,
"cache_age_s": 123,
"ranking_generation": 123,
"ranking_as_of": "2023-11-07T05:31:56Z",
"directional_source": "live",
"ranking_source": "live",
"category_skill_source": "live",
"category_skill_model_version": "<string>",
"category_skill_taxonomy_version": "<string>",
"category_skill_platform": "polymarket",
"category_skill_scope": "observed_goldsky_primary_taker_fill",
"category_skill_source_coverage": "partial_whale_threshold_fills",
"category_skill_observation_started_at": "2023-11-07T05:31:56Z",
"category_skill_model_operationally_degraded": true,
"category_skill_status_counts": {
"live": 1,
"insufficient": 1,
"stale": 1,
"unknown": 1,
"degraded": 1
},
"category_skill_base_payload_hash": "<string>",
"category_skill_enriched_base_payload_hash": "<string>"
}
}{
"object": "error",
"error": {
"code": "bad_request",
"message": "<string>",
"doc_url": "<string>",
"param": "<string>",
"retry_at": "2023-11-07T05:31:56Z",
"reason": "cursor_expired"
},
"meta": {
"request_id": "<string>",
"cached": true,
"cost": 123,
"cache_age_s": 123,
"ranking_generation": 123,
"ranking_as_of": "2023-11-07T05:31:56Z",
"directional_source": "live",
"ranking_source": "live",
"category_skill_source": "live",
"category_skill_model_version": "<string>",
"category_skill_taxonomy_version": "<string>",
"category_skill_platform": "polymarket",
"category_skill_scope": "observed_goldsky_primary_taker_fill",
"category_skill_source_coverage": "partial_whale_threshold_fills",
"category_skill_observation_started_at": "2023-11-07T05:31:56Z",
"category_skill_model_operationally_degraded": true,
"category_skill_status_counts": {
"live": 1,
"insufficient": 1,
"stale": 1,
"unknown": 1,
"degraded": 1
},
"category_skill_base_payload_hash": "<string>",
"category_skill_enriched_base_payload_hash": "<string>"
}
}Read the candles
outcomeshas one entry per present token,YESfirst and thenNO. Each carriestoken_id,outcome, andcandles.candlesis sorted byt, oldest first.tis the bucket start in unix seconds.o,h,l, andcare prices in provider[0, 1]units.resolutionis1d(default) or1w.1dbuckets by UTC calendar day.1wbuckets by ISO week from Monday 00:00 UTC.- Stored data is daily. A
1dbucket usually holds one point, soo,h,l, andcequal that day’s close. A1wbucket aggregates real OHLC across the daily closes. - The API adds no intraday data.
fromis an exclusive lower bound in unix seconds.tois an inclusive upper bound. With1w, a mid-week point can produce a candle whosetprecedesfrom.- A market with no fetched tokens returns an empty
outcomesarray with status200. - Open and resolved markets both return candles.
Handle the market ID
- Pass the raw
condition_idfrom search or explore, or themkt_market ID from any V1 response. - A
trd_,wt_, orrf_prefix returns400 bad_requestwitherror.param="condition_id". - An unknown market returns
404 not_found.
curl -H "Authorization: Bearer $OXINSIDER_API_KEY" \
"https://api.0xinsider.com/api/v1/market/0x123.../candles?resolution=1w&from=1767225600"
Cache the candles
The 200 response carries anETag. Send If-None-Match to get 304 Not Modified with an empty body when nothing changed.
Related
Get Market Snapshot returns the current price and top of book for the same market.Authorizations
API key authentication. Send your key in the Authorization header as Bearer oxi_sk_live_.... Live keys require an active Pro subscription and return live data.
Headers
Conditional GET validator from a previous ETag. Matching values return 304 Not Modified with an empty body.
Path Parameters
Market condition ID. Accepts the raw provider-backed condition_id returned by /api/v1/markets/search or /api/v1/markets/explore, or the mkt_-prefixed market.id emitted by V1 responses.
Query Parameters
Bucketing granularity. 1d aggregates by UTC calendar day, 1w by ISO week (Monday 00:00 UTC start). Defaults to 1d.
1d, 1w Exclusive lower bound as a unix timestamp in seconds; points at or before this timestamp are omitted (the underlying daily snapshot read filters bucket_start > from). Note: for resolution=1w a surviving mid-week point can yield a weekly candle whose t (Monday 00:00 UTC) precedes from.
Inclusive upper bound as a unix timestamp in seconds; points after this timestamp are omitted.
Response
Provider-first market candles
Was this page helpful?