Docs

subnetInfo_getDynamicInfo - Bittensor RPC Method

Retrieve SCALE-encoded dynamic runtime info for a Bittensor subnet. Includes emissions, registration costs, alpha token pricing, and real-time economic data.

Overview

The subnetInfo_getDynamicInfo method returns SCALE-encoded dynamic runtime information for a specific Bittensor subnet. While subnetInfo_getSubnetsInfo returns static configuration, this method returns real-time economic data that changes every tempo: emission rates, registration costs, alpha token pricing, and other values that reflect the current state of the subnet's economy.

This method is essential for understanding the economic dynamics of a subnet -- how much TAO it receives, what it costs to register, and how its internal token (alpha) is priced.

Parameters

PositionNameTypeRequiredDescription
0netuidu16YesThe subnet identifier
1atBlockHashNoOptional block hash to query at a specific block. Pass null for the latest state

Response

The result is a JSON array of SCALE bytes. When decoded, the dynamic info structure contains:

FieldTypeDescription
netuidu16The subnet identifier
ownerAccountId32Subnet owner coldkey
tempou16Blocks between consensus epochs
emission_valueu64Current emission allocation (RAO per block). Multiply by ~7200 for daily
burnu64Current registration burn cost (RAO). Divide by 1e9 for TAO
difficultyu64Current PoW registration difficulty
alpha_inu64Alpha tokens in the subnet's AMM pool
alpha_outu64Alpha tokens distributed to stakers
tao_inu64TAO tokens in the subnet's AMM pool
priceu64Current alpha-to-TAO price (scaled integer)
ku64Constant product for the AMM pool (alpha_in * tao_in)
is_dynamicboolWhether the subnet uses dynamic TAO pricing
pending_emissionu64Accumulated emissions not yet distributed (RAO)
pending_alpha_emissionu64Pending alpha token emissions
pending_root_emissionu64Pending emissions to root network validators
network_registered_atu64Block number when this subnet was registered
subnet_identityOption<SubnetIdentity>Optional name/description metadata

SCALE Decoding

The response decodes to a single SubnetDynamicInfo struct using Bittensor's custom type registry.

Using @polkadot/api: Register the SubnetDynamicInfo type definition. Key types within the struct include AccountId32, u16, u64, bool, and Option<SubnetIdentity>. The SubnetIdentity struct typically contains name (Vec<u8>) and description (Vec<u8>) fields.

Using bittensor Python SDK: Use sub.get_subnet_dynamic_info(netuid=N) which returns a decoded object with all fields accessible as properties.

Key decoding notes:

  • The price field represents the alpha-to-TAO exchange rate. The exact scaling factor depends on the runtime version
  • alpha_in and tao_in define the AMM pool state. The constant product k = alpha_in * tao_in determines swap pricing
  • pending_emission accumulates between tempos. After each tempo, pending emissions are distributed to neurons based on their scores
  • is_dynamic indicates whether the subnet participates in the dynamic TAO system. Non-dynamic subnets have simpler emission mechanics
  • network_registered_at is the genesis block for this subnet -- useful for calculating subnet age

Code Examples

Using SubstrateExamples

Decode with Python

Python
import requests
import json

url = 'https://api-bittensor-mainnet.n.dwellir.com/YOUR_API_KEY'

# Fetch dynamic info for subnet 1
payload = {
    'jsonrpc': '2.0',
    'method': 'subnetInfo_getDynamicInfo',
    'params': [1, None],
    'id': 1
}

response = requests.post(url, json=payload)
result = response.json()

if result.get('result'):
    scale_bytes = result['result']
    print(f'Dynamic info SCALE data size: {len(scale_bytes)} bytes')
else:
    print('No dynamic info found for this subnet')

# To decode with bittensor SDK:
# import bittensor as bt
# sub = bt.subtensor(network='finney')
# dyn_info = sub.get_subnet_dynamic_info(netuid=1)
# print(f"Emission: {dyn_info.emission_value} RAO/block")
# print(f"Burn cost: {dyn_info.burn / 1e9:.4f} TAO")
# print(f"Alpha price: {dyn_info.price}")

Full Python economic analysis

Python
import bittensor as bt

sub = bt.subtensor(network='finney')

# Analyze economics for a specific subnet
netuid = 1
dyn = sub.get_subnet_dynamic_info(netuid=netuid)
current_block = sub.block

