# Queries (/docs/query)

Reads are free, unsigned, and safe to call at any time. Each CLI command is `btcli query <name>` (add `--json` for machine-readable output); in Python use `await client.read("<name>", ...)`. The machine-readable catalog is at [`/catalog/reads.json`](/catalog/reads.json) or via `sub.reads.list_reads()`.

## Accounts & keys [#accounts--keys]

| Query                                                                | Summary                                                                                 |
| -------------------------------------------------------------------- | --------------------------------------------------------------------------------------- |
| [`balance`](/docs/query/balance)                                     | Free TAO balance of a coldkey address.                                                  |
| [`balances`](/docs/query/balances)                                   | Free TAO balance for several coldkey addresses in one batched request.                  |
| [`coldkey-swap-announcement`](/docs/query/coldkey-swap-announcement) | A coldkey's pending swap announcement (execute block, new-key hash, disputed), or None. |
| [`existential-deposit`](/docs/query/existential-deposit)             | Minimum balance an account must keep to stay alive.                                     |
| [`multisig`](/docs/query/multisig)                                   | A pending multisig operation (opening timepoint, approvals, depositor), or None.        |
| [`proxies`](/docs/query/proxies)                                     | Proxy delegations of an account: who may sign on its behalf, and the reserved deposit.  |

## Chain [#chain]

| Query                                                    | Summary                                                                              |
| -------------------------------------------------------- | ------------------------------------------------------------------------------------ |
| [`block-info`](/docs/query/block-info)                   | A block's hash, timestamp, and extrinsics (as module.function summaries).            |
| [`block-time`](/docs/query/block-time)                   | Seconds per block, detected from the chain (12.0 mainnet, 0.25 fast-blocks).         |
| [`is-fast-blocks`](/docs/query/is-fast-blocks)           | Whether the chain runs fast blocks (0.25s slots, local/e2e testing mode).            |
| [`mev-shield-next-key`](/docs/query/mev-shield-next-key) | The MEV Shield ML-KEM-768 public key (0x-hex) used to encrypt shielded txs, or None. |
| [`timestamp`](/docs/query/timestamp)                     | Current chain time (from the Timestamp pallet) and the block it was read at.         |
| [`tx-rate-limit`](/docs/query/tx-rate-limit)             | Global transaction rate limit in blocks.                                             |

## Delegation [#delegation]

| Query                                              | Summary                                                                         |
| -------------------------------------------------- | ------------------------------------------------------------------------------- |
| [`children`](/docs/query/children)                 | Child hotkeys of a parent on a subnet, as (proportion, child\_ss58) pairs.      |
| [`delegate`](/docs/query/delegate)                 | Delegate info for one hotkey, or None if it is not a delegate.                  |
| [`delegate-take`](/docs/query/delegate-take)       | A hotkey's delegate take (emission fraction it keeps) with the allowed min/max. |
| [`delegated`](/docs/query/delegated)               | Every nomination a coldkey holds: (delegate, netuid, stake) per position.       |
| [`delegates`](/docs/query/delegates)               | Every delegate hotkey on the network, with take and registrations.              |
| [`is-delegate`](/docs/query/is-delegate)           | Whether a hotkey is a delegate.                                                 |
| [`parents`](/docs/query/parents)                   | Parent hotkeys of a child on a subnet, as (proportion, parent\_ss58) pairs.     |
| [`pending-children`](/docs/query/pending-children) | Proposed child hotkeys of a parent still in cooldown, and when they apply.      |

## Epochs & timing [#epochs--timing]

| Query                                                              | Summary                                                                            |
| ------------------------------------------------------------------ | ---------------------------------------------------------------------------------- |
| [`blocks-since-last-step`](/docs/query/blocks-since-last-step)     | Blocks since the subnet's last epoch step ran.                                     |
| [`blocks-since-last-update`](/docs/query/blocks-since-last-update) | Blocks since a neuron last set or committed weights on a subnet                    |
| [`blocks-until-next-epoch`](/docs/query/blocks-until-next-epoch)   | Blocks until the subnet's next epoch fires, or None if tempo is 0.                 |
| [`epoch-status`](/docs/query/epoch-status)                         | Where a subnet is in its epoch cycle, in one block-pinned read.                    |
| [`next-epoch-start-block`](/docs/query/next-epoch-start-block)     | Block at which the subnet's next epoch is expected to fire, or None if tempo is 0. |

## Hyperparameters [#hyperparameters]

