Agent-readable docs index: /llms.txt. Full docs in one file: /llms-full.txt. Download /docs.zip to grep all markdown files locally.

Get index candles

/api/v1/indices/{id}/candlesGET
OHLC of published index levels. timestamp is the end of the bucket, UTC. One hourly level at 12:00Z is the candle that ends at 13:00Z. A bucket with no level is omitted. interval defaults to 5min. When from and to are omitted, the window is the last 7 days for 1min and 5min, 30 days for 1hour, and 90 days for 1d. from is inclusive and to is exclusive. A window that needs more than 20,000 stored levels returns 400; narrow from and to. An unknown index returns 404. An index with no levels in the window returns an empty list.
Authorization
bearerAuth *Bearer <token>
Session token from the app, or an API key (the ak_ prefix), sent as a Bearer token or an ?api_key= query parameter.. Token in: header
Query Parameters
interval?"1min" | "5min" | "1hour" | "1d"
1min, 5min, 1hour, or 1d. daily and 1day are aliases of 1d.
Default: "5min"
from?string
Inclusive lower bound on the candle timestamp, ISO-8601 or YYYY-MM-DD. A date with no time is that UTC midnight. Omitted, the bound is to minus the interval's default window.
to?string
Exclusive upper bound on the candle timestamp, ISO-8601 or YYYY-MM-DD. A date with no time is that UTC midnight. Omitted, the bound is the current time.
page?integer
1-based page number.
Default: 1Min: 1
per_page?integer
Candles in this response (1-500).
Default: 100Min: 1Max: 500
order?"asc" | "desc"
Sort by candle timestamp. desc is newest first.
Default: "desc"
Response
200 · Candles in the requested window, newest first unless `order=asc`.
data *object[]
Show item properties
timestamp *string (date-time)
End of the bucket, UTC. A 1min, 5min, or 1hour bucket ends on a UTC boundary. A 1d bucket ends at the next midnight in US Eastern time. A level printed on a boundary belongs to the bucket that starts there.
open *number
First published level in the bucket. An index level uses the index's published units. A rate level is on the 0-100 scale.
high *number
Highest published level in the bucket, in the same units as open.
low *number
Lowest published level in the bucket, in the same units as open.
close *number
Last published level in the bucket, in the same units as open. A bucket with one level has open, high, low, and close equal to that level.
meta *object
Show properties
total?integernull
Total number of records matching the request across every page, not just the current one. null on an uncounted list; page using has_next. A relevance-ranked search is uncounted, and a searched events list stays uncounted even with sort. A searched markets list with sort returns a total over the best 1,000 matches. A match outside that set is omitted.
page?integer
The 1-based page number this response covers.
per_page?integer
Maximum number of items on a page. The last page may hold fewer.
total_pages?integernull
Total number of pages available at the current per_page. null whenever total is null; page using has_next.
has_next?boolean
True when a page exists after this one.
has_prev?boolean
True when this is not the first page.
total_capped?boolean
True when total and total_pages reflect the server's counting ceiling rather than the exact matched count: the real set is at least total large. Render such totals as a lower bound (for example "10,000+"). Omitted when the count is exact. A sorted markets search that fills the 10,000-candidate ceiling sets this flag.
400 · Invalid interval, page, or bound, or a window that needs more than 20,000 stored levels.
error?string
Stable, machine-readable code identifying the failure; branch on this rather than on message. One of bad_request, unauthorized, forbidden, not_found, conflict, service_unavailable, upstream_error, service_error, or internal_error.
message?string
Human-readable explanation, safe to show to a user. For client errors it names the specific problem; for server-side failures it is a generic notice and the underlying detail is deliberately withheld.
401 · Missing or invalid credential.
error?string
Human-readable reason the request was not authenticated or authorized, for example a missing or malformed Authorization header, an invalid token, or a token lacking the required scope. This is free text whose wording can change, so branch on status (or the HTTP status code) instead of on this string.
status?integer
The HTTP status code repeated in the body.
403 · The organization has no paid plan, so the realtime read scopes are refused. Distinct from a 429, which means a plan's budget ran out: nothing here resets on a timer, and the request succeeds only once the organization holds a plan.
error *string
Human-readable reason the request was refused.
status *integer
HTTP status code, repeated in the body.
upgrade_url?string (uri)
Page listing the plans and their request allowances, for buying access. Absent when no plan is available for purchase.
404 · Index not found
error?string
Stable, machine-readable code identifying the failure; branch on this rather than on message. One of bad_request, unauthorized, forbidden, not_found, conflict, service_unavailable, upstream_error, service_error, or internal_error.
message?string
Human-readable explanation, safe to show to a user. For client errors it names the specific problem; for server-side failures it is a generic notice and the underlying detail is deliberately withheld.
429 · The organization's minute or UTC-day request budget is exhausted, or the organization has reached its cap on requests running at the same time (`limit: "concurrency"`). Wait `Retry-After` seconds before retrying; for a concurrency 429, reduce parallelism.
error *"rate_limited"
Always rate_limited. Branch on this to detect a throttled request.
limit *"rpm" | "daily" | "concurrency"
Which limit was hit: rpm for the per-minute cap, daily for the daily one, or concurrency for the cap on requests running at the same time.
message *string
Human-readable explanation naming the limit that was exceeded.
upgrade_url?string (uri)
Page listing the plans and their request allowances, for buying a larger budget. Absent when no plan is available for purchase.
Request example
curl -X GET "https://api.adjacent.markets/api/v1/indices/<id>/candles" \ -H "Authorization: Bearer <token>"
Response example
{ "error": "Missing or invalid Authorization header", "status": 401 }