---
title: "Current tick grids for up to 200 markets of one provider"
method: POST
path: "/v1/markets/tick-size/batch"
tags: ["Markets"]
---

# Current tick grids for up to 200 markets of one provider

`POST /v1/markets/tick-size/batch`

## Request

- Base URL: `https://md.kairos.trade`
- URL: `https://md.kairos.trade/v1/markets/tick-size/batch`
- Auth: one of:
  - none
  - API key in header `X-Client-Id` and API key in header `X-Api-Key` and API key in header `X-Api-Secret`

The same resolution as `GET /v1/markets/tick-size` for up to 200 `(contract_id, asset_id)` pairs of ONE provider in one round trip. Polymarket token ids are read from the metadata cache in a single batch. Rate-limit bucket: LIGHT, flat cost of 1 unit. Not cached (`Cache-Control: no-store`).

`results` is positional — `results[i]` answers `items[i]` — and each entry is either a tick grid, the predictfun unsupported payload, or a per-item error carrying the same `code` the single route would have answered with (`not_found`, `tick_unavailable`, `cache_cold`, `upstream`), or `timeout` / `cancelled` for items not started before the 15s batch bound or the caller left. A batch where every item failed is still a `200`; only request-level problems (bad body, unknown provider, an empty `contract_id`, more than 200 items, or a failed token prefetch) fail the whole call.

## Request body

- TickGridBatchRequest
  - `provider` 'kalshi' | 'polymarket' | 'predictfun', required
  - `items` object[], required
    - `contract_id` string, required
    - `asset_id` string: Polymarket token id; optional.

## Response `200`

Positional results, one per requested item.

- TickGridBatchResponse
  - `provider` string, required
  - `results` union[], required: Positional — `results[i]` answers `items[i]`.
    - union
      - TickGrid: A market's current valid tick grid. Wire-compatible with the Data API `GET /markets/tick-size` response; `as_of` is additive.
        - `provider` 'kalshi' | 'polymarket', required
        - `contract_id` string, required
        - `asset_id` string, nullable, required: The Polymarket token id the grid was read for; null when the lookup was market-level.
        - `ranges` TickRange[], required
          - `start` string, required
          - `end` string, required
          - `step` string, required
        - `min_tick` string, required: The finest step across all bands — the smallest increment the market will ever accept.
        - `source` 'metadata_cache' | 'kalshi_price_ranges' | 'streamer_projection', required: Which upstream fact the grid was built from. `streamer_projection` is the orderbook streamer's projected finest venue step, used for a Kalshi market whose live band layout is not currently cached.
        - `synthetic` boolean, required: True when the grid is a single flat band standing in for a layout that is not currently known — the minimum tick is correct, the band boundaries are not described.
        - `price_level_structure` string, nullable, required: Kalshi's `price_level_structure` when present; null otherwise.
        - `as_of` string, date-time, required: When this grid was read from the market metadata cache (UTC). The cache itself is kept current by the orderbook streamer's live tick-change ingestion.
      - TickGridUnsupported: Explicit "no per-market grid" answer for predictfun. No grid is fabricated.
        - `provider` 'predictfun', required
        - `contract_id` string, required
        - `supported` false, required
        - `reason` string, required
      - TickGridBatchItemError: A per-item failure inside a batch. `error.code` matches what the single route would have answered.
        - `contract_id` string, required
        - `asset_id` string, nullable, required
        - `error` object, required
          - `code` string, required
          - `message` string, required

## Other responses

- `400`: Unreadable/invalid JSON body, unknown provider or one with no per-market grid, missing or empty `items`, an item with an empty `contract_id`, or more than 200 items.
- `401`: No valid credential presented. Every path returns `code: unauthorized`; the triggers differ: - An `Authorization` header on a deployment where bearer auth is not enabled (`bearer authentication is not enabled`). - A bearer token that fails verification (`invalid or expired session`), or whose token/session has been revoked (`session has been revoked`). - An incomplete or wrong API-key header set. Sending *any* of `X-Client-Id`, `X-Api-Key`, `X-Api-Secret` commits the request to the API-key path, so a partial set is rejected rather than silently degrading to anonymous limits (`valid X-Client-Id, X-Api-Key, and X-Api-Secret headers are required`). - No credential material at all while the anonymous free tier is unavailable — switched off for the deployment, forced off through the runtime kill switch, or not yet resolvable on a replica that has never read the flag (it fails closed).
- `403`: API key presented from a source IP not in that credential's whitelist.
- `429`: Two different gates return this status, both with `code: rate_limited`: - **Per-credential (or per-IP, when anonymous) weighted budget exhausted.** The message is `rate limit exceeded`, or, for anonymous callers, `anonymous rate limit exceeded — request an API key for higher limits (…)`. `Retry-After` is the whole number of seconds until the current one-minute window rolls over, floored at 1. All four `X-RateLimit-*` headers are present. - **Per-IP admission gate.** An in-process, pre-authentication guard that keeps a flood off the shared credential cache and database. The message is `too many requests from this address` and `Retry-After` is a flat `60`. Because this fires *before* authentication, the response carries **no** `X-RateLimit-*` headers at all.
- `502`: `upstream` — the Polymarket token prefetch failed with an unexpected metadata-cache status.
- `503`: `cache_cold` (with `Retry-After: 5`), `unavailable`, or `rate_limiter_unavailable`.

---

[API](https://skmtc.dev/kairos/apis/kairos-market-data-api.md) - [All operations](https://skmtc.dev/kairos/apis/kairos-market-data-api/llms.txt) - [OpenAPI document](https://skmtc.dev/kairos/apis/kairos-market-data-api/revisions/01e987f59a04?raw)
