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

## PoX-4 stacking actions

`GET /v1/index/stacking`

Decoded PoX-4 contract calls (`stack-stx`, `delegate-stx`, `stack-aggregation-commit-indexed`, …), one row per call, oldest first. Pages on `<block_height>:<tx_index>`. With no cursor or `from_height`, the read covers the last day. PoX-4 stopped at the epoch 4.0 fork, so read history with `from_height` and use `/v1/index/pox5/events` for what came after.

### Filters

| Name | Type | Description |
| --- | --- | --- |
| `function_name` | string | PoX-4 function name, e.g. `stack-stx` or `delegate-stack-stx`. Exact match. |
| `stacker` | string | Stacker principal named in the call. Exact match. Solo `stack-stx` calls leave it null, so filter those by `caller`. |
| `caller` | string | Transaction sender. Exact match. |

### Range and paging

| Name | Type | Description |
| --- | --- | --- |
| `limit` | integer · 1 to 1000 | Page size; capped at 1000. |
| `cursor` | string | `<block_height>:<tx_index>` from a previous page's `next_cursor`. Resumes after it. |
| `from_cursor` | string | Same as `cursor`. Mutually exclusive with it and with `from_height`. |
| `from_height` | integer | First block height to read. Mutually exclusive with a cursor. With neither, the read starts one day behind the tip. |
| `to_height` | integer | Last block height to read, inclusive. |

### Returns

A cursor envelope; `stacking` holds `StackingAction` objects.

### Responses

- `200` Cursor-paginated envelope
- `304` The page is past finality and matches your `If-None-Match` ETag.
- `400` A parameter, filter, cursor or body field was refused; `code` says which
- `401` This bind requires the instance token, and it was missing or wrong
- `429` Rate limited; retry after `Retry-After` seconds

### Example

```bash
curl https://api.secondlayer.tools/v1/index/stacking \
  -H "Authorization: Bearer $SECONDLAYER_API_KEY"
```

```json
{
  "stacking": [
    {
      "cursor": "8647822:1",
      "block_height": 8647822,
      "block_time": "2026-07-27T18:39:09.000Z",
      "burn_block_height": 959869,
      "tx_id": "0x995fb653065c74596b63e6cc9c10fb8fa7b8f3574d5ea089b45d3e11d9e7336e",
      "tx_index": 1,
      "function_name": "stack-stx",
      "caller": "SP14S259H3AC9PXWJ8EVX9ER5NZ58R03GR4QAKHCB",
      "stacker": null,
      "delegate_to": null,
      "amount_ustx": "4491100000000",
      "lock_period": 1,
      "pox_addr": {
        "version": 6,
        "hashbytes": "0x6f0fbc92d6ad56a9d7783b7420ae6731434831e3484d82ad54afe32d7fc7ad6d",
        "btc": "bc1pdu8meykk44t2n4mc8d6zptn8x9p5sv0rfpxc9t254l3j6l7844ksz4jjcs"
      },
      "start_cycle": 139,
      "end_cycle": 139,
      "reward_cycle": null,
      "signer_key": "0x031b91a32ab90b80d40715e8875fb3dfe996aa1e6f5e62ba05d34542aa58ad43b5",
      "result_ok": true
    }
  ],
  "next_cursor": "7960000:42",
  "tip": {
    "block_height": 9048690,
    "finalized_height": 9048457,
    "lag_seconds": 4,
    "source_block_height": 9048692
  },
  "reorgs": [
    {
      "id": "3f16c2c5-9551-4ae9-adb0-923668e5c65e",
      "detected_at": "2026-09-15T15:39:38.129Z",
      "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"
    }
  ]
}
```
