Queries
neurons
Every neuron on a subnet in ONE runtime-API call (the metagraph fast path).
lite=true (the default) omits per-neuron weights/bonds, which is far
smaller and what almost every caller wants.
Category: Neurons & registration
Parameters
| Parameter | Type | Description |
|---|---|---|
netuid | integer | Subnet whose neurons to list. |
lite | boolean | Omit per-neuron weights/bonds (much smaller; what most callers want). |
CLI
btcli query neurons --netuid <integer> --lite/--no-lite --jsonPython
Namespace method (autocomplete, signature help):
import bittensor as bt
sub = bt.Subtensor()
result = sub.neurons.neurons(netuid=1, lite=True)Or dispatch by name, as an agent would:
result = sub.read("neurons", netuid=1, lite=True)Async is the same surface awaited: async with bt.Subtensor() as client:.
On-chain implementation
- Runtime API
NeuronInfoRuntimeApi.get_neurons_lite - Runtime API
NeuronInfoRuntimeApi.get_neurons
Every file is browsable under /code exactly as built into the runtime.