# transfer (/docs/tx/transfer)

Sends free balance from the signing coldkey to the destination. On-chain
transfers are irreversible — funds sent to a wrong address cannot be
recovered, so double-check the destination. A transaction fee is deducted
from the sender on top of the amount, and the call fails if the free
balance cannot cover both. Pass `all` to sweep the entire transferable
balance. With `keep_alive` (the default) the transfer refuses to drop
the sender below the existential deposit; disable it only when
intentionally emptying the account.

| Signer    | Origin                                 | Pallet   | Wraps                                                                                    |
| --------- | -------------------------------------- | -------- | ---------------------------------------------------------------------------------------- |
| `coldkey` | signed account (pallet role may apply) | Balances | `Balances.transfer_keep_alive`, `Balances.transfer_allow_death`, `Balances.transfer_all` |

## Parameters [#parameters]

| Parameter    | Type              | Required | Description                                                                                                                                  |
| ------------ | ----------------- | -------- | -------------------------------------------------------------------------------------------------------------------------------------------- |
| `dest_ss58`  | string            | yes      | Account the funds are sent to.                                                                                                               |
| `amount_tao` | number \| `"all"` | yes      | How much to send.                                                                                                                            |
| `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 \
  --dest <ss58|name> \
  --amount-tao <amount|all> --dry-run
btcli tx transfer \
  --dest <ss58|name> \
  --amount-tao <amount|all> -w my_coldkey
```

## Python [#python]

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

wallet = Wallet(name="my_coldkey", hotkey="my_hotkey")
intent = bt.Transfer(dest_ss58="5F...", amount_tao=1.0)

sub = bt.Subtensor()
plan = sub.plan(intent, wallet)   # fee, effects, policy — no submission
result = sub.execute(intent, wallet)
if not result.success:
    print(result.error.code, result.error.remediation)
```

(`bt.Subtensor` is also the async client — `async with bt.Subtensor() as client:`
— see [The client](/docs/concepts/client).) Or build the intent by op name, as
an agent would:

```python
result = sub.execute_tool("transfer", {...}, wallet)
```

## On-chain implementation [#on-chain-implementation]

`Balances.transfer_keep_alive` is implemented by Substrate's `pallet_balances`, outside this repository's pallets.

`Balances.transfer_allow_death` is implemented by Substrate's `pallet_balances`, outside this repository's pallets.

`Balances.transfer_all` is implemented by Substrate's `pallet_balances`, outside this repository's pallets.

Every file is browsable under [/code](/code) exactly as built into the runtime, or as plain text under `/code/raw/<path>` (index: [`/code/index.json`](/code/index.json)).
