bittensor-taostatsAccess Bittensor blockchain data via TaoStats API for subnets, validators, miners, staking, emissions, and market metrics.
Install via ClawdBot CLI:
clawdbot install vanlabs-dev/bittensor-taostatsPurpose: Interact with TaoStats API for Bittensor blockchain data - subnets, validators, miners, staking, emissions, and more.
API Documentation: https://docs.taostats.io/
Base URL: https://api.taostats.io
Rate Limit: 5 calls/minute (free tier)
Get a free API key from taostats.io and export it as an environment variable:
export TAOSTATS_API_KEY="tao-xxxxx:yyyyy"
source ~/.openclaw/workspace/skills/taostats/taostats.sh
GET /api/dtao/pool/latest/v1?netuid={N}CRITICAL: This endpoint has EVERYTHING for trading decisions.
Key Fields:
price - Current alpha price in TAOroot_prop - % of price from root TAO injection (CRITICAL for entry validation)fear_and_greed_index / fear_and_greed_sentiment - Market sentimentseven_day_prices - Historical price array (42 data points)price_change_1_hour, price_change_1_day, price_change_1_week, price_change_1_monthmarket_cap, liquidity, total_tao, total_alphatao_volume_24_hr, alpha_volume_24_hr, buys_24_hr, sells_24_hrhighest_price_24_hr, lowest_price_24_hrExample:
curl -s "https://api.taostats.io/api/dtao/pool/latest/v1?netuid=33" \
-H "Authorization: $TAOSTATS_API_KEY" | jq '.data[0].root_prop'
# Returns: "0.2104087259347016725" (21% - GOOD entry)
GET /api/dtao/pool/history/v1?netuid={N}&limit={L}Historical pool snapshots for backtesting.
GET /api/dtao/validator/yield/latest/v1?netuid={N}Validator APYs with multiple timeframes.
Key Fields:
seven_day_apy - Primary metric for staking decisionsone_day_apy, one_hour_apy, thirty_day_apyseven_day_epoch_participation - Validator reliabilityname, hotkey.ss58, stake, takeExample:
curl -s "https://api.taostats.io/api/dtao/validator/yield/latest/v1?netuid=33" \
-H "Authorization: $TAOSTATS_API_KEY" | \
jq -r '.data | sort_by(-.seven_day_apy) | .[0] |
"\(.name // .hotkey.ss58): \(.seven_day_apy * 100)% APY"'
GET /api/dtao/stake_balance/latest/v1?coldkey={COLDKEY}All stake positions across all subnets.
Key Fields:
netuid, hotkey.ss58, hotkey_namebalance_as_tao - ā ļø IN RAO (divide by 1e9)price, price_change_1_dayroot_prop - Per-position root proportionGET /api/subnet/latest/v1 or ?netuid={N}Complete subnet parameters and economics.
Key Fields:
netuid, emission, projected_emissionnet_flow_1_day, net_flow_7_days, net_flow_30_days - Capital flow trackingrecycled_24_hours, recycled_lifetime - Registration economicstao_flow, excess_tao - dTAO mechanicsimmune_owner_uids_limit, immunity_period - Risk assessmentmax_validators, active_validatorsdifficulty, adjustment_alpha - Mining economicsGET /api/subnet/registration/v1?netuid={N}Subnet registration details.
Key Fields:
owner.ss58 - Subnet ownerregistration_cost - Current registration costtimestamp - When registeredGET /api/validator/latest/v1?netuid={N}Current validator state.
Key Fields:
apr, apr_7_day_average, apr_30_day_averagenominator_return_per_k - Staker yield per 1000 TAOnominators, nominators_24_hr_change - Capital inflows/outflowsstake, stake_24_hr_change, validator_stake, system_staketake - Commission ratename, coldkey.ss58, hotkey.ss58permits - Subnet permissionsGET /api/validator/history/v1?netuid={N}&hotkey={H}&limit={L}Historical validator performance.
Key Fields:
nominators_24_hr_change - Track capital movementsdominance, subnet_dominance - Market shareGET /api/delegation/v1?nominator={COLDKEY}&action={all|stake|unstake}&limit={L}Complete transaction history (stakes, unstakes, transfers).
Key Fields:
action ("add" = stake, "remove" = unstake)amount, rate (price), tao_amount, alpha_amountfee, slippageblock_number, timestamphotkey.ss58, coldkey.ss58GET /api/transfer/v1?from={COLDKEY}&limit={L}TAO transfer history (not staking).
Key Fields:
from.ss58, to.ss58, amount, feeblock_number, timestampGET /api/metagraph/latest/v1?netuid={N}&limit={L}Complete subnet state for every neuron.
Key Fields:
uid, hotkey.ss58, coldkey.ss58rank, trust, consensus, incentive, dividends, emissionalpha_stake, root_stake, total_alpha_stakedaily_mining_alpha, daily_validating_alpha, daily_rewardvalidator_permit, is_immunity_period, in_dangerdaily_burned_alpha, daily_owner_alphaGET /api/neuron/latest/v1?netuid={N}&limit={L}Simplified neuron view with pruning risk.
Key Fields:
uid, name, hotkey.ss58, coldkey.ss58pruning_score, in_danger, is_immuneminer_rank, validator_ranktaostats_pool 33
# Returns: price, root_prop, fear_and_greed_index, 7-day price history, volume
taostats_validator_yield 33
# Returns: All validators with 1h/1d/7d/30d APYs
taostats_stake_balance "YOUR_COLDKEY_HERE"
# Returns: All positions with root_prop per subnet
taostats_delegation_history "YOUR_COLDKEY_HERE"
# Returns: All stake/unstake transactions with slippage
taostats_subnet_info 33
# Returns: Emissions, net flows, registration cost, immunity params
taostats_metagraph 33
# Returns: All neurons with stakes, ranks, emissions
NETUID=33
ROOT_PROP=$(curl -s "https://api.taostats.io/api/dtao/pool/latest/v1?netuid=$NETUID" \
-H "Authorization: $TAOSTATS_API_KEY" | jq -r '.data[0].root_prop')
if (( $(echo "$ROOT_PROP < 0.30" | bc -l) )); then
echo "SN$NETUID: GOOD entry (root_prop: $ROOT_PROP)"
else
echo "SN$NETUID: AVOID (root_prop: $ROOT_PROP - artificial price)"
fi
NETUID=33
curl -s "https://api.taostats.io/api/dtao/validator/yield/latest/v1?netuid=$NETUID" \
-H "Authorization: $TAOSTATS_API_KEY" | \
jq -r '.data | sort_by(-.seven_day_apy) | .[0] |
"\(.name // .hotkey.ss58) | APY: \(.seven_day_apy * 100)% | Commission: \(.take * 100)%"'
COLDKEY="YOUR_COLDKEY_HERE"
curl -s "https://api.taostats.io/api/dtao/stake_balance/latest/v1?coldkey=$COLDKEY" \
-H "Authorization: $TAOSTATS_API_KEY" | \
jq -r '.data[] |
"SN\(.netuid): \((.balance_as_tao | tonumber) / 1000000000) TAO | root_prop: \(.root_prop)"'
for NETUID in 33 64 51 13 3 1 100; do
MAX_APY=$(curl -s "https://api.taostats.io/api/dtao/validator/yield/latest/v1?netuid=$NETUID" \
-H "Authorization: $TAOSTATS_API_KEY" | jq -r '.data | max_by(.seven_day_apy) | .seven_day_apy')
echo "$NETUID|$MAX_APY"
sleep 0.3
done | sort -t'|' -k2 -rn | while IFS='|' read netuid apy; do
printf "SN%-3s: %6.1f%%\n" "$netuid" "$(echo "$apy * 100" | bc -l)"
done
curl -s "https://api.taostats.io/api/subnet/latest/v1" \
-H "Authorization: $TAOSTATS_API_KEY" | \
jq -r '.data[] | select(.netuid != 0) |
"SN\(.netuid): net_flow_7d=\(.net_flow_7_days) | emission=\(.emission)"' | \
sort -t'=' -k2 -rn | head -10
taostats_client.pyRobust API client with automatic retry logic.
from taostats_client import TaostatsAPI
api = TaostatsAPI("your-api-key")
# Single call with retry
result = api.get_json("dtao/pool/latest/v1?netuid=33")
# Paginated (handles all pages automatically)
all_data = api.get_paginated("dtao/stake_balance/latest/v1?coldkey=XYZ")
# Balance history
history = api.get_balance_history(coldkey, start_timestamp, end_timestamp)
balance_history.pyTrack daily portfolio changes over time.
# View last 30 days
python3 skills/taostats/balance_history.py --days 30
# Export to CSV
python3 skills/taostats/balance_history.py --days 90 --export
Output:
š Portfolio History (30 records):
--------------------------------------------------------------------------------
Date Free Ļ Staked Ļ Total Ļ Daily Ī
--------------------------------------------------------------------------------
2026-01-07 0.0234 1.9567 1.9801
2026-01-08 0.0256 1.9789 2.0045 +0.0244
...
Overall Change: +0.5399 Ļ (+27.27%)
taostats_pool Get full pool data including root_prop and fear & greed.
taostats_pool_history [limit] Historical pool snapshots.
taostats_validator_yield All validators with APYs.
taostats_stake_balance All positions with per-subnet root_prop.
taostats_delegation_history [limit] Transaction history with slippage.
taostats_subnet_info [netuid]Subnet parameters and economics.
taostats_subnet_registration Subnet ownership and registration details.
taostats_validator_info Current validator state.
taostats_validator_history [limit] Historical validator performance.
taostats_metagraph Complete subnet state.
taostats_neurons Simplified neuron view.
Free tier: 5 calls per minute
Best practices:
sleep 0.3 between calls (20 calls/min safe)Example rate-limited loop:
for NETUID in {1..50}; do
taostats_pool $NETUID | jq -r '.data[0] | "SN\(.netuid): root_prop=\(.root_prop)"'
sleep 0.3
done
| Code | Cause | Fix |
|------|-------|-----|
| 401 | Invalid API key | Check .taostats format, no "Bearer" prefix |
| 404 | Wallet not indexed | Wait 1-2 hours for new wallets |
| 429 | Rate limit | Add sleep delays between calls |
| Empty | Inactive subnet | Check if subnet exists first |
root_prop < 0.30 = Good (organic price)root_prop > 0.70 = Bad (artificially pumped)net_flow_7_days > 0 = Capital inflownominators_24_hr_change > 0 = Growing validator stakein_danger = true ā Pruning riskis_immunity_period = true ā Protected from deregpruning_score ā Lower is saferfear_and_greed_index < 30 = Fear (potential buy)fear_and_greed_index > 70 = Greed (potential wait)balance_as_tao Field BugIssue: Returns value in rao (raw units), not TAO.
Workaround: Always divide by 1,000,000,000
balance_tao=$(echo "$balance_as_tao / 1000000000" | bc -l)
Affected endpoints:
/api/dtao/stake_balance/latest/v1#!/bin/bash
source ~/.openclaw/workspace/skills/taostats/taostats.sh
echo "=== High-Quality Entry Opportunities ==="
for NETUID in 33 64 51 13 3 1 100 117 12 120; do
POOL=$(taostats_pool $NETUID)
ROOT_PROP=$(echo "$POOL" | jq -r '.data[0].root_prop')
PRICE=$(echo "$POOL" | jq -r '.data[0].price')
FEAR_GREED=$(echo "$POOL" | jq -r '.data[0].fear_and_greed_sentiment')
MAX_APY=$(taostats_validator_yield $NETUID | jq -r '.data | max_by(.seven_day_apy) | .seven_day_apy')
if (( $(echo "$ROOT_PROP < 0.30" | bc -l) )); then
printf "SN%-3s | root_prop: %.2f | APY: %5.1f%% | Sentiment: %s\n" \
"$NETUID" "$ROOT_PROP" "$(echo "$MAX_APY * 100" | bc -l)" "$FEAR_GREED"
fi
sleep 0.3
done
#!/bin/bash
source ~/.openclaw/workspace/skills/taostats/taostats.sh
COLDKEY="YOUR_COLDKEY"
echo "=== Portfolio Risk Assessment ==="
taostats_stake_balance $COLDKEY | jq -r '.data[] |
"\(.netuid)|\(.balance_as_tao)|\(.root_prop)"' | while IFS='|' read netuid balance root_prop; do
BALANCE_TAO=$(echo "$balance / 1000000000" | bc -l)
if (( $(echo "$root_prop > 0.50" | bc -l) )); then
printf "ā ļø SN%-3s: %6.3f TAO | HIGH root_prop: %.2f - Consider exit\n" "$netuid" "$BALANCE_TAO" "$root_prop"
else
printf "ā
SN%-3s: %6.3f TAO | OK root_prop: %.2f\n" "$netuid" "$BALANCE_TAO" "$root_prop"
fi
done
import requests
import os
class TaoStatsAPI:
def __init__(self):
self.base_url = "https://api.taostats.io"
self.api_key = os.getenv("TAOSTATS_API_KEY")
def _get(self, endpoint):
headers = {"Authorization": self.api_key, "accept": "application/json"}
r = requests.get(f"{self.base_url}{endpoint}", headers=headers)
return r.json()
def pool(self, netuid):
"""Get pool data with root_prop and fear & greed"""
return self._get(f"/api/dtao/pool/latest/v1?netuid={netuid}")
def validator_yield(self, netuid):
"""Get all validators with APYs"""
return self._get(f"/api/dtao/validator/yield/latest/v1?netuid={netuid}")
def stake_balance(self, coldkey):
"""Get all positions with root_prop per subnet"""
return self._get(f"/api/dtao/stake_balance/latest/v1?coldkey={coldkey}")
def subnet_info(self, netuid=None):
"""Get subnet parameters and net flows"""
if netuid:
return self._get(f"/api/subnet/latest/v1?netuid={netuid}")
return self._get("/api/subnet/latest/v1")
# Usage
api = TaoStatsAPI()
pool = api.pool(33)
print(f"SN33 root_prop: {pool['data'][0]['root_prop']}")
Last Updated: 2026-02-06
Author: vanlabs-dev
Dependencies: curl, jq, bc
Changelog:
TODO:
Generated Feb 24, 2026
Stakers can use the validator yield and stake balance endpoints to identify high-performing validators with strong root proportions and APYs across subnets. By analyzing historical APY trends and capital flows, they can optimize delegation to maximize returns while managing risk through diversification.
Traders leverage the dTAO pool endpoints to monitor price, root proportion, and market sentiment for informed entry and exit decisions. They use subnet flow data and registration costs to assess capital movements and economic health, enabling strategic investments in promising subnets.
Validator operators utilize the validator and metagraph endpoints to track their performance, stake changes, and pruning risks. By monitoring nominator inflows and subnet dominance, they can adjust commission rates and marketing efforts to maintain competitiveness and avoid penalties.
Institutional investors use the delegation and transfer endpoints to audit transaction histories, including fees and slippage, for compliance and reporting. They analyze stake balances and subnet parameters to manage diversified Bittensor holdings and assess overall exposure.
Developers and analysts access subnet and neuron data to study mining economics, emissions, and network dynamics. This supports research on subnet growth, validator behavior, and protocol improvements, aiding in tool development and strategic insights.
Offer tiered access to enhanced TaoStats data, such as real-time alerts, advanced analytics, or historical backtesting tools. Charge monthly or annual fees based on usage limits and features, targeting traders and institutional users.
Provide automated tools that use validator yield and stake balance data to recommend optimal delegation strategies. Monetize through a percentage of staking rewards or flat fees for portfolio management services.
Develop tailored dashboards integrating TaoStats endpoints for businesses needing detailed subnet analytics, transaction tracking, and compliance reports. Revenue comes from one-time setup fees and ongoing maintenance contracts.
š¬ Integration Tip
Ensure API key management is secure and implement rate limiting to handle the 5 calls/minute free tier effectively, using caching for frequent queries.
Connect Claude to Clawdbot instantly and keep it connected 24/7. Run after setup to link your subscription, then auto-refreshes tokens forever.
ERC-8004 Trustless Agents - Register, discover, and build reputation for AI agents on Ethereum. Use when registering agents on-chain, querying agent registries, giving/receiving reputation feedback, or interacting with the AI agent trust layer.
Autonomous crypto trading on Base via Bankr. Use for trading tokens, monitoring launches, executing strategies, or managing a trading portfolio. Triggers on "trade", "buy", "sell", "launch", "snipe", "profit", "PnL", "portfolio balance", or any crypto trading task on Base.
Deploy ERC20 tokens on Base using Clanker SDK. Create tokens with built-in Uniswap V4 liquidity pools. Supports Base mainnet and Sepolia testnet. Requires PRIVATE_KEY in config.
Query DeFi portfolio data across 50+ chains via Zapper's GraphQL API. Use when the user wants to check wallet balances, DeFi positions, NFT holdings, token prices, or transaction history. Supports Base, Ethereum, Polygon, Arbitrum, Optimism, and more. Requires ZAPPER_API_KEY.
Interact with Solana blockchain via Helius APIs. Create/manage wallets, check balances (SOL + tokens), send transactions, swap tokens via Jupiter, and monitor addresses. Use for any Solana blockchain operation, crypto wallet management, token transfers, DeFi swaps, or portfolio tracking.