API docs
Bittensor.ai API
Subnet prices, validators, wallets, blocks and events from the Bittensor network, as JSON over HTTPS. Answers about chain state name the block they were read at.
What the API covers
- Subnets
- Alpha price, pool reserves, market cap, volume, emission share, holders, metagraph and hyperparameters, now or at the close of any past day.
- Validators and hotkeys
- Stake, take, nominators, 7-day staker yield, weights, and a quote for staking an amount.
- Accounts
- Balances, stake positions, transfers, activity, and daily value history for one wallet or several.
- Prices and markets
- The TAO price, candles for TAO and every subnet pool, and pool trades.
- Chain data
- Blocks, extrinsics, calls and events from the first block, decoded, and any storage item at any block.
- Network
- Daily and hourly series for issuance, stake, pools, registrations and activity.
- EVM
- Blocks, transactions, logs, contracts and tokens on the Bittensor EVM.
The reference lists every endpoint with its parameters and response fields.
Quickstart
1. Get an API key
Sign in and open API keys in Settings. You see a new key once, when you create it, so store it somewhere safe.
Keep the key on your server or in an environment variable, not in a web page or a public repository.
2. Make a request
This asks for subnet 64. Subnets are numbered slots, and the number is called the
netuid. Send the key in theAuthorizationheader:curl "https://api.bittensor.ai/api/v2/subnets/64" \ -H "Authorization: Bearer YOUR_API_KEY"import os import requests resp = requests.get( "https://api.bittensor.ai/api/v2/subnets/64", headers={"Authorization": f"Bearer {os.environ['BTAI_API_KEY']}"}, timeout=30, ) resp.raise_for_status() subnet = resp.json()["data"] print(subnet["name"], subnet["price_tao"])const resp = await fetch("https://api.bittensor.ai/api/v2/subnets/64", { headers: { Authorization: `Bearer ${process.env.BTAI_API_KEY}` }, }); if (!resp.ok) throw new Error(`API answered ${resp.status}`); const { data: subnet } = await resp.json(); console.log(subnet.name, subnet.price_tao);3. Read the answer
Response (trimmed) { "data": { "netuid": 64, "name": "Chutes", "price_tao": "0.068309105", "price_usd": "15.051559", "price_change_24h_ratio": "0.005975", "market_cap_spot_tao_rao": "252490743100302", "emission_share_1d_ratio": "0.05819596", ... }, "meta": { "at": { "height": 9480708, "hash": "0x7029fb12…aac42f4", "time": "2026-11-11T04:44:00.000Z", "finalized": true }, ... } }dataholds the subnet.meta.atis the block it was read at, andfinalizedsays that block can no longer change.- Amounts are strings of whole base units, so no precision is lost. A
_tao_raofield is TAO in rao: divide by 10⁹.252490743100302is 252,490.74 τ. _ratiofields are fractions.0.05819596is 5.82%.nullmeans the value is not known. Show it as missing, not as zero.
Next steps
- Key concepts: subnets, alpha, coldkeys, hotkeys and the units in field names.
- Common tasks: ranking subnets, reading a wallet, finding validators, quoting a stake, transfers and price history.
- Requests and responses: authentication, paging, errors, rate limits and versioning.
- The OpenAPI document, public and keyless, to generate a client in your language.
Access and terms
Use of the API is covered by the Terms of Service. For higher limits than your key allows, email [email protected].
AI agents and MCP clients
AI agents and MCP clients can read the same data through the Bittensor.ai MCP server, signed in with a bittensor.ai account. Connect an MCP client