# transfer-all (/docs/tx/transfer-all)

Drains the signing coldkey's transferable balance to the destination in
one irreversible call — equivalent to `transfer` with `all` as the
amount. Staked or otherwise reserved funds are not included; unstake first
to move those. A spend-cap policy treats this as an unbounded spend and
blocks it until the cap is raised. With `keep_alive` (the default) the
existential deposit stays behind; disable it to empty and reap the account.

| Signer    | Pallet   | Wraps                   |
| --------- | -------- | ----------------------- |
| `coldkey` | Balances | `Balances.transfer_all` |

## Parameters [#parameters]

| Parameter    | Type    | Required | Description                                                                                                                                  |
| ------------ | ------- | -------- | -------------------------------------------------------------------------------------------------------------------------------------------- |
| `dest_ss58`  | string  | yes      | Account the funds are sent to.                                                                                                               |
| `keep_alive` | boolean | no       | Refuse to drop the sender below the existential deposit. Disable it only when you intend to empty the account, which lets the chain reap it. |

Address parameters (`--hotkey`, `--coldkey`, `--dest`, ...) accept a raw ss58
address, an address-book or proxy-book name, or a local wallet/hotkey name.

## CLI [#cli]

Preview with `--dry-run` (shows fee, effects, and policy result without
submitting), then submit:

```bash
btcli tx transfer-all \
  --dest <ss58|name> --dry-run
btcli tx transfer-all \
  --dest <ss58|name> -w my_coldkey
```

## Python [#python]

```python
import bittensor as sub
from bittensor.wallet import Wallet

wallet = Wallet(name="my_coldkey", hotkey="my_hotkey")
intent = sub.TransferAll(dest_ss58="5F...")

async with sub.Client("finney") as client:
    plan = await client.plan(intent, wallet)   # fee, effects, policy — no submission
    result = await client.execute(intent, wallet)
    if not result.success:
        print(result.error.code, result.error.remediation)
```

Or build it by op name, as an agent would:

```python
await client.execute_tool("transfer_all", {...}, wallet)
```
