Get Historical Prices
curl --request GET \
--url https://api.limitless.exchange/markets/{slug}/historical-priceimport requests
url = "https://api.limitless.exchange/markets/{slug}/historical-price"
response = requests.get(url)
print(response.text)const options = {method: 'GET'};
fetch('https://api.limitless.exchange/markets/{slug}/historical-price', 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.limitless.exchange/markets/{slug}/historical-price",
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.limitless.exchange/markets/{slug}/historical-price"
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.limitless.exchange/markets/{slug}/historical-price")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.limitless.exchange/markets/{slug}/historical-price")
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{
"title": "Will the event happen?",
"prices": [
{
"price": 0.75,
"timestamp": "1736944200000"
}
],
"marketStatus": "FUNDED"
}{
"message": "<string>",
"error": "<string>",
"statusCode": 123
}{
"message": "<string>"
}Trading
Get Historical Prices
Retrieve newest-first historical YES-price data for an exact market slug or all visible children of a group slug. Interval values are lookback presets, not custom date bounds.
GET
/
markets
/
{slug}
/
historical-price
Get Historical Prices
curl --request GET \
--url https://api.limitless.exchange/markets/{slug}/historical-priceimport requests
url = "https://api.limitless.exchange/markets/{slug}/historical-price"
response = requests.get(url)
print(response.text)const options = {method: 'GET'};
fetch('https://api.limitless.exchange/markets/{slug}/historical-price', 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.limitless.exchange/markets/{slug}/historical-price",
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.limitless.exchange/markets/{slug}/historical-price"
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.limitless.exchange/markets/{slug}/historical-price")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.limitless.exchange/markets/{slug}/historical-price")
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{
"title": "Will the event happen?",
"prices": [
{
"price": 0.75,
"timestamp": "1736944200000"
}
],
"marketStatus": "FUNDED"
}{
"message": "<string>",
"error": "<string>",
"statusCode": 123
}{
"message": "<string>"
}Historical price data is scoped to each market’s lifespan. Each market on
Limitless is a distinct instance with a fixed start and end time, so this
endpoint clips the selected lookback to market creation and the earlier of the
market deadline or the current time.Short-lived markets (for example, hourly or 15-minute crypto markets) therefore
return only a small window of history, typically no longer than the market’s
duration itself. To reconstruct a longer time series for a recurring product,
query across the multiple markets that made up that period (each with its own
slug).
Slug and response variants
Slug resolution checks for an exact market first, including a standalone CLOB market, an AMM market, or one child of a multi-outcome group. An exact market returns one object withtitle, marketStatus, and prices.
If no exact market matches, a visible group slug returns an array containing one object per visible child. Each series reports the group’s status as marketStatus; child order is not guaranteed. A hidden group is treated as missing, while an exact hidden market slug is still resolved.
Every price point is { price, timestamp }. price is a JSON number and timestamp is a decimal Unix epoch-millisecond string, such as "1736944200000". Points within each series are newest first. A resolved CLOB series with retained history starts with its final payout price, timestamped one second after the newest retained point.
Lookback presets
interval selects a lookback preset, not merely the spacing between points. It defaults to 1d. The API does not accept custom from or to bounds.
| Preset | Requested lookback | Normal live bucket | Bucket limit |
|---|---|---|---|
5m | 5 minutes | 1 minute | 5 |
1h | 1 hour | 1 minute | 60 |
6h | 6 hours | 5 minutes | 72 |
1d | 1 day | 15 minutes | 96 |
1w | 1 week | 30 minutes | 336 |
1m | 30 days (one month) | 4 hours | 180 |
all | Entire market lifespan | 12 hours | 1,000 |
Empty data and freshness
- A CLOB market with no retained price events returns
prices: []. - AMM buckets without trades use a
0.5fallback, so an AMM no-data response contains synthesized points rather than an empty series. - A visible group with no visible children returns
[].
Errors
| Status | Meaning |
|---|---|
404 | Neither an exact market nor a visible group has the slug. The response message is No entity found. |
500 | A historical-price or interval lookup failed unexpectedly. Unsupported interval values are not currently validated into a stable 400 contract. |
Path Parameters
Query Parameters
Lookback preset. 1m means one month (30 days). Defaults to 1d.
Available options:
5m, 1h, 6h, 1d, 1w, 1m, all Example:
"1d"
Response
One series for an exact market slug, or an array of visible child series for a group slug
- object
- object[]
Example:
"Will the event happen?"
Newest-first YES prices.
Show child attributes
Show child attributes
Exact market status for a single response, or group status for every series in a group response.
Available options:
CREATED, DRAFTED, FUNDED, LOCKED, RESOLVED Example:
"FUNDED"