Docs

wallet/getaccountnet - Get Account Bandwidth Info

Get detailed bandwidth (net) information for a TRON account including free and staked bandwidth via Dwellir's RPC endpoint.

Get detailed bandwidth (network) resource information for an account.

Endpoint

Text
POST /wallet/getaccountnet

Request Parameters

Request
addressstring

Required parameter: Account address (base58 or hex)

visibleboolean

Optional parameter: Return base58 addresses (default: false returns hex)

Response Body

Response
resultOBJECT

`freeNetUsed` - Free bandwidth used today `freeNetLimit` - Total free bandwidth available (600 default) `NetUsed` - Staked bandwidth used `NetLimit` - Total staked bandwidth available `TotalNetLimit` - Combined total bandwidth limit `TotalNetWeight` - Total network bandwidth weight `assetNetUsed` - Map of TRC10 token bandwidth usage `assetNetLimit` - Map of TRC10 token bandwidth limits

Implementation Examples

Bash
# Get bandwidth info with base58 address
curl -X POST https://api-tron-mainnet.n.dwellir.com/YOUR_API_KEY/wallet/getaccountnet \
  -H "Content-Type: application/json" \
  -d '{
    "address": "TNPdqto8HiuMzoG7Vv9wyyYhWzCojLeHAF",
    "visible": true
  }'

# Get bandwidth info with hex address
curl -X POST https://api-tron-mainnet.n.dwellir.com/YOUR_API_KEY/wallet/getaccountnet \
  -H "Content-Type: application/json" \
  -d '{
    "address": "TNPdqto8HiuMzoG7Vv9wyyYhWzCojLeHAF"
  }'

Bandwidth Calculation

JavaScript
// Calculate bandwidth costs for transactions
function calculateBandwidthNeeded(transactionSize) {
  // Basic transaction is ~200 bytes
  // Smart contract calls can be 300-500 bytes
  return transactionSize;
}

// Calculate TRX needed for bandwidth
function calculateTRXForBandwidth(bandwidthNeeded) {
  // 1 TRX = 1 bandwidth point when staked
  return bandwidthNeeded;
}

// Example: Check if account has enough bandwidth
async function checkBandwidth(address, transactionSize) {
  const response = await fetch(`${API_URL}/wallet/getaccountnet`, {
    method: 'POST',
    headers: { 'Content-Type': 'application/json' },
    body: JSON.stringify({ address, visible: true })
  });
  
  const data = await response.json();
  
  const availableFree = data.freeNetLimit - data.freeNetUsed;
  const availableStaked = data.NetLimit - data.NetUsed;
  const totalAvailable = availableFree + availableStaked;
  
  return {
    hasEnough: totalAvailable >= transactionSize,
    available: totalAvailable,
    needed: transactionSize,
    deficit: Math.max(0, transactionSize - totalAvailable)
  };
}

Bandwidth Management

Daily Reset

  • Free bandwidth resets daily at 00:00 UTC
  • Staked bandwidth usage resets daily
  • TRC10 token bandwidth resets based on token settings

Priority Order

  1. TRC10 Token Bandwidth: Used first for token transfers
  2. Free Bandwidth: 600 points daily for all accounts
  3. Staked Bandwidth: From frozen TRX
  4. TRX Burning: If no bandwidth available, burns TRX

Bandwidth Consumption

OperationTypical Bandwidth
TRX Transfer~250 points
TRC10 Transfer~300 points
Smart Contract Call350-500 points
Account Creation~1000 points
Multi-signature+100 points per signature

Best Practices

1. Monitor Usage

JavaScript
// Check bandwidth before transactions
const bandwidth = await getAccountNet(address);
if (bandwidth.freeNetUsed > 500) {
  console.warn('Consider staking TRX for more bandwidth');
}

2. Optimize Transactions

  • Batch operations when possible
  • Minimize transaction data size
  • Use efficient contract calls

3. Resource Planning

  • Keep buffer of 100+ bandwidth points
  • Stake TRX if doing frequent transactions
  • Monitor daily reset timing

Use Cases

  • Resource Monitoring: Track bandwidth consumption
  • Transaction Planning: Ensure sufficient bandwidth before sending
  • Cost Optimization: Decide between using free/staked bandwidth or burning TRX
  • DApp Integration: Check user bandwidth before operations
  • Alert Systems: Notify when bandwidth is low