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

> ## Agent Instructions
> The Markdown of an API reference page leaves out the OpenAPI schema.
> Every object an endpoint returns or a webhook carries, with each field's type, presence and meaning, is on https://docs.0xinsider.com/api-reference/objects.md.
> The full OpenAPI 3.1 spec names each operation's and each webhook's exact parameters, request body and response schema: https://docs.0xinsider.com/api-reference/openapi.json.

# Batch market closing lines

> Get the closing line of up to 25 sports or esports markets in the order you request them.

Use this endpoint to read the closing line of 1 to 25 markets in one request, for example every market a set of large trades touched. Each `ok` item holds exactly what [Market closing line](https://docs.0xinsider.com/api-reference/endpoint/get-market-close.md) returns for that market. Check each result's `status`, because individual markets can fail.

## Parameters

| Parameter | Description |
| - | - |
| `condition_ids` | Required. 1 to 25 market ids, in the body: Polymarket's own `condition_id` or the market's `mkt_` id. Duplicates are allowed, and each one gets its own result row. |

An empty array, more than 25 ids, or a body field other than `condition_ids` fails the whole request with `400` before any market is read. A body over `1048576` bytes returns `413` with `error.reason` `payload_too_large`. A body sent without `Content-Type: application/json` returns `415` with `error.reason` `unsupported_media_type`.

## Key response fields

| Field | Meaning |
| - | - |
| `data[].index` | Where this market sat in `condition_ids`, counting from 0. |
| `data[].input` | The id exactly as you sent it. |
| `data[].status` | `ok`, with `data` in the Market closing line shape, or `error`, with `error.code`, `error.message`, and `error.param`. |
| `data[].data.status` | `measured`, `pending`, or `unavailable`, as on the single route. Every item is judged at the same moment. |
| `data[].error.code` | `bad_request` when an id is empty or malformed, `not_found` when 0xinsider has no matching market. A market outside sports and esports is `not_found` with `error.reason` `market_out_of_scope`. The HTTP response remains `200` in each case. |
| `meta.request_cost` | The batch item units charged for this request: 1 for every id you sent, duplicates and bad ids included. The `X-Request-Cost` header carries the same number. |
| `meta.rate_limit` | Your remaining item budget: `basis` (always `batch_items_per_minute`), `limit`, `remaining`, and `reset` as a Unix timestamp. The `X-Batch-RateLimit-Limit`, `X-Batch-RateLimit-Remaining`, and `X-Batch-RateLimit-Reset` headers carry the same three numbers. |
| `meta.total_items`, `meta.successful_items`, `meta.failed_items` | How many ids you sent, how many came back `ok`, and how many came back `error`. |

## Item budget

This route spends from the same batch item budget as the other batch routes: 2,500 units a minute per account on Pro, or 5,000 on Max, alongside the request allowance every authenticated route shares (100 requests a minute on Pro, 200 on Max). Going over returns `429` with a `Retry-After`, before any market is read.

## Example

```bash theme={null}
curl -X POST \
  -H "Authorization: Bearer $OXINSIDER_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{"condition_ids": ["0x123...", "mkt_0x456..."]}' \
  "https://api.0xinsider.com/api/v1/markets/close/batch"
```

## What it does not return

* An `ETag`. This route has no conditional read; the single route has one.
* Partial work after a bad request body. A `400` means no market was read at all.
* `0` in place of a missing price. A market without a close says `pending` or `unavailable` with its `unavailable_reason`.
* A different shape per item. An `ok` item holds exactly what the single route returns.


## API Specification

The full API specification for this endpoint is available in the [documentation index](https://docs.0xinsider.com/llms.txt).


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