---
title: "Query Tick Data"
method: GET
path: "/v2/data/ticks/query"
tags: ["data"]
---

# Query Tick Data

`GET /v2/data/ticks/query`

## Request

- Base URL: `https://api.predexon.com`
- URL: `https://api.predexon.com/v2/data/ticks/query`
- Auth: API key in header `x-api-key`

Run a server-side DuckDB query over the pruned Parquet parts and return JSON rows — for targeted pulls (one market, a bounded window) where you want rows instead of files. No storage URL is exposed to the caller; column/row/time limits are enforced server-side.

**Releasing soon** — this dataset is in a gated private preview and is not yet reachable with a standard API key.

`market_id`, `start_time`, and `end_time` are all required (Parquet is sorted by ID, so a market plus a bounded window keeps each query cheap). Default `limit` 10000, hard-capped at 100000.

## Query parameters

- `venue` 'polymarket' | 'kalshi' | 'opinion', required: Dataset key.
- `market_id` string, required: Market / ticker to query.
- `start_time` integer, required: Window start, epoch ms UTC. Filters rows with ts >= start_time.
- `end_time` integer, required: Window end, epoch ms UTC (inclusive).
- `date` string, nullable: UTC day override, YYYY-MM-DD (window still filters rows).
- `start_date` string, nullable: Range start override, YYYY-MM-DD.
- `end_date` string, nullable: Range end override, YYYY-MM-DD (inclusive).
- `columns` string, nullable: Comma-separated subset of columns to return.
- `limit` integer, nullable: Max rows (hard-capped at 100000).

## Response `200`

Successful Response

- TickQueryResponse: Server-side DuckDB query result (rows as JSON).
  - `venue` string, required
  - `date` string, nullable
  - `start_date` string, nullable
  - `end_date` string, nullable
  - `start_time` integer, nullable
  - `end_time` integer, nullable
  - `market_id` string, nullable
  - `columns` string[], required
  - `rows` object[], required
  - `row_count` integer, required
  - `truncated` boolean, required

## Other responses

- `400`: Bad or missing parameters (invalid venue/columns, window too large).
- `404`: `not_final` (day not compacted yet) or `not_found` (no data for that market/date).
- `500`: Internal Server Error.
- `504`: `query_timeout` — query exceeded the time limit; narrow the window or columns.

## Changes

- **2026-11-03** `b30fe81532b4`: 1 info
  - endpoint added

[Operation history](https://skmtc.dev/predexon/apis/predexon-api/changes/v2/data/ticks/query/get.md)

---

[API](https://skmtc.dev/predexon/apis/predexon-api.md) - [All operations](https://skmtc.dev/predexon/apis/predexon-api/llms.txt) - [OpenAPI document](https://skmtc.dev/predexon/apis/predexon-api/revisions/b30fe81532b4?raw)
