Queries
metagraph
The full metagraph for a subnet in one call (stakes, ranks, emissions, axons, ...).
name and symbol are decoded to text (the wire carries them as
compact-u16 vectors of utf-8 bytes, unlike every other text field).
On runtimes with miner collateral (spec >= 435), each neuron also carries
collateral_locked, collateral_min, and collateral_earned (alpha
balances; None on older nodes).
Category: Subnets
Parameters
| Parameter | Type | Description |
|---|---|---|
netuid | integer | Subnet whose metagraph to fetch. |
CLI
btcli query metagraph --netuid <integer> --jsonPython
import bittensor as bt
sub = bt.Subtensor()
result = sub.read("metagraph", netuid=1)On-chain implementation
- Runtime API
SubnetInfoRuntimeApi.get_metagraph
Every file is browsable under /code exactly as built into the runtime.