# Blocks and transactions

Source: https://www.solscanner.app/docs/indexer/reference/chain

> Blocks, transactions, receipts, logs, decoded logs and calldata, and internal transfers.

The raw substrate. Transaction envelopes and receipts are byte-exact canonical records. Decoded views resolve where a decoder exists and report the rest as unknown rather than omitting them. Internal transfers come from node re-execution and are the one data class not verifiable against a block root.

13 routes. Every path below is served under `/index/v1/{chain}`, and every request carries an `x-api-key` header, so those two are not repeated per route. The shared contract for pagination, snapshots, precision and absence is in [Read API](/docs/indexer/api).

Block [#block]

```http
GET /blocks/{number}
```

Canonical block header.

| Parameter | In   | Required | Notes                   |
| --------- | ---- | -------- | ----------------------- |
| `number`  | path | yes      | Canonical block number. |

Block Logs [#block-logs]

```http
GET /blocks/{number}/logs
```

Logs emitted in a block.

| Parameter | In    | Required | Notes                                                                                                                                                                                                                           |
| --------- | ----- | -------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| `number`  | path  | yes      | Canonical block number.                                                                                                                                                                                                         |
| `cursor`  | query | no       | Opaque page cursor. See [Pagination](/docs/indexer/api).                                                                                                                                                                        |
| `limit`   | query | no       | Page row cap. See [Pagination](/docs/indexer/api) for the shared contract; the exact default and maximum for this route are on the schema.                                                                                      |
| `order`   | query | no       | Sort direction: this route's accepted values and default are on the schema (`enum`/`default`); a route whose backing index has no reverse walk accepts only `asc`. See [Pagination](/docs/indexer/api) for the shared contract. |

Block Logs Decoded [#block-logs-decoded]

```http
GET /blocks/{number}/logs/decoded
```

The same logs, decoded where a decoder resolves. Unresolved logs are reported as unknown.

| Parameter | In    | Required | Notes                                                                                                                                                                                                                           |
| --------- | ----- | -------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| `number`  | path  | yes      | Canonical block number.                                                                                                                                                                                                         |
| `cursor`  | query | no       | Opaque page cursor. See [Pagination](/docs/indexer/api).                                                                                                                                                                        |
| `limit`   | query | no       | Page row cap. See [Pagination](/docs/indexer/api) for the shared contract; the exact default and maximum for this route are on the schema.                                                                                      |
| `order`   | query | no       | Sort direction: this route's accepted values and default are on the schema (`enum`/`default`); a route whose backing index has no reverse walk accepts only `asc`. See [Pagination](/docs/indexer/api) for the shared contract. |

Block Transactions [#block-transactions]

```http
GET /blocks/{number}/transactions
```

Transactions in a block.

| Parameter | In    | Required | Notes                                                                                                                                                                                                                           |
| --------- | ----- | -------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| `number`  | path  | yes      | Canonical block number.                                                                                                                                                                                                         |
| `cursor`  | query | no       | Opaque page cursor. See [Pagination](/docs/indexer/api).                                                                                                                                                                        |
| `limit`   | query | no       | Page row cap. See [Pagination](/docs/indexer/api) for the shared contract; the exact default and maximum for this route are on the schema.                                                                                      |
| `order`   | query | no       | Sort direction: this route's accepted values and default are on the schema (`enum`/`default`); a route whose backing index has no reverse walk accepts only `asc`. See [Pagination](/docs/indexer/api) for the shared contract. |

Block At [#block-at]

```http
GET /blocks/at
```

Timestamp-to-block: both named bounds of a timestamp against one snapshot.

| Parameter   | In    | Required | Notes                                                                                                                                       |
| ----------- | ----- | -------- | ------------------------------------------------------------------------------------------------------------------------------------------- |
| `timestamp` | query | yes      | `timestamp` is required and is Unix seconds; there is no default, because defaulting an instant would silently answer a different question. |

Block By Hash [#block-by-hash]

```http
GET /blocks/by-hash/{hash}
```

Block header by hash.

| Parameter | In   | Required | Notes                         |
| --------- | ---- | -------- | ----------------------------- |
| `hash`    | path | yes      | 0x-prefixed 32-byte hex hash. |

Transaction [#transaction]

```http
GET /transactions/{hash}
```

Transaction envelope, byte-exact. Plus `from`/`to`/`value` from the transaction-origin sidecar (`from: null` with `fromReason: coverage_unavailable | outside_coverage | unrecoverable` when it cannot answer) and `originCoverage`.

| Parameter | In   | Required | Notes                         |
| --------- | ---- | -------- | ----------------------------- |
| `hash`    | path | yes      | 0x-prefixed 32-byte hex hash. |

Transaction Call Tree [#transaction-call-tree]

```http
GET /transactions/{hash}/calls/decoded
```

The transaction's decoded call tree: ordered frames carrying ordinal, parent, depth, kind, from, to, value, decoded calldata, output, and revert state. Frames are the tracer's actual frames, not inferred from hooks, and a delegate frame's value is the tracer quantity rather than a claim that value moved.

Coverage is explicit: a transaction with no retained call tree answers `coverage: not_available` with a reason rather than an empty frame list. Like every trace-derived route, this is built from node re-execution and is not verifiable against a block root.

| Parameter | In    | Required | Notes                                     |
| --------- | ----- | -------- | ----------------------------------------- |
| `hash`    | path  | yes      | 0x-prefixed 32-byte transaction hash.     |
| `cursor`  | query | no       | Opaque page cursor over call frames.      |
| `limit`   | query | no       | Frames per page, 1 to 64. Defaults to 32. |

Transaction Decoded [#transaction-decoded]

```http
GET /transactions/{hash}/decoded
```

Decoded calldata for the transaction, from hand-written decoders and verified-ABI bindings.

| Parameter | In   | Required | Notes                         |
| --------- | ---- | -------- | ----------------------------- |
| `hash`    | path | yes      | 0x-prefixed 32-byte hex hash. |

Transaction Internal Transfers [#transaction-internal-transfers]

```http
GET /transactions/{hash}/internal
```

Retained internal value transfers and contract creations, with per-transaction retention and reconciliation state.

| Parameter | In    | Required | Notes                                                                                                                                                                                                                           |
| --------- | ----- | -------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| `hash`    | path  | yes      | 0x-prefixed 32-byte hex hash.                                                                                                                                                                                                   |
| `cursor`  | query | no       | Opaque page cursor. See [Pagination](/docs/indexer/api).                                                                                                                                                                        |
| `limit`   | query | no       | Page row cap. See [Pagination](/docs/indexer/api) for the shared contract; the exact default and maximum for this route are on the schema.                                                                                      |
| `order`   | query | no       | Sort direction: this route's accepted values and default are on the schema (`enum`/`default`); a route whose backing index has no reverse walk accepts only `asc`. See [Pagination](/docs/indexer/api) for the shared contract. |

Transaction Logs [#transaction-logs]

```http
GET /transactions/{hash}/logs
```

Logs for one transaction.

| Parameter | In    | Required | Notes                                                                                                                                                                                                                           |
| --------- | ----- | -------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| `hash`    | path  | yes      | 0x-prefixed 32-byte hex hash.                                                                                                                                                                                                   |
| `cursor`  | query | no       | Opaque page cursor. See [Pagination](/docs/indexer/api).                                                                                                                                                                        |
| `limit`   | query | no       | Page row cap. See [Pagination](/docs/indexer/api) for the shared contract; the exact default and maximum for this route are on the schema.                                                                                      |
| `order`   | query | no       | Sort direction: this route's accepted values and default are on the schema (`enum`/`default`); a route whose backing index has no reverse walk accepts only `asc`. See [Pagination](/docs/indexer/api) for the shared contract. |

Transaction Logs Decoded [#transaction-logs-decoded]

```http
GET /transactions/{hash}/logs/decoded
```

Decoded logs for one transaction.

| Parameter | In    | Required | Notes                                                                                                                                                                                                                           |
| --------- | ----- | -------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| `hash`    | path  | yes      | 0x-prefixed 32-byte hex hash.                                                                                                                                                                                                   |
| `cursor`  | query | no       | Opaque page cursor. See [Pagination](/docs/indexer/api).                                                                                                                                                                        |
| `limit`   | query | no       | Page row cap. See [Pagination](/docs/indexer/api) for the shared contract; the exact default and maximum for this route are on the schema.                                                                                      |
| `order`   | query | no       | Sort direction: this route's accepted values and default are on the schema (`enum`/`default`); a route whose backing index has no reverse walk accepts only `asc`. See [Pagination](/docs/indexer/api) for the shared contract. |

Receipt [#receipt]

```http
GET /transactions/{hash}/receipt
```

Receipt including chain-specific L1 gas accounting.

| Parameter | In   | Required | Notes                         |
| --------- | ---- | -------- | ----------------------------- |
| `hash`    | path | yes      | 0x-prefixed 32-byte hex hash. |