| Query                                                    | Summary                                                                                                                                                                                                      |
| -------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ |
| [`difficulty`](/docs/query/difficulty)                   | Current PoW registration difficulty for a subnet.                                                                                                                                                            |
| [`immunity-period`](/docs/query/immunity-period)         | Blocks a newly registered neuron is immune from deregistration.                                                                                                                                              |
| [`max-weight-limit`](/docs/query/max-weight-limit)       | Normalized-fraction cap on any single weight: after the chain normalizes the submitted vector, no weight may exceed max\_weight\_limit/65535 of the total. Not a raw u16 ceiling per weight.                 |
| [`min-allowed-weights`](/docs/query/min-allowed-weights) | Minimum number of weights a validator must set on a subnet. A pure self-weight (a single entry pointing at the caller's own uid) bypasses the minimum, and the subnet owner bypasses validator-permit rules. |
| [`reveal-period`](/docs/query/reveal-period)             | Commit-reveal reveal window, in epochs, for a subnet.                                                                                                                                                        |
| [`weights-rate-limit`](/docs/query/weights-rate-limit)   | Blocks a hotkey must wait between weight sets on a subnet.                                                                                                                                                   |

## Identity & commitments [#identity--commitments]

| Query                                                    | Summary                                                                                     |
| -------------------------------------------------------- | ------------------------------------------------------------------------------------------- |
| [`commitment`](/docs/query/commitment)                   | The commitment a hotkey has published on a subnet, or None.                                 |
| [`commitments`](/docs/query/commitments)                 | Every commitment on a subnet, newest first: hotkey, uid, content, block, age, reveal state. |
| [`hotkey-identities`](/docs/query/hotkey-identities)     | On-chain identities for hotkeys (via each hotkey's owner coldkey), keyed by hotkey.         |
| [`identity`](/docs/query/identity)                       | The on-chain identity of a coldkey (name, links, description), or None.                     |
| [`revealed-commitment`](/docs/query/revealed-commitment) | The revealed (timelock-decrypted) commitment for a hotkey on a subnet, or None.             |

## Leases & crowdloans [#leases--crowdloans]

| Query                                                          | Summary                                                                                |
| -------------------------------------------------------------- | -------------------------------------------------------------------------------------- |
| [`crowdloan`](/docs/query/crowdloan)                           | A crowdloan's state (creator, deposit, raised, cap, end, target/call), or None.        |
| [`crowdloan-contributors`](/docs/query/crowdloan-contributors) | Contributors and amounts for a crowdloan, with amounts in TAO.                         |
| [`crowdloans`](/docs/query/crowdloans)                         | All crowdloans on chain (id and summary fields).                                       |
| [`lease`](/docs/query/lease)                                   | A subnet lease by id (beneficiary, emissions share, end block, netuid, cost), or None. |
| [`leases`](/docs/query/leases)                                 | Every subnet lease on the network.                                                     |

## Locks & conviction [#locks--conviction]

| Query                                                        | Summary                                                             |
| ------------------------------------------------------------ | ------------------------------------------------------------------- |
| [`coldkey-lock`](/docs/query/coldkey-lock)                   | Lock state for a coldkey on a subnet, or None if no lock exists.    |
| [`hotkey-conviction`](/docs/query/hotkey-conviction)         | Conviction metrics for a hotkey on a subnet.                        |
| [`locks-for-coldkey`](/docs/query/locks-for-coldkey)         | Every lock a coldkey holds (one per subnet), rolled forward to now. |
| [`most-convicted-hotkey`](/docs/query/most-convicted-hotkey) | Hotkey with the highest conviction on a subnet, if any.             |
| [`subnet-convictions`](/docs/query/subnet-convictions)       | Every hotkey with locked stake on a subnet, rolled forward to now.  |

## Neurons & registration [#neurons--registration]

| Query                                                  | Summary                                                                              |
| ------------------------------------------------------ | ------------------------------------------------------------------------------------ |
| [`associated-evm-key`](/docs/query/associated-evm-key) | The EVM address associated with a neuron (by netuid + uid) and the block it was set. |
| [`hotkey-owner`](/docs/query/hotkey-owner)             | The coldkey that owns a hotkey, or None if unowned.                                  |
| [`netuids-for-hotkey`](/docs/query/netuids-for-hotkey) | Every subnet a hotkey is registered on, as a sorted list of netuids.                 |
| [`neurons`](/docs/query/neurons)                       | Every neuron on a subnet in ONE runtime-API call (the metagraph fast path).          |
| [`owned-hotkeys`](/docs/query/owned-hotkeys)           | Every hotkey owned by a coldkey (the reverse of `hotkey_owner`).                     |
| [`uid`](/docs/query/uid)                               | UID of a hotkey on a subnet, or None if not registered there.                        |

## Prices & swaps [#prices--swaps]

| Query                                        | Summary                                                                            |
| -------------------------------------------- | ---------------------------------------------------------------------------------- |
| [`alpha-price`](/docs/query/alpha-price)     | Current spot alpha price for a subnet, as TAO per alpha.                           |
| [`alpha-prices`](/docs/query/alpha-prices)   | Spot alpha price for every subnet, as TAO per alpha keyed by netuid.               |
| [`quote-stake`](/docs/query/quote-stake)     | Simulate staking `amount_tao` TAO into a subnet: alpha out, fee, and slippage.     |
| [`quote-unstake`](/docs/query/quote-unstake) | Simulate unstaking `amount_alpha` alpha from a subnet: TAO out, fee, and slippage. |

## Staking [#staking]

| Query                                                              | Summary                                                                                |
| ------------------------------------------------------------------ | -------------------------------------------------------------------------------------- |
| [`auto-stake`](/docs/query/auto-stake)                             | The hotkey a coldkey auto-stakes its rewards to on a subnet, or None if unset.         |
| [`auto-stake-all`](/docs/query/auto-stake-all)                     | Every auto-stake destination configured for a coldkey.                                 |
| [`root-claim-type`](/docs/query/root-claim-type)                   | How a coldkey claims root alpha emission: Swap, Keep, or KeepSubnets(+subnets).        |
| [`stake`](/docs/query/stake)                                       | Alpha staked by a coldkey to a hotkey on a subnet (TAO when netuid is 0).              |
| [`stake-for-coldkey`](/docs/query/stake-for-coldkey)               | Every stake position held by a coldkey, across all hotkeys and subnets.                |
| [`stake-for-coldkeys`](/docs/query/stake-for-coldkeys)             | Every stake position for several coldkeys at once, in one runtime call.                |
| [`stake-value-for-coldkey`](/docs/query/stake-value-for-coldkey)   | A coldkey's stake marked to TAO at spot prices (excludes slippage/fees), block-pinned. |
| [`stake-value-for-coldkeys`](/docs/query/stake-value-for-coldkeys) | Spot-price stake valuation for several coldkeys at once, at one block.                 |
| [`staking-hotkeys`](/docs/query/staking-hotkeys)                   | Every hotkey a coldkey has stake with, owned or nominated.                             |

## Subnets [#subnets]

| Query                                                              | Summary                                                                             |
| ------------------------------------------------------------------ | ----------------------------------------------------------------------------------- |
| [`burn`](/docs/query/burn)                                         | Current burn (recycle) cost to register on a subnet.                                |
| [`commit-reveal-enabled`](/docs/query/commit-reveal-enabled)       | Whether commit-reveal weights are enabled on a subnet.                              |
| [`mechanism-count`](/docs/query/mechanism-count)                   | Current mechanism count configured for a subnet.                                    |
| [`mechanism-emission-split`](/docs/query/mechanism-emission-split) | Emission split between mechanisms on a subnet.                                      |
| [`metagraph`](/docs/query/metagraph)                               | The full metagraph for a subnet in one call (stakes, ranks, emissions, axons, ...). |
| [`subnet`](/docs/query/subnet)                                     | Tempo, burn, and neuron count for one subnet (the three reads run concurrently).    |
| [`subnet-hyperparameters`](/docs/query/subnet-hyperparameters)     | All hyperparameters for a subnet (named fields; version-dependent set).             |
| [`subnet-identity`](/docs/query/subnet-identity)                   | The identity metadata of a subnet, or None.                                         |
| [`subnet-names`](/docs/query/subnet-names)                         | Registered name of every subnet that published an identity, keyed by netuid.        |
| [`subnet-registration-cost`](/docs/query/subnet-registration-cost) | Current cost to register a new subnet.                                              |
| [`subnet-start-schedule`](/docs/query/subnet-start-schedule)       | When a registered subnet can call `start_call`.                                     |
| [`subnets`](/docs/query/subnets)                                   | Info for every subnet, fetched in four batched map queries rather than              |
| [`token-symbols`](/docs/query/token-symbols)                       | Chain-registered token symbol of every subnet, keyed by netuid.                     |

## Weights & bonds [#weights--bonds]

| Query                                                                | Summary                                                                                   |
| -------------------------------------------------------------------- | ----------------------------------------------------------------------------------------- |
| [`bonds`](/docs/query/bonds)                                         | Validator bond rows as `{validator_uid: {miner_uid: bond}}`, scaled to 0..1.              |
| [`timelocked-weight-commits`](/docs/query/timelocked-weight-commits) | Pending (still-encrypted) commit-reveal weight commits, grouped by epoch.                 |
| [`weights`](/docs/query/weights)                                     | Validator weight rows as `{validator_uid: {miner_uid: fraction}}`, each row summing to 1. |
