# Get Accounts Pending Coldkey Swaps

All pending (announced, not-yet-executed) coldkey swaps, read live from chain.

_Source: https://beta.taostats.io/docs/new/accounts/get-accounts-pending-coldkey-swaps_

_Last reviewed: 2026-10-07_

```http
GET https://api.taostats.io/v1/accounts/pending-coldkey-swaps
```

Requires an API key in the `Authorization` header.

All pending (announced, not-yet-executed) coldkey swaps, read live from chain.

## Try it

Try this request in the browser on the HTML version of this page, or use the code samples below.

### Code samples

**cURL**

```bash
curl -H "Authorization: <YOUR_API_KEY>" \
  "https://api.taostats.io/v1/accounts/pending-coldkey-swaps"
```

**JavaScript**

```js
const response = await fetch('https://api.taostats.io/v1/accounts/pending-coldkey-swaps', {
  headers: {
    Authorization: '<YOUR_API_KEY>',
  },
});
const data = await response.json();
```

**Python**

```python
import requests

response = requests.get(
    "https://api.taostats.io/v1/accounts/pending-coldkey-swaps",
    headers={"Authorization": "<YOUR_API_KEY>"},
)
data = response.json()
```

## Parameters

_No parameters._

## Responses

### `200` — All pending coldkey swaps

| Field | Type | Required | Description |
| --- | --- | --- | --- |
| `data` | `array` | Yes |  |
| `data[].block_number` | `integer (int32)` | Yes | Block the swap was *requested* (announced), recovered as `execution_block − ColdkeySwapAnnouncementDelay` (the chain stores only the execution block `when = request + delay`). |
| `data[].disputed` | `boolean` | Yes | Whether this swap is currently *disputed* — i.e. the announcer's coldkey is present in `SubtensorModule::ColdkeySwapDisputes`. A disputed swap is frozen (it cannot execute until the triumvirate resolves it) but remains genuinely pending, so it is flagged here, never excluded. |
| `data[].disputed_block_number` | `integer (int32), nullable` | Yes | Block the dispute was raised (`ColdkeySwapDisputes` value), or `null` when the swap is not disputed. |
| `data[].execution_block_number` | `integer (int32)` | Yes | Earliest block the swap can execute (`when`), read verbatim from chain storage. The swap does not auto-execute at this height — it becomes executable from here on, so this may already be at or below the head. |
| `data[].new_coldkey` | `string, nullable` | Yes | New coldkey (SS58). Always `null` while pending: only its hash is committed on-chain until the swap is revealed/executed. |
| `data[].new_coldkey_hash` | `string, nullable` | Yes | Hash of the new coldkey (0x-hex), as committed in the announcement. |
| `data[].old_coldkey` | `string` | Yes | Current (old) coldkey (SS58) — the announcer. |
| `data[].predicted_execution_timestamp` | `string` | Yes | Earliest-execution time (ISO 8601) for `execution_block_number`. Once that block has been produced and indexed this is its real `block_v1` timestamp — the moment the swap became executable — and it agrees with `/v1/blocks`. While the block is still ahead of the chain the time genuinely is not known yet, and only then is it projected as head time + (when − head) × 12s. That remaining projection is what the `predicted_` in the field name refers to. |
| `data[].timestamp` | `string` | Yes | Request time (ISO 8601): the real chain timestamp of `block_number`, read from `block_v1`, so it agrees exactly with what `/v1/blocks` serves for that block. The request block is always in the past — it is recovered from an announcement the chain has already accepted — so there is nothing here to predict. |
| `pagination` | `object` | Yes | Pagination metadata appended to collection responses. `next_page` / `prev_page` are explicitly required+nullable in the OpenAPI spec: per `docs/api_standards.md` we emit `null` rather than omitting the field, so the SDK should model them as `Option`/nullable types that are always present in the response. **`total_items` is the exact number of matching rows** on every route (issue #992). It used to stop at 1,000,000, which reported a million transfers when finney holds 7,513,252 and a million events when the real figure is 981,179,110; the cap was removed on 29 Sep 2026 and nothing may reintroduce one — `crate::pagination::exact_count_sql` is the only count form, and `no_capped_count_reaches_the_api_surface` in `data-debug-scripts` fails the build if a capped one comes back. **`total_pages` is still bounded**, to `crate::pagination::max_reachable_page(per_page)`, because the `page` parameter is capped to a 1,000,000-row window: deep `OFFSET` paging reads every skipped row (24.7M rows / 36.6 GiB / 42 s measured on one endpoint, issue #413). So `total_pages` is exactly the last page this API will serve and `next_page` / `prev_page` stay coherent at the window edge, while `total_items` tells the caller how many rows there really are. History beyond the window is reached with each endpoint's range filters, not a larger `page`. |
| `pagination.current_page` | `integer (int32)` | Yes | 1-indexed page that produced the rows in `data`. |
| `pagination.next_page` | `integer (int32), nullable` | Yes | Next page number, or `null` if this is the last page. |
| `pagination.per_page` | `integer (int32)` | Yes | Number of items requested per page. |
| `pagination.prev_page` | `integer (int32), nullable` | Yes | Previous page number, or `null` if this is the first page. |
| `pagination.total_items` | `integer (int64)` | Yes | Number of items matching the query across all pages. This is the exact count — every matching row, however many there are. It is not bounded by `total_pages`, so a listing can legitimately report far more items than `total_pages × per_page`. |
| `pagination.total_pages` | `integer (int32)` | Yes | Number of pages at the current `per_page` that this API will serve: `ceil(total_items / per_page)`, capped at `ceil(1000000 / per_page)` because the `page` parameter only reaches into the first 1,000,000 rows. When the cap bites, `total_items` is still the true total and this is the last page a request can ask for; reach deeper history with the endpoint's range filters instead of a larger `page`. |

### `500` — Internal/chain error

| Field | Type | Required | Description |
| --- | --- | --- | --- |
| `message` | `string` | Yes | Plain-english message describing the failure from the caller's perspective. |
| `status_code` | `integer (int32)` | Yes | HTTP status code (mirrored in the response status line for convenience). |

### `503` — The chain node's answer for the swap maps could not be verified, even after one retry; the message names the map

| Field | Type | Required | Description |
| --- | --- | --- | --- |
| `message` | `string` | Yes | Plain-english message describing the failure from the caller's perspective. |
| `status_code` | `integer (int32)` | Yes | HTTP status code (mirrored in the response status line for convenience). |

Every request needs an `Authorization` header holding your API key — see [Getting started with the Taostats API](https://beta.taostats.io/docs/start-here/getting-started-with-taostats-api).
