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

# Get Index Status

> Check how far the historical index trails the chain

Reports whether the market has indexed history and how far behind the chain the index currently sits. Use it to decide whether [Get Market History](/endpoints/external-securities-lending/get-history) is trustworthy before charting it, and to tell "no activity" apart from "not indexed yet".

Like the history endpoint, an indexing outage returns `200` with `available: false` rather than an error.

## Path Parameters

<ParamField path="marketId" type="string" required>Market ID.</ParamField>

## Response Fields

<ResponseField name="data" type="object">
  <Expandable>
    <ResponseField name="marketId" type="string">Market ID.</ResponseField>
    <ResponseField name="available" type="boolean">Whether the index could be reached. When `false`, only `reason` and `message` accompany it.</ResponseField>
    <ResponseField name="indexed" type="boolean">Whether this market has at least one snapshot.</ResponseField>
    <ResponseField name="snapshotCount" type="integer">Snapshots recorded for this market.</ResponseField>
    <ResponseField name="lastSnapshotBlock" type="integer">Block of the most recent snapshot, or `0`.</ResponseField>
    <ResponseField name="lastSnapshotAt" type="string">ISO 8601 timestamp of the most recent snapshot, or null.</ResponseField>
    <ResponseField name="indexedBlock" type="integer">Latest block the indexer has processed, or null.</ResponseField>
    <ResponseField name="indexedAt" type="string">ISO 8601 timestamp of that block, or null.</ResponseField>
    <ResponseField name="hasIndexingErrors" type="boolean">Whether the indexer reports errors on this deployment.</ResponseField>
    <ResponseField name="reason" type="string">Present when `available` is false. One of `NOT_CONFIGURED`, `NO_MARKET_ADDRESS`, `INDEX_STALE`, `INDEXING_ERRORS`, `UPSTREAM_ERROR`, `QUERY_ERROR`, `EMPTY_RESPONSE`.</ResponseField>
    <ResponseField name="message" type="string">Human-readable explanation accompanying `reason`.</ResponseField>
  </Expandable>
</ResponseField>

<RequestExample>
  ```bash cURL theme={null}
  curl "https://api.trusset.org/lending-external-securities/api/markets/{marketId}/index-status" \
    -H "X-API-Key: trusset_your_key_here"
  ```
</RequestExample>

<ResponseExample>
  ```json Response theme={null}
  {
    "success": true,
    "data": {
      "marketId": "clx_secmarket_001",
      "available": true,
      "indexed": true,
      "snapshotCount": 412,
      "lastSnapshotBlock": 8412774,
      "lastSnapshotAt": "2025-06-15T11:00:00.000Z",
      "indexedBlock": 8412791,
      "indexedAt": "2025-06-15T11:03:24.000Z",
      "hasIndexingErrors": false
    }
  }
  ```

  ```json Response - Unavailable theme={null}
  {
    "success": true,
    "data": {
      "marketId": "clx_secmarket_001",
      "available": false,
      "reason": "NOT_CONFIGURED",
      "message": "Historical indexing is not configured for this network"
    }
  }
  ```
</ResponseExample>

## Error Codes

| Code               | HTTP  | Cause                                   |
| ------------------ | ----- | --------------------------------------- |
| `MARKET_NOT_FOUND` | `404` | No market with this ID on your instance |
