---
title: "Batch fetch current prices for multiple markets"
method: POST
path: "/markets/batch-prices"
tags: ["Markets"]
---

# Batch fetch current prices for multiple markets

`POST /markets/batch-prices`

## Request

- Base URL: `https://data.kairos.trade`
- URL: `https://data.kairos.trade/markets/batch-prices`
- Auth: API key in header `X-Client-Id` and API key in header `X-Api-Key` and API key in header `X-Api-Secret`

Fetches current price/volume/liquidity for up to 300 `(market_id, provider_id)` pairs. Results are cached briefly. Every reference must contain a non-empty market identifier and a known integer `provider_id`; an invalid reference rejects the request. A provider with no batch-price support is skipped (its markets are simply absent from the response, not an error). Response is a flat object keyed by the requested `market_id` — no top-level wrapper.

## Request body

- MarketsBatchPricesRequest
  - `markets` MarketsBatchPricesRequestItem[], required
    - `market_id` string, required
    - `provider_id` integer, required

## Response `200`

Prices keyed by the requested `market_id`. Markets that could not be priced are simply absent.

- MarketsBatchPricesResponse: Prices keyed by the requested market_id.

## Other responses

- `400`: Missing/empty `markets` array, malformed market reference, unknown provider, or more than 300 markets requested.
- `401`: No valid credential presented — missing/invalid API-key headers, or an invalid/expired session token.
- `403`: Authenticated but not permitted. Three distinct causes: the session user is not invited (`Invite required`), the API key lacks the operation's scope, or API-key access to the requested venue is switched off (`API access is disabled for <provider>`). Admin and API-key callers bypass the invite check; session and admin callers bypass scope and venue checks.
- `413`: Request body exceeded the 8 MiB service-wide cap, refused before the handler ran.
- `422`: Request failed FastAPI parameter validation.
- `429`: Rate limit exceeded for this route's sliding window, keyed on the session `sub` when authenticated and on the trusted client IP otherwise. Honor `Retry-After`. A per-API-key data ceiling (set per credential) rejects with `{"detail": "API key data rate limit exceeded"}` instead of the `error` envelope below.
- `500`: Upstream provider fetch failed.

---

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