# set-take (/docs/tx/set-take)

The delegate take is the fraction of staking emissions a delegate hotkey
keeps before distributing the rest to its nominators. This is sugar over
the chain's directional `increase_take` / `decrease_take`: it reads the
current take and dispatches whichever call moves it to `take`, so you do
not need to know the current value. Signed by the coldkey that owns the
hotkey. If the move is upward it inherits the increase path's constraints
(take maximum and rate limit on increases).

| Signer    | Origin                                 | Pallet          | Wraps                                                                                                                                                                                        |
| --------- | -------------------------------------- | --------------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| `coldkey` | signed account (pallet role may apply) | SubtensorModule | [`SubtensorModule.increase_take`](/code/pallets/subtensor/src/macros/dispatches.rs#L523-L531), [`SubtensorModule.decrease_take`](/code/pallets/subtensor/src/macros/dispatches.rs#L490-L498) |

## Parameters [#parameters]

| Parameter     | Type                        | Required | Description                                                                                                                               |
| ------------- | --------------------------- | -------- | ----------------------------------------------------------------------------------------------------------------------------------------- |
| `take`        | integer \| number \| string | yes      | New take: a 0..1 fraction (e.g. 0.18 for 18 percent) or the raw u16 proportion (0..65535). The chain enforces its configured take bounds. |
| `hotkey_ss58` | string                      | no       | Hotkey the operation applies to.                                                                                                          |

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 set-take \
  --take <value> --dry-run
btcli tx set-take \
  --take <value> -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.SetTake(take="...")

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("set_take", {...}, wallet)
```

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

`SubtensorModule.increase_take` — [`pallets/subtensor/src/macros/dispatches.rs#L525`](/code/pallets/subtensor/src/macros/dispatches.rs#L523-L531):

```rust
#[pallet::call_index(66)]
#[pallet::weight((<T as crate::pallet::Config>::WeightInfo::increase_take(), DispatchClass::Normal, Pays::Yes))]
pub fn increase_take(
    origin: OriginFor<T>,
    hotkey: T::AccountId,
    take: PerU16,
) -> DispatchResult {
    Self::do_increase_take(origin, hotkey, take)
}
```

Delegates to [`do_increase_take`](/code/pallets/subtensor/src/staking/increase_take.rs#L27).

`SubtensorModule.decrease_take` — [`pallets/subtensor/src/macros/dispatches.rs#L492`](/code/pallets/subtensor/src/macros/dispatches.rs#L490-L498):

```rust
#[pallet::call_index(65)]
#[pallet::weight((<T as crate::pallet::Config>::WeightInfo::decrease_take(), DispatchClass::Normal, Pays::Yes))]
pub fn decrease_take(
    origin: OriginFor<T>,
    hotkey: T::AccountId,
    take: PerU16,
) -> DispatchResult {
    Self::do_decrease_take(origin, hotkey, take)
}
```

Delegates to [`do_decrease_take`](/code/pallets/subtensor/src/staking/decrease_take.rs#L25).

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)).
