v2.fill view — bucketing happens in SQL, not client-side.
Request
Authentication
Paid tier required. Pass your API key viax-api-key, Authorization: Bearer, or ?key=:
Path parameters
| Parameter | Type | Required | Description |
|---|---|---|---|
token_id | string | Yes | Outcome token ID (uint256 as decimal string). |
Query parameters
| Parameter | Type | Required | Description |
|---|---|---|---|
resolution | string | No | Bucket size. One of 1m, 5m, 15m, 1h (default), 4h, 1d. |
limit | integer | No | Max buckets per response (1-1000, default 500). |
start / start_time | integer | No | Unix seconds — only return buckets whose fills land at or after this time. |
end / end_time | integer | No | Unix seconds — only return buckets whose fills land at or before this time. |
Parameter validation
token_id: 1-78 digits,^[0-9]+$.resolution: whitelist{1m, 5m, 15m, 1h, 4h, 1d}.limit: 1-1000. Timestamps: non-negative i64.
400 Bad Request with {"error": "..."}.
Response
Response fields — candles
Ordered newest-first. Each bucket:| Field | Type | Description |
|---|---|---|
time | string | ISO-8601 UTC of the bucket’s start. |
time_unix | integer | Unix seconds of the bucket’s start. |
open | string (numeric) | First fill’s price in the bucket, 0.0–1.0. |
high | string (numeric) | Max price. |
low | string (numeric) | Min price. |
close | string (numeric) | Last fill’s price in the bucket. |
volume | string (numeric) | Total USDC that changed hands in the bucket (buy + sell combined). |
volume_shares | string (numeric) | Total outcome shares that changed hands. |
volume_buy | string (numeric) | null | USDC spent buying the token in the bucket. null if no buys. |
volume_sell | string (numeric) | null | USDC received from selling the token. null if no sells. |
trades | integer | Number of fills in the bucket. |
vwap | string (numeric) | Volume-weighted average price. Σ(price × volume_usdc) / Σ volume_usdc. |
Response fields — envelope
| Field | Type | Description |
|---|---|---|
token_id | string | Echoes the path parameter. |
resolution | string | The resolution in effect. |
source | string | Always "onchain-v2". |
count | integer | Number of candles returned. |
pagination | object | limit, offset, has_more — same semantics as other list endpoints. |
question | string | null | Market question for this token. |
outcome | string | null | Outcome label ("Yes", "No", "Up", neg-risk candidate name, etc.). |
condition_id | string | null | Parent market condition_id. |
image | string | null | CDN URL of the market icon. |
Examples
Error responses
| Status | Body | When |
|---|---|---|
400 | {"error": "resolution must be one of [1m, 5m, 15m, 1h, 4h, 1d]"} | Bad resolution, bad token_id, or bad timestamp. |
401 | {"error": "missing API key ..."} | No key or bad key. |
402 | {"error": "paid plan required ..."} | Free tier. |
429 | {"error": "rate limit exceeded", "reset_at": <unix>} | Rate limit hit. |
5xx | {"error": "temporary_data_provider_error"} | Temporary data provider issue. Retry with backoff. |
Notes
- Candles are always returned newest-first (
time DESC). If you need oldest-first for charting, reverse client-side. - Empty buckets (no trades) are not emitted — callers that want a dense time-series should fill gaps client-side.
- Price =
USDC_amount / share_amountfrom the fill. In pair-mint fills (rare; both sides outcome tokens), fills are excluded from the candles because there’s no implied price. volume_buy/volume_selldistinguish direction: a buy = someone paid USDC to receive the token, a sell = someone paid the token to receive USDC.- VWAP is computed per-bucket, not cumulative. Reconstruct a trailing VWAP client-side by weighting adjacent buckets.
- If the
token_idhas never been filled on v2, you getcount: 0with an emptycandles: []— not a 404.

