Get market candles
curl --request GET \
--url https://api.worm.wtf/markets/{condition_id}/candles/import requests
url = "https://api.worm.wtf/markets/{condition_id}/candles/"
response = requests.get(url)
print(response.text)const options = {method: 'GET'};
fetch('https://api.worm.wtf/markets/{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.worm.wtf/markets/{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",
]);
$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.worm.wtf/markets/{condition_id}/candles/"
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.worm.wtf/markets/{condition_id}/candles/")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.worm.wtf/markets/{condition_id}/candles/")
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{
"data": [
{
"timestamp": 1714300800,
"open": "0.640000",
"high": "0.690000",
"low": "0.630000",
"close": "0.670000",
"volume": "1245.000000",
"is_yes": true
},
{
"timestamp": 1714302600,
"open": "0.670000",
"high": "0.680000",
"low": "0.650000",
"close": "0.660000",
"volume": "832.500000",
"is_yes": true
}
],
"meta": {
"is_yes": true
},
"error": null
}
{
"data": null,
"meta": null,
"error": {
"code": -11,
"slug": "invalid_request_params",
"message": "Validation Error",
"details": []
}
}
{
"data": null,
"meta": null,
"error": {
"code": -15,
"slug": "not_found",
"message": "Not found.",
"details": []
}
}
{
"data": null,
"meta": null,
"error": {
"code": -17,
"slug": "throttled",
"message": "Request was throttled.",
"details": []
}
}
{
"data": null,
"meta": null,
"error": {
"code": -3,
"slug": "internal_error",
"message": "An internal error occurred.",
"details": []
}
}
Markets
Get market candles
Retrieve OHLC candle data for a market over a bounded time range.
GET
/
markets
/
{condition_id}
/
candles
/
Get market candles
curl --request GET \
--url https://api.worm.wtf/markets/{condition_id}/candles/import requests
url = "https://api.worm.wtf/markets/{condition_id}/candles/"
response = requests.get(url)
print(response.text)const options = {method: 'GET'};
fetch('https://api.worm.wtf/markets/{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.worm.wtf/markets/{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",
]);
$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.worm.wtf/markets/{condition_id}/candles/"
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.worm.wtf/markets/{condition_id}/candles/")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.worm.wtf/markets/{condition_id}/candles/")
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{
"data": [
{
"timestamp": 1714300800,
"open": "0.640000",
"high": "0.690000",
"low": "0.630000",
"close": "0.670000",
"volume": "1245.000000",
"is_yes": true
},
{
"timestamp": 1714302600,
"open": "0.670000",
"high": "0.680000",
"low": "0.650000",
"close": "0.660000",
"volume": "832.500000",
"is_yes": true
}
],
"meta": {
"is_yes": true
},
"error": null
}
{
"data": null,
"meta": null,
"error": {
"code": -11,
"slug": "invalid_request_params",
"message": "Validation Error",
"details": []
}
}
{
"data": null,
"meta": null,
"error": {
"code": -15,
"slug": "not_found",
"message": "Not found.",
"details": []
}
}
{
"data": null,
"meta": null,
"error": {
"code": -17,
"slug": "throttled",
"message": "Request was throttled.",
"details": []
}
}
{
"data": null,
"meta": null,
"error": {
"code": -3,
"slug": "internal_error",
"message": "An internal error occurred.",
"details": []
}
}
Path Parameters
Query Parameters
Exclusive end timestamp (unix seconds). Must be greater than
start_time. The range end_time - start_time must not exceed 30 days (2,592,000 seconds).When
true (default), candles use YES-outcome prices. When false, OHLC is transformed to the NO-outcome price scale (1 - price mapping with high/low swapped appropriately).Response
Ordered list of OHLCV candle buckets for the market. Each item is one interval aligned to
interval (bucket start is timestamp).Show Candle object (each `data[]` item)
Show Candle object (each `data[]` item)
Volume is outcome-token share quantity (sum of trade fill amounts in the bucket), as a decimal string—not USD/USDC notional. OHLC fields are per-share prices on the 0–1 scale for the requested
is_yes outcome.Echoes the requested outcome:
is_yes (boolean) — same meaning as the is_yes query parameter (true = YES-scale prices). Present on success alongside data.{
"data": [
{
"timestamp": 1714300800,
"open": "0.640000",
"high": "0.690000",
"low": "0.630000",
"close": "0.670000",
"volume": "1245.000000",
"is_yes": true
},
{
"timestamp": 1714302600,
"open": "0.670000",
"high": "0.680000",
"low": "0.650000",
"close": "0.660000",
"volume": "832.500000",
"is_yes": true
}
],
"meta": {
"is_yes": true
},
"error": null
}
{
"data": null,
"meta": null,
"error": {
"code": -11,
"slug": "invalid_request_params",
"message": "Validation Error",
"details": []
}
}
{
"data": null,
"meta": null,
"error": {
"code": -15,
"slug": "not_found",
"message": "Not found.",
"details": []
}
}
{
"data": null,
"meta": null,
"error": {
"code": -17,
"slug": "throttled",
"message": "Request was throttled.",
"details": []
}
}
{
"data": null,
"meta": null,
"error": {
"code": -3,
"slug": "internal_error",
"message": "An internal error occurred.",
"details": []
}
}
The API enforces a 30-day maximum window per request (
end_time - start_time ≤ 2,592,000 seconds). Split larger backfills into multiple requests.