As the XDC Network continues to scale as an enterprise-ready, EVM-compatible Layer-1 blockchain, real-time access to validator, governance, and reward data becomes mission-critical for node operators. Whether you're running a masternode, building staking dashboards, or creating validator analytics tools, the XDC Governance DApp API offers a powerful and easy-to-use interface to track and automate masternode performance and uptime.
π Docs: Governance API Swagger UI
π§± Masternode Setup: How to Run a Node
π What Is the XDC Masternode DApp API?
The Masternode DApp API is a RESTful service connected directly to the XDPoS governance layer, designed to expose critical masternode data, including:
- Validator lifecycle status (active, proposed, slashed, resigned)
- Masternode rewards (real-time and historical)
- Slashing events & uptime metrics
- Block signer activity
- Governance transaction history
Unlike standard RPC endpoints, this API is read-only, lightweight, and tailored specifically for validator and governance monitoringβno authentication required, and responses are in clean JSON format, ideal for integration with JavaScript, Go, Python, and front-end apps.
βοΈ Key API Categories (with Examples)
β
Masternode & Candidate Monitoring
Monitor masternode performance across lifecycle stages:
π§Ύ Sample Response:
[
{
"address": "xdcaa11fe9b14a2318b0c6eeb4e2b0fb8eeca7f7c8",
"name": "TopStakerNode",
"stake": "20000000",
"status": "active",
"commission": 2.0,
"delegatedStake": "18000000",
"delegateCount": 10,
"uptime": 99.5
}
]
π° Rewards & ROI Tracking
Calculate real-time rewards for masternodes:
π§Ύ Sample Response:
{
"epoch": 2981,
"reward": "4560",
"timestamp": "2024-06-22T12:00:00Z"
}
Use this to display real-time validator payouts in dashboards or reporting tools.
π‘οΈ Slashing & Validator Misconduct
Track misbehaving or penalized validators with ease:
Perfect for:
- Validator health alerts
- Uptime reliability analytics
- Reputation scoring systems
π Block Signers & Validation Activity
Get data on the latest validator signer sets:
Ideal for tools validating block integrity and confirming consensus participation.
π§Ύ Governance-Related Transactions
Track all candidate-related activity on-chain:
π§ͺ Use Case: Masternode Health Dashboard (Real-Time)
Want to build a live validator monitoring panel? Here's a typical integration flow:
This makes it easy to build custom validator dashboards, email/SMS alerts, or even mobile apps for masternode operators.
π‘ Quick Start Example (Node.js)
const axios = require('axios');
const API = 'https://mn.xinfin.network/api';
// Get all active masternodes
axios.get(`${API}/candidates/masternodes`)
.then(res => console.log('Masternodes:', res.data))
.catch(err => console.error('Error:', err));
// Get rewards for one node
axios.get(`${API}/candidates/xdcaa11fe9b14a2318b0c6eeb4e2b0fb8eeca7f7c8/ownerAddress/getRewards`)
.then(res => console.log('Rewards:', res.data));
π Final Thoughts
The XDC Masternode DApp API is a must-have for anyone building tools around validator analytics, masternode rewards, and uptime metrics. Whether you're developing a staking interface, uptime tracker, or governance monitoring serviceβit gives you full access to critical metrics without the need to run a full node.
Use It To:
β
Track validator uptime and performance
β
Monitor masternode rewards in real-time
β
Automate slashing alerts and validator scoring
β
Build dashboards, bots, or apps for XDC governance
π Explore the Docs: https://mn.xinfin.network/api-docs
π οΈ Build with Confidence. Integrate with Speed. Monitor with Precision.
Discussion (0)