---
title: "List published commit-ledger batches, newest first"
method: GET
path: "/ledger/batches"
tags: ["Ledger"]
---

# List published commit-ledger batches, newest first

`GET /ledger/batches`

## Request

- Base URL: `https://kellian.app/api/v1`
- URL: `https://kellian.app/api/v1/ledger/batches`
- Auth: none required

## Query parameters

- `cursor` string: Opaque continuation: the `nextCursor` from a previous page. Batches are returned newest first.
- `limit` integer
- `txHash` string: Return only the batch published by this Base transaction (case-insensitive). At most one batch matches; `nextCursor` is null and `cursor` is ignored.

## Response `200`

Success

- LedgerBatchListResponse
  - `batches` LedgerBatchRecord[], required
    - `nonce` string, required: The contract's own strictly-sequential batch counter, as a decimal string (uint64 on chain).
    - `chainId` integer, required: Compiled protocol release chain ID (Base 8453).
    - `state` 'claimed' | 'committed' | 'finalized', required: `claimed` = the batch is built and its fills are bound to it, but the transaction is not mined yet (no `txHash`). `committed` = mined. `finalized` = its block reached finality on Base.
    - `prevRoot` string, required: The root this batch chains FROM. It must equal the root the contract already held, which is what makes the published history unrewritable.
    - `newRoot` string, required: Merkle root over every non-zero balance in the ledger after this batch. Recomputable from the published journal payloads alone.
    - `txHash` string, nullable, required: Base transaction that published this batch. Null while the batch is `claimed`.
    - `blockNumber` string, nullable, required: Block the batch transaction was mined in, as a decimal string. Null until it is mined.
    - `matchCount` integer, required: Fills published in this batch.
    - `creditCount` integer, required: Original movement legs for journal batches; legacy rows count net collateral credits.
    - `eventsEmitted` boolean, required: Journal batches always emit their complete payload. On legacy batches this field indicates per-fill ERC-1155 transfer events.
    - `journal` object
      - `version` 1, required
      - `payloadHash` string, required
      - `commitment` string, required
      - `previousCommitment` string, required
      - `historicalSupplement` boolean, required
      - `publicationLogIndex` integer, nullable, required
      - `publicationBlockHash` string, nullable: Hash of the block the publishing transaction was mined in, as the venue bound it. Compare with the receipt before trusting `blockNumber`.
      - `publicationTransactionIndex` integer, nullable: Position of the publishing transaction inside its block.
      - `encodedPayload` string: Complete public PMJ5 bytes; included by the single-batch endpoint.
    - `committedAt` string, date-time, nullable, required
    - `finalizedAt` string, date-time, nullable, required
    - `createdAt` string, date-time, required
    - `explorerTxUrl` string, uri: The batch transaction on the chain's configured block explorer.
  - `nextCursor` string, nullable, required

## Other responses

- `400`: Error: one of INVALID_QUERY
- `500`: Error: one of INTERNAL_ERROR
- `default`: Error response (RFC 9457 Problem Details for HTTP APIs)

---

[API](https://skmtc.dev/problee/apis/kellian-consumer-api.md) · [All operations](https://skmtc.dev/problee/apis/kellian-consumer-api/llms.txt) · [OpenAPI document](https://skmtc.dev/problee/apis/kellian-consumer-api/revisions/2b8254b0ec57?raw)
