# most-convicted-hotkey (/docs/query/most-convicted-hotkey)

**Category:** Locks & conviction

## Parameters [#parameters]

| Parameter | Type    | Description      |
| --------- | ------- | ---------------- |
| `netuid`  | integer | Subnet to query. |

## CLI [#cli]

```bash
btcli query most-convicted-hotkey --netuid <integer> --json
```

## Python [#python]

Namespace method (autocomplete, signature help):

```python
import bittensor as bt

sub = bt.Subtensor()
result = sub.locks.most_convicted_hotkey(netuid=1)
```

Or dispatch by name, as an agent would:

```python
result = sub.read("most_convicted_hotkey", netuid=1)
```

Async is the same surface awaited: `async with bt.Subtensor() as client:`.

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

* Runtime API [`StakeInfoRuntimeApi.get_most_convicted_hotkey_on_subnet`](/code/runtime/src/lib.rs#L2342-L2344)

Every file is browsable under [/code](/code) exactly as built into the runtime.
