Skip to main content

delegatorSummary

Get comprehensive delegation summary for a delegator, including staking positions, rewards, and validator relationships.

When to Use This Endpoint#

The delegatorSummary endpoint is essential for:

  • Staking Portfolio — View all delegations for a delegator
  • Rewards Tracking — Monitor staking rewards across validators
  • Delegation Analysis — Analyze delegation strategy and distribution
  • Validator Selection — Evaluate current validator relationships

Request#

Endpoint#

POST https://api-hyperliquid-mainnet-info.n.dwellir.com/info

Headers#

HeaderValueRequired
Content-Typeapplication/jsonYes
X-Api-KeyYour API keyYes

Parameters#

ParameterTypeRequiredDescription
typestringYesMust be "delegatorSummary"
userstringYesUser's Ethereum wallet address

Example Request#

{
"type": "delegatorSummary",
"user": "0x420a4ed7b6bb361da586868adec2f2bb9ab75e66"
}

Response#

Success Response#

{
"delegated": "12505.32462249",
"undelegated": "10689.31366593",
"totalPendingWithdrawal": "0.0",
"nPendingWithdrawals": 0
}

Response Fields#

FieldTypeDescription
delegatedstringTotal amount of tokens currently delegated
undelegatedstringTotal amount of tokens not delegated
totalPendingWithdrawalstringTotal amount pending withdrawal
nPendingWithdrawalsintegerNumber of pending withdrawal requests

Code Examples#

curl -X POST 'https://api-hyperliquid-mainnet-info.n.dwellir.com/info' \
-H 'X-Api-Key: YOUR_API_KEY' \
-H 'Content-Type: application/json' \
-d '{
"type": "delegatorSummary",
"user": "0x420a4ed7b6bb361da586868adec2f2bb9ab75e66"
}'

Common Use Cases#

1. View Staking Portfolio#

Display all delegations for a user:

async function viewStakingPortfolio(userAddress) {
const summary = await getDelegatorSummary(userAddress);

console.log('=== Staking Portfolio ===\n');
console.log(`Total delegations: ${summary.delegations.length}`);

if (summary.delegations.length === 0) {
console.log('No active delegations');
}
}

// Usage
await viewStakingPortfolio('0x420a4ed7b6bb361da586868adec2f2bb9ab75e66');

2. Track Delegation Changes#

Monitor changes in delegation status:

async function trackDelegations(userAddress) {
const summary = await getDelegatorSummary(userAddress);

return {
delegationCount: summary.delegations.length,
hasActiveDelegations: summary.delegations.length > 0,
timestamp: new Date().toISOString()
};
}

// Usage
const status = await trackDelegations('0x420a4ed7b6bb361da586868adec2f2bb9ab75e66');
console.log('Delegation status:', status);

3. Build Staking Dashboard#

Create a comprehensive staking dashboard:

async function getStakingDashboard(userAddress) {
try {
const summary = await getDelegatorSummary(userAddress);

return {
status: 'success',
delegations: summary.delegations,
totalDelegations: summary.delegations.length,
lastUpdated: new Date().toISOString()
};
} catch (error) {
return {
status: 'error',
error: error.message
};
}
}

4. Compare Delegation Strategies#

Analyze delegation distribution:

async function analyzeDelegationStrategy(userAddress) {
const summary = await getDelegatorSummary(userAddress);

const analysis = {
totalDelegations: summary.delegations.length,
isDiversified: summary.delegations.length > 1,
delegationStatus: summary.delegations.length > 0 ? 'active' : 'inactive'
};

console.log('Delegation Analysis:', analysis);
return analysis;
}

Error Handling#

Common Errors#

ErrorCauseSolution
401 UnauthorizedInvalid API keyVerify your API key is correct
400 Bad RequestMissing or invalid user addressEnsure valid Ethereum address format
429 Too Many RequestsRate limit exceededImplement request throttling
500 Internal Server ErrorServer issueRetry with exponential backoff

Error Response Example#

{
"error": "Missing required parameter: user",
"code": "MISSING_PARAMETER"
}

Robust Error Handling#

async function safeGetDelegatorSummary(userAddress, maxRetries = 3) {
for (let i = 0; i < maxRetries; i++) {
try {
return await getDelegatorSummary(userAddress);
} catch (error) {
if (error.response?.status === 429) {
await new Promise(r => setTimeout(r, Math.pow(2, i) * 1000));
} else if (error.response?.status === 400) {
throw new Error('Invalid user address');
} else if (i === maxRetries - 1) {
throw error;
}
}
}
}

Best Practices#

  1. Validate addresses — Ensure user addresses are valid Ethereum addresses
  2. Cache data — Cache delegation data for several minutes to reduce API calls
  3. Handle empty states — Account for users with no delegations
  4. Monitor regularly — Track delegation changes for portfolio management
  5. Implement pagination — For users with many delegations, display in batches

Access real-time Hyperliquid delegation data with Dwellir's HyperCore Info Endpoint. Get your API key →