print(f"=== Subnet {netuid} Economics ===")
print(f"Owner: {dyn.owner}")
print(f"Registered at block: {dyn.network_registered_at}")
print(f"Subnet age: {current_block - dyn.network_registered_at:,} blocks")
print(f"Tempo: {dyn.tempo} blocks (~{dyn.tempo * 12 / 60:.1f} minutes)")

# Emission analysis
daily_emission_tao = (dyn.emission_value / 1e9) * 7200
print(f"\nEmission: {dyn.emission_value / 1e9:.6f} TAO/block")
print(f"Daily emission: {daily_emission_tao:,.2f} TAO")
print(f"Pending emission: {dyn.pending_emission / 1e9:,.4f} TAO")
print(f"Pending alpha emission: {dyn.pending_alpha_emission / 1e9:,.4f} TAO")
print(f"Pending root emission: {dyn.pending_root_emission / 1e9:,.4f} TAO")

# Registration costs
print(f"\nRegistration burn cost: {dyn.burn / 1e9:,.4f} TAO")
print(f"Registration difficulty: {dyn.difficulty:,}")

# Dynamic TAO / Alpha token economics
if dyn.is_dynamic:
    print(f"\nDynamic TAO: Enabled")
    print(f"Alpha in pool: {dyn.alpha_in / 1e9:,.4f}")
    print(f"TAO in pool: {dyn.tao_in / 1e9:,.4f}")
    print(f"Alpha price: {dyn.price}")
    print(f"Pool constant k: {dyn.k}")
    print(f"Alpha distributed: {dyn.alpha_out / 1e9:,.4f}")
else:
    print(f"\nDynamic TAO: Disabled (traditional emission model)")

# Subnet identity
if dyn.subnet_identity:
    print(f"\nSubnet name: {dyn.subnet_identity.name}")

Decode with JavaScript

JavaScript
import { ApiPromise, WsProvider } from '@polkadot/api';

const provider = new WsProvider('wss://api-bittensor-mainnet.n.dwellir.com/YOUR_API_KEY');
const api = await ApiPromise.create({ provider });

const dynamicInfo = await api.rpc.subnetInfo.getDynamicInfo(1);
console.log('Raw data:', dynamicInfo.toHex().slice(0, 80), '...');

// With Bittensor types registered:
// console.log('Emission:', dynamicInfo.emission_value.toString());
// console.log('Burn:', dynamicInfo.burn.toString());
// console.log('Dynamic TAO:', dynamicInfo.is_dynamic.toString());
// console.log('Alpha price:', dynamicInfo.price.toString());

await api.disconnect();

Query with cURL

Bash
curl -X POST https://api-bittensor-mainnet.n.dwellir.com/YOUR_API_KEY \
  -H 'Content-Type: application/json' \
  -d '{
    "jsonrpc": "2.0",
    "method": "subnetInfo_getDynamicInfo",
    "params": [1, null],
    "id": 1
  }'

Error Handling

Error ScenarioBehaviorRecommended Action
Invalid netuidReturns null resultUse subnetInfo_getSubnetsInfo to list valid netuids
Dissolved subnetReturns null or empty dataCheck subnet existence first
Non-dynamic subnetis_dynamic is false, alpha fields may be zeroHandle both dynamic and non-dynamic subnet modes
Invalid block hashReturns JSON-RPC errorVerify block hash exists on chain
Node not syncedMay return stale economic dataCheck system_health for sync status
Rate limit exceededHTTP 429Cache results; refresh once per tempo at most

Common Use Cases

  • Subnet economics — Analyze emission rates, alpha token pricing, and registration costs to understand the economic health of a subnet.
  • Emission tracking — Monitor how emissions change over time for a subnet, including pending emissions not yet distributed.
  • Registration planning — Check the current burn cost and difficulty before registering a neuron on a subnet.
  • Alpha token pricing — Track the alpha-to-TAO exchange rate and AMM pool state for dynamic TAO subnets. Use alpha_in and tao_in to calculate slippage for planned swaps.
  • Investment analysis — Evaluate subnet economics (emission share, token dynamics) for staking and delegation decisions.
  • Dashboard widgets — Display real-time subnet economic indicators in monitoring tools.
  • Subnet age analysis — Use network_registered_at to calculate subnet maturity and correlate with performance metrics.