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

# Coming from v1

> What changes from the PolymarketData API v1: IDs with venues, one book per market, interval closes, milliseconds and stable error codes.

v1 stays where it is, at `https://api.polymarketdata.co/v1`, unchanged, with its documentation at [docs.polymarketdata.co](https://docs.polymarketdata.co). Your API key works on both, and each API has its own rate limit, so v2 requests never count against your v1 limit.

## The endpoints

| v1 | v2 |
| - | - |
| `GET /v1/series`, `/v1/events`, `/v1/markets` | `GET /v2/series`, `/v2/events`, `/v2/markets`, with `venue=polymarket` for Polymarket only |
| `GET /v1/markets/{id_or_slug}` | `GET /v2/markets/polymarket:{id or slug}` |
| `GET /v1/markets/{id_or_slug}/prices` | `GET /v2/markets/{market_id}/prices` |
| `GET /v1/tokens/{token_id}/prices` | `GET /v2/markets/{market_id}/prices`, with `outcome=no` for the second outcome |
| `GET /v1/markets/{id_or_slug}/books`, `/v1/tokens/{token_id}/books` | `GET /v2/markets/{market_id}/books` |
| `GET /v1/markets/{id_or_slug}/metrics` | `GET /v2/markets/{market_id}/stats` |
| `GET /v1/tags` | `GET /v2/categories` |
| `GET /v1/usage` | `GET /v2/usage` |

## The parameters

| v1 | v2 |
| - | - |
| `start_ts`, `end_ts` | `start`, `end` |
| Unix **seconds** | Epoch **milliseconds** (or RFC 3339, or a date) |
| `start_date_min`, `start_date_max` | `open_from`, `open_to` |
| `end_date_min`, `end_date_max` | `close_from`, `close_to` |
| `tags`, `tags_match` | `category` (our categories) |

## What behaves differently

* **IDs carry the venue.** A Polymarket market is `polymarket:3215007`, or `polymarket:<slug>`. See [Venues and IDs](https://docs.qelso.io/concepts/venues-and-ids.md).
* **Tokens are gone.** There is one book per market, the YES side, and `outcome=no` gives the other outcome. Each outcome's token ID is still in the market's `outcomes`. See [The YES-side book](https://docs.qelso.io/concepts/yes-side-book.md).
* **Coarse prices are closes, not averages.** At `10m`, `1h`, `6h` and `1d`, a price row gives the state at the end of its interval, not the average over it.
* **Books are as of each interval's end**, not its start, so they line up with prices on `t`.
* **Statistics replace metrics.** On Polymarket, `/stats` gives the venue's own figures (`source: venue_reported`): `volume_cum` is the running total in US dollars, `volume` per interval is given at `1d` only, and `liquidity` and `spread` are the venue's.
* **Errors have stable codes.** Every error is `{"error": {"code", "message", "request_id", "details"}}`; see [Errors](https://docs.qelso.io/concepts/errors.md).
* **Limits are counted in units**, not requests. Most requests cost 1 unit; sub-minute and tick requests cost more. See [Limits](https://docs.qelso.io/concepts/limits.md).

## New in v2

* Kalshi, alongside Polymarket, through the same endpoints.
* Sub-minute data: books at any millisecond, prices and books down to 100 milliseconds, and every best bid and ask change, book change and trade.
* Candles with volume, trade count and VWAP.
* Streams: a whole window in one request, as NDJSON or CSV.


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.