> ## Documentation Index
> Fetch the complete documentation index at: https://docs.predictiondata.dev/llms.txt
> Use this file to discover all available pages before exploring further.

# Finding Available Files

> List and download Kalshi exports by ticker

List exports by ticker, then download using the `path` from each export object. Both **CSV** (gzip-compressed) and **Parquet** (zstd-compressed) files are available for every export type.

## Base URL

`https://api.predictiondata.dev/v2`

## Authentication

Send your API key in the **x-auth-token** header. Your key's tier must allow access to the exchange (e.g. a `kalshi` tier for Kalshi). The `admin` and `all` tiers can access any exchange.

```bash theme={null}
curl -H "x-auth-token: YOUR_API_KEY" \
  "https://api.predictiondata.dev/v2/exports/kalshi/tickers/KXSB-26-NE"
```

## Finding exports for a ticker

List all exports for a given **ticker**:

```bash theme={null}
GET /v2/exports/kalshi/tickers/{ticker}
```

**Example:** New England to win the Super Bowl — ticker `KXSB-26-NE`. (You can find tickers on Kalshi's site or from the list response when querying by event.)

```bash theme={null}
curl -H "x-auth-token: YOUR_API_KEY" \
  "https://api.predictiondata.dev/v2/exports/kalshi/tickers/KXSB-26-NE"
```

## Response format

The endpoint returns an **array** of export objects. Each object includes:

| Field           | Description                                               |
| --------------- | --------------------------------------------------------- |
| `path`          | Path to use when downloading (see below)                  |
| `day`           | Date of the export (UTC)                                  |
| `exportType`    | `top_of_book`, `top_5`, `top_25`, `complete`, or `trades` |
| `fileFormat`    | `CSV` or `PARQUET`                                        |
| `fileSizeBytes` | Size of the file                                          |
| `ticker`        | Market ticker                                             |

## Export types

| Export type   | Description                 | File formats               |
| ------------- | --------------------------- | -------------------------- |
| `top_of_book` | Best bid/ask only           | CSV (gzip), Parquet (zstd) |
| `top_5`       | Top 5 price levels          | CSV (gzip), Parquet (zstd) |
| `top_25`      | Top 25 price levels         | CSV (gzip), Parquet (zstd) |
| `complete`    | Full orderbook event stream | CSV (gzip), Parquet (zstd) |
| `trades`      | Trade executions            | CSV (gzip), Parquet (zstd) |

## Downloading an export

Use the **path** from an export object:

```bash theme={null}
GET /v2/datasets/{path}
```

The server responds with a **302 redirect** to a signed CloudFront URL. The URL is valid for **5 minutes**. Follow redirects (e.g. `curl -L`) to download the file.

**Example:** If the list response contains `"path": "/kalshi/KXSB-26-NE/top-of-book/2026-02-03.csv.gz"`:

```bash theme={null}
curl -L -H "x-auth-token: YOUR_API_KEY" \
  "https://api.predictiondata.dev/v2/datasets/kalshi/KXSB-26-NE/top-of-book/2026-02-03.csv.gz" \
  --output data.csv.gz
```

## Quick reference

| Step           | Endpoint                                  | Auth                            |
| -------------- | ----------------------------------------- | ------------------------------- |
| List by ticker | `GET /v2/exports/kalshi/tickers/{ticker}` | x-auth-token                    |
| Download       | `GET /v2/datasets/{path}`                 | x-auth-token (302 → signed URL) |

Need a key or a different exchange? Contact [calder@predictiondata.dev](mailto:calder@predictiondata.dev).
