<!-- source: https://secondlayer.tools/docs/api-reference#list-reorgs -->

## Chain reorg history

`GET /v1/streams/reorgs`

Reorgs the indexer recorded, oldest first. Page forward by passing `next_since` back as `since`.

### Filters

| Name | Type | Description |
| --- | --- | --- |
| `chain` | enum | `stacks` (default) is the existing Stacks feed, byte-identical to before. `bitcoin` serves Runes events (rune_etch, rune_mint, rune_transfer, rune_burn — see the RuneStreamsEvent schema) on their own cursor space: a bitcoin cursor only resumes with chain=bitcoin. Stacks-only filters (contract_id, sender, recipient, asset_identifier, filters, clock) 400 on chain=bitcoin; rune and address are bitcoin-only. Values: `stacks`, `bitcoin`. |
| `since` | string, required | Where to start. An ISO timestamp returns reorgs detected after it. A `<block_height>:<event_index>` cursor returns reorgs whose orphaned range ends at or after it. A `next_since` value (`<detected_at>~<id>`) resumes after the last reorg delivered. |

### Range and paging

| Name | Type | Description |
| --- | --- | --- |
| `limit` | integer · 1 to 1000 | Reorgs per page. Default 100. Values above 1000 are clamped to 1000. |

### Returns

A cursor envelope; `reorgs` holds `Reorg` objects.

### Responses

- `200` Reorgs, oldest first
- `400` `since` is missing or is not a timestamp, cursor or `next_since` value, or `limit` is not a positive integer
- `401` This bind requires the instance token, and it was missing or wrong
- `429` Rate limited on the hosted API (50/s per IP without a key, 10/s on a free key). Self-hosted instances do not throttle Streams. Retry after `Retry-After` seconds

### Example

```bash
curl -G https://api.secondlayer.tools/v1/streams/reorgs \
  -H "Authorization: Bearer $SECONDLAYER_API_KEY" \
  -d since=2026-09-01T00:00:00Z
```

```json
{
  "reorgs": [
    {
      "id": "3f16c2c5-9551-4ae9-adb0-923668e5c65e",
      "detected_at": "2026-09-15T15:39:38.129468Z",
      "fork_point_height": 8996511,
      "old_index_block_hash": "0x45ba0195071488eda13afa66d8ce8612558a739f781be5a032d96332797c4174",
      "new_index_block_hash": "0xa686ff58e7c5ccb26c850a7eaffa7e7274fcbc081c706344eb6f1e1446023df0",
      "orphaned_range": {
        "from": "8996511:0",
        "to": "8996512:2701"
      },
      "new_canonical_tip": "8996511:0"
    }
  ],
  "next_since": "2026-09-15T15:39:38.129468Z~3f16c2c5-9551-4ae9-adb0-923668e5c65e"
}
```
