Docs

delegateInfo_getDelegate - Bittensor RPC Method

Retrieve SCALE-encoded info for a specific delegate by AccountId32 on Bittensor. Use for validator research, delegation decisions, and staking analytics.

Overview

The delegateInfo_getDelegate method returns SCALE-encoded information for a specific delegate identified by their hotkey bytes. This is the targeted version of delegateInfo_getDelegates -- use it when you already know which delegate you want to inspect.

Delegates are validator hotkeys that accept nominated TAO stake from other accounts. Each delegate has a configurable take rate, a list of nominators, and registrations across one or more subnets. This method is commonly used in staking UIs to show detailed delegate profiles before a user commits to delegation.

Parameters

PositionNameTypeRequiredDescription
0delegate_account_idnumber[]YesRaw 32-byte hotkey public key as a JSON byte array
1atBlockHashNoOptional block hash to query at a specific block. Pass null for the latest state

Working with addresses: Most client libraries let you start from an SS58 address or a hex public key, then convert it into the 32 raw bytes that the underlying JSON-RPC call expects. Use that conversion step before calling the raw method directly.

Response

The result is a JSON array of SCALE bytes. When decoded, the delegate entry contains:

FieldTypeDescription
delegate_ss58AccountId32The delegate hotkey
takeCompact<u16>Delegate take stored as a normalized u16 value
nominatorsVec<(AccountId32, Vec<(NetUid, stake)>)>Nominator entries grouped by subnet and stake amount
owner_ss58AccountId32The coldkey that owns this delegate hotkey
registrationsVec<Compact<u16>>Subnet netuids where this delegate is registered
validator_permitsVec<Compact<u16>>Subnet netuids where this delegate has validator permits
return_per_1000Compact<u64>Estimated delegator return per 1000 TAO staked
total_daily_returnCompact<u64>Estimated total daily delegator return

Returns null if the provided account is not a registered delegate.

SCALE Decoding

The raw response requires SCALE decoding with Bittensor type definitions.

Using @polkadot/api: Register Bittensor custom types (including the DelegateInfo struct) before creating the API instance. The response decodes to a single DelegateInfo struct (or Option<DelegateInfo> that can be empty).

Using scalecodec (Python): The bittensor SDK handles decoding internally via sub.get_delegate_by_hotkey(). For manual decoding, parse the byte-array result as an Option<DelegateInfo> using the Bittensor type registry.

Key decoding notes:

  • The take field is normalized over the full u16 range rather than simple basis points
  • All RAO amounts should be divided by 1e9 for TAO display values
  • nominators is a nested structure that records delegations per subnet, which is why the payload can grow large for active delegates
  • An empty/null result means the hotkey is not a registered delegate

Code Examples

Using SubstrateExamples

Decode with Python

Python
import requests
import json

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

# Replace with a real delegate hotkey as 32 raw bytes
delegate_pubkey = [0] * 32

payload = {
    'jsonrpc': '2.0',
    'method': 'delegateInfo_getDelegate',
    'params': [delegate_pubkey, None],
    'id': 1
}

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

if result.get('result'):
    print(f"SCALE byte count: {len(result['result'])}")
else:
    print('Delegate not found or not registered')

# To decode with bittensor SDK:
# import bittensor as bt
# sub = bt.subtensor(network='finney')
# delegate = sub.get_delegate_by_hotkey(delegate_ss58)
# print(f"Take: {delegate.take}, Nominators: {len(delegate.nominators)}")

Full Python example with delegate analysis

Python
import bittensor as bt

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

# Look up a specific delegate by SS58 hotkey address
delegate_ss58 = '5F4tQyWrhfGVcNhoqeiNsR6KjBCapnXJYpGyexNFpbqR2Yq7'
delegate = sub.get_delegate_by_hotkey(delegate_ss58)

if delegate is None:
    print(f"Hotkey {delegate_ss58} is not a registered delegate")
else:
    # Delegate profile
    print(f"Delegate: {delegate.hotkey_ss58}")
    print(f"Owner:    {delegate.owner_ss58}")
    print(f"Take:     {delegate.take * 100:.1f}%")
    print(f"Nominators: {len(delegate.nominators)}")
    print(f"Total stake: {delegate.total_stake.tao:,.2f} TAO")

    # Subnet presence
    print(f"Registered on subnets: {delegate.registrations}")
    print(f"Validator permits on:  {delegate.validator_permits}")

    # Yield estimation
    return_per_1000 = delegate.return_per_1000.tao
    print(f"Return per 1000 TAO: {return_per_1000:.4f} TAO")

    # Top nominators
    sorted_noms = sorted(
        delegate.nominators,
        key=lambda item: sum(amount.tao for _, amount in item[1]),
        reverse=True
    )
    print("\nTop 5 nominators:")
    for addr, stakes in sorted_noms[:5]:
        total = sum(amount.tao for _, amount in stakes)
        print(f"  {addr}: {total:,.2f} TAO across {len(stakes)} subnet entries")

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 delegateHotkey = '0x0000000000000000000000000000000000000000000000000000000000000000';
const result = await api.rpc.delegateInfo.getDelegate(delegateHotkey);

if (result.isEmpty) {
  console.log('Delegate not found');
} else {
  console.log('Raw SCALE result:', result.toHex().slice(0, 80), '...');
}

await api.disconnect();

Historical query at a specific block

Python
import requests

url = 'https://api-bittensor-mainnet.n.dwellir.com/YOUR_API_KEY'
delegate_pubkey = [0] * 32  # delegate hotkey as raw bytes

# Query at a specific block hash for historical delegate state
block_hash = '0xabc123...'  # a past block hash
payload = {
    'jsonrpc': '2.0',
    'method': 'delegateInfo_getDelegate',
    'params': [delegate_pubkey, block_hash],
    'id': 1
}

response = requests.post(url, json=payload)
result = response.json()
# Compare with current state to track changes over time

Error Handling

Error ScenarioBehaviorRecommended Action
Invalid delegate public key shapeReturns JSON-RPC error -32602 (invalid params)Pass the raw 32-byte public key as a JSON byte array
Non-delegate hotkeyReturns null resultCheck if the hotkey is registered as a delegate first
Invalid block hashReturns JSON-RPC errorVerify the block hash exists on chain
Node not syncedMay return stale dataCheck system_health for sync status
Rate limit exceededHTTP 429Cache delegate data and refresh periodically

Common Use Cases

  • Validator research — Inspect a specific delegate's take rate, nominator count, and subnet registrations before delegating TAO.
  • Delegation decisions — Compare the return per 1000 TAO across candidates to pick the best delegate.
  • Portfolio tracking — Monitor a delegate's performance over time by querying at specific block hashes.
  • Staking UIs — Display a delegate's profile page with all relevant staking metrics.
  • Alerting — Watch for changes in a delegate's take rate or registration status by polling periodically.
  • Nominator analysis — Inspect the full list of nominators to understand stake concentration and whale exposure.