wallet/listwitnesses - Get Super Representatives
Get list of all TRON Super Representatives (witnesses) including votes, URLs, and block production stats via Dwellir's RPC endpoint.
TRON RPC endpoint: endpoint URLs, plans and pricing.
Get list of all Super Representatives (witnesses) on the TRON network.
Endpoint
POST /wallet/listwitnesses# Get all witnesses
curl -X POST https://api-tron-mainnet.n.dwellir.com/YOUR_API_KEY/wallet/listwitnesses \
-H "Content-Type: application/json" \
-d '{}'
# Get witnesses and filter top 5 by votes (using jq)
curl -X POST https://api-tron-mainnet.n.dwellir.com/YOUR_API_KEY/wallet/listwitnesses \
-H "Content-Type: application/json" \
-d '{}' | jq '.witnesses | sort_by(-.voteCount) | .[0:5]'
# Get specific witness info (using jq)
curl -X POST https://api-tron-mainnet.n.dwellir.com/YOUR_API_KEY/wallet/listwitnesses \
-H "Content-Type: application/json" \
-d '{}' | jq '.witnesses[] | select(.address == "TYourWitnessAddress...")'Implementation Examples
Super Representative System
SR Roles
- Top 27: Active block producers (Super Representatives)
- 28-127: Super Representative Partners (receive rewards, no block production)
- 128+: Candidates (no rewards)
Voting Power
- 1 TRX = 1 Vote (when frozen for voting)
- Votes can be distributed among multiple SRs
- Votes remain until changed or TRX is unfrozen
Block Production
- SRs take turns producing blocks
- 3-second block time
- Missed blocks affect reliability score
Witness Analysis
// Analyze witness performance
function analyzeWitnesses(witnesses) {
const topSRs = witnesses.slice(0, 27);
// Calculate network statistics
const totalVotes = witnesses.reduce((sum, w) => sum + w.voteCount, 0);
const totalBlocks = topSRs.reduce((sum, w) => sum + w.totalProduced, 0);
const totalMissed = topSRs.reduce((sum, w) => sum + w.totalMissed, 0);
// Find most reliable SRs
const reliability = topSRs.map(w => ({
url: w.url,
address: w.address,
reliability: w.totalProduced / (w.totalProduced + w.totalMissed) * 100
})).sort((a, b) => b.reliability - a.reliability);
// Calculate voting concentration
const top5Votes = witnesses.slice(0, 5).reduce((sum, w) => sum + w.voteCount, 0);
const votingConcentration = (top5Votes / totalVotes) * 100;
return {
totalVotes: totalVotes / 1000000, // In millions
totalBlocks,
totalMissed,
networkReliability: (totalBlocks / (totalBlocks + totalMissed) * 100).toFixed(2),
votingConcentration: votingConcentration.toFixed(2),
mostReliable: reliability.slice(0, 5),
leastReliable: reliability.slice(-5).reverse()
};
}
// Monitor SR changes
async function monitorSRChanges(interval = 60000) {
let previousSRs = [];
setInterval(async () => {
const response = await fetch(`${API_URL}/wallet/listwitnesses`, {
method: 'POST',
headers: { 'Content-Type': 'application/json' },
body: JSON.stringify({})
});
const data = await response.json();
const currentSRs = data.witnesses
.sort((a, b) => b.voteCount - a.voteCount)
.slice(0, 27)
.map(w => w.address);
// Check for changes
if (previousSRs.length > 0) {
const newSRs = currentSRs.filter(sr => !previousSRs.includes(sr));
const removedSRs = previousSRs.filter(sr => !currentSRs.includes(sr));
if (newSRs.length > 0 || removedSRs.length > 0) {
console.log('SR List Changed!');
if (newSRs.length > 0) console.log('New SRs:', newSRs);
if (removedSRs.length > 0) console.log('Removed SRs:', removedSRs);
}
}
previousSRs = currentSRs;
}, interval);
}Best Practices
1. Vote Distribution
- Research SR reliability and contributions
- Consider distributing votes among multiple SRs
- Monitor SR performance regularly
2. SR Selection Criteria
- Block production reliability (>99.5%)
- Community contributions
- Technical infrastructure
- Reward sharing programs
3. Monitoring
- Track SR ranking changes
- Monitor block production stats
- Alert on significant vote shifts
Use Cases
- Voting Decisions: Research SRs before voting
- Network Monitoring: Track SR performance and reliability
- Reward Calculation: Estimate voting rewards
- Governance Participation: Engage in network governance
- SR Analytics: Analyze voting patterns and network health
Related Methods
- wallet/votewitnessaccount - Vote for Super Representatives
- wallet/getaccount - Check account votes
- wallet/freezebalancev2 - Freeze TRX for voting power