This storage item was removed in v219

This storage item is no longer available in the current runtime. Existed from v101 to v219. Shown here for historical reference.

TotalColdkeyStake

Storage Removed Map v101 → v219 (removed)

Total stake owned by a coldkey across all hotkeys.

Queried by: stakerswalletsanalyticsdelegators

The Big Picture

While Stake shows individual positions, TotalColdkeyStake gives you the aggregate. This is essential for portfolio views - how much total TAO does this wallet have staked, regardless of how it's spread across validators and subnets?

Why This Matters

When you want to know your total staking exposure without manually summing up each position, this gives you the answer in one query. Essential for any wallet display.

Example Scenario

Query TotalColdkeyStake(coldkey=your_address) returns 50000000000000 (50,000 TAO in RAO). This is your total staked across all validators - the number your wallet should display.

Common Questions

Does this include stake to my own hotkeys?
Yes, it includes ALL stake from this coldkey - both self-stake and delegation to others.
How does this relate to Stake storage?
Sum of all Stake(coldkey, *, *) entries equals TotalColdkeyStake(coldkey). This is the pre-computed aggregate.

Use Cases

  • Display total staked balance in wallet UI
  • Calculate user's total staking portfolio value
  • Build whale tracking and large holder analytics
  • Monitor stake concentration across coldkeys

Purpose & Usage

Purpose

Track total stake a coldkey has delegated.

Common Query Patterns

  • Query by coldkey address
  • Calculate portfolio value

Query Keys

#NameTypeDescription
1
key1
→ coldkey
AccountId Cold wallet address (hex -> SS58)

Stored Value

Total stake owned by this coldkey (RAO)

RAO -> TAO (/ 10^9)

Code Examples

import { ApiPromise, WsProvider } from "@polkadot/api";
import { stringCamelCase } from "@polkadot/util";

const provider = new WsProvider("wss://entrypoint-finney.opentensor.ai:443");
const api = await ApiPromise.create({ provider });

// Query TotalColdkeyStake storage
const key1 = "5GrwvaEF5zXb26Fz9rcQpDWS57CtERHpNehXCPcNoHGKutQY";

const result = await api.query
  [stringCamelCase("SubtensorModule")]
  [stringCamelCase("TotalColdkeyStake")](
  key1
);

console.log("TotalColdkeyStake:", result.toHuman());

Runtime Info

View Source
Pallet
SubtensorModule
Storage Kind
Map
First Version
v101
Removed In
v219