Docs
Supported ChainsXDC NetworkJSON-RPC APITransaction Methods

eth_maxPriorityFeePerGas - XDC Network RPC Method

Get recommended priority fee on XDC Network. Essential for EIP-1559 transactions for tokenized trade finance (Letters of Credit, Bills of Lading), cross-border payments, and real-world asset tokenization.

Returns the current recommended priority fee per gas on XDC Network for EIP-1559 transactions.

Use Cases

  • EIP-1559 transactions - Set appropriate priority fees
  • Transaction acceleration - Calculate tips for faster inclusion
  • Gas optimization - Balance speed vs cost for tokenized trade finance (Letters of Credit, Bills of Lading), cross-border payments, and real-world asset tokenization

Request Parameters

Request

This method accepts no parameters.

Response Body

Response

Code Examples

Bash
curl -X POST https://api-xdc-mainnet.n.dwellir.com/YOUR_API_KEY \
  -H "Content-Type: application/json" \
  -d '{
    "jsonrpc": "2.0",
    "method": "eth_maxPriorityFeePerGas",
    "params": [],
    "id": 1
  }'
JavaScript
import { JsonRpcProvider, formatUnits } from 'ethers';

const provider = new JsonRpcProvider('https://api-xdc-mainnet.n.dwellir.com/YOUR_API_KEY');

const feeData = await provider.getFeeData();
console.log('Max Priority Fee:', formatUnits(feeData.maxPriorityFeePerGas, 'gwei'), 'Gwei');
console.log('Max Fee Per Gas:', formatUnits(feeData.maxFeePerGas, 'gwei'), 'Gwei');
Python
from web3 import Web3

w3 = Web3(Web3.HTTPProvider('https://api-xdc-mainnet.n.dwellir.com/YOUR_API_KEY'))

priority_fee = w3.eth.max_priority_fee
print(f'Max Priority Fee: {w3.from_wei(priority_fee, "gwei")} Gwei')

On this page