Skip to content

Who votes what, on one subnet

GET
/metagraph/{netuid}/weights/

Every validator’s weight vector on one subnet and mechanism, as stored on chain. weight is the raw u16, the voter’s largest entry reading 65535, and share that entry’s fraction of the vector. uid keeps one voter and top its heaviest entries, while entries_total keeps the full length.

Rate limit: 600 requests per minute per IP (scope anon).

  • None
netuid
required
integer

Subnet netuid. 0 is root.

mechid
integer

Mechanism to read. Default 0; an unparseable value silently reads as 0.

top
integer

Keep only the N heaviest entries per voter. 0 or absent keeps them all; entries_total stays the untrimmed length. 400 when not an integer.

uid
integer

Only this voter’s vector. 400 when not an integer.

Every neuron with a weight vector, by uid, with a summary of the subnet.

Media typeapplication/json
object
subnet
required

The subnet and the mechanism the vectors belong to.

object
id
required

Netuid.

integer
name
required

The name the owner’s on-chain identity gives the subnet, else the chain’s default name for the netuid.

string
symbol
required

The subnet token’s symbol.

string
tempo
required

In blocks. Blocks between two epochs.

integer
mechid
required

Echo of ?mechid=.

integer
mechanism_count
required

Incentive mechanisms on this subnet.

integer
mechanism_emission_split
required

Whole percent of emission per mechanism; [] when unset, which splits emission evenly.

commit_reveal
required

Whether validators commit their weights before revealing them, so a vector fills only at reveal. False when the hyperparameters were never read.

boolean
commit_reveal_period
required

In epochs. How far the vectors run behind the committed votes; null unless commit_reveal.

integer
nullable
count
required

Voters in voters.

integer
voters
required

Every neuron of the mechanism with a stored vector, by uid; ?uid= keeps that one alone.

Array<object>
object
uid
required
integer
hotkey
required
string
identity
required

The on-chain identity of the hotkey, else of the coldkey; null when neither has one.

object
name
required

The display name published on chain, or a label Taoswap curates for accounts such as exchange wallets.

string
nullable
url
required

Website.

string
nullable
github
required

Code repository URL.

string
nullable
image
required

Absolute URL of the logo Taoswap hosts when it has one, else the logo URL published on chain.

string
nullable
image_thumb
required

Absolute URL of image fit within 64 px, as WebP, for small renderings; null when image is not a raster logo Taoswap hosts (an SVG, an on-chain URL, empty) or its thumbnail is not written yet.

string
nullable
discord
required

Discord contact, as the account wrote it.

string
nullable
description
required

Free text describing the account, as published on chain.

string
nullable
additional
required

Free text the account added to its identity.

string
nullable
x_id
required

The X (Twitter) handle, without @. Curated by Taoswap, not on chain.

string
nullable
stake
required

In alpha. The voter’s stake weight.

number format: double
vtrust
required

A fraction from 0 to 1: how closely the voter’s weights agree with consensus.

number format: double
is_validator
required

True for a staked hotkey setting weights, or a permit holder earning no miner incentive.

boolean
last_update
required

In blocks. Blocks since this voter last set weights.

integer
nullable
last_update_block
required

The block at which this voter last set weights.

integer
updated_at_block
required

The block of the last chain read of this neuron’s mechanism.

integer
entries_total
required

The voter’s full vector length, before ?top= trims entries.

integer
entries
required

Sorted by weight, descending.

Array<object>
object
uid
required
integer
weight
required

Raw u16, upscaled so the voter’s maximum is 65535.

integer
share
required

A fraction from 0 to 1: this entry’s share of the voter’s vector.

number format: double

Example generated

{
"subnet": {
"id": 1,
"name": "example",
"symbol": "example",
"tempo": 1,
"mechid": 1,
"mechanism_count": 1,
"mechanism_emission_split": "example",
"commit_reveal": true,
"commit_reveal_period": 1
},
"count": 1,
"voters": [
{
"uid": 1,
"hotkey": "example",
"identity": {
"name": "example",
"url": "example",
"github": "example",
"image": "example",
"image_thumb": "example",
"discord": "example",
"description": "example",
"additional": "example",
"x_id": "example"
},
"stake": 1,
"vtrust": 1,
"is_validator": true,
"last_update": 1,
"last_update_block": 1,
"updated_at_block": 1,
"entries_total": 1,
"entries": [
{
"uid": 1,
"weight": 1,
"share": 1
}
]
}
]
}

A parameter failed its check, which message names. code is usually VALIDATION_ERROR.

Media typeapplication/json

The error envelope every 4xx and 5xx response carries. The introduction lists the code values.

object
error
required

Always true. Lets a client branch without reading the status code.

boolean
code
required

Machine-readable error code, such as VALIDATION_ERROR or RESOURCE_NOT_FOUND. Branch on it, not on message.

string
message
required

One human-readable sentence.

string
detail
required

Extra context for some codes, such as the invalid fields of a VALIDATION_ERROR or retry_after on RATE_LIMITED; else null.

nullable

Examples

ExampleVALIDATIONERROR

VALIDATION_ERROR

{
"error": true,
"code": "VALIDATION_ERROR",
"message": "uid and top must be integers",
"detail": null
}

RESOURCE_NOT_FOUND. Carries Cache-Control: public, max-age=15, short because a new block or extrinsic is indexed up to a minute late.

Media typeapplication/json

The error envelope every 4xx and 5xx response carries. The introduction lists the code values.

object
error
required

Always true. Lets a client branch without reading the status code.

boolean
code
required

Machine-readable error code, such as VALIDATION_ERROR or RESOURCE_NOT_FOUND. Branch on it, not on message.

string
message
required

One human-readable sentence.

string
detail
required

Extra context for some codes, such as the invalid fields of a VALIDATION_ERROR or retry_after on RATE_LIMITED; else null.

nullable

Examples

ExampleRESOURCENOTFOUND

RESOURCE_NOT_FOUND

{
"error": true,
"code": "RESOURCE_NOT_FOUND",
"message": "Not found",
"detail": null
}

Rate limit exceeded (600/minute, per IP). Retry-After carries the seconds to wait.

Media typeapplication/json

The error envelope every 4xx and 5xx response carries. The introduction lists the code values.

object
error
required

Always true. Lets a client branch without reading the status code.

boolean
code
required

Machine-readable error code, such as VALIDATION_ERROR or RESOURCE_NOT_FOUND. Branch on it, not on message.

string
message
required

One human-readable sentence.

string
detail
required

Extra context for some codes, such as the invalid fields of a VALIDATION_ERROR or retry_after on RATE_LIMITED; else null.

nullable

Examples

ExampleRATELIMITED

RATE_LIMITED

{
"error": true,
"code": "RATE_LIMITED",
"message": "Request was throttled",
"detail": {
"retry_after": 12
}
}
Retry-After
integer

Seconds before the next request is accepted.