Skip to main content

payment_queryFeeDetails

Returns a detailed breakdown of fees for a given extrinsic on Asset Hub. Unlike payment_queryInfo which returns the total fee, this method separates the fee into its component parts.

Use Cases#

  • Fee analysis - Understand fee composition for native stablecoin transfers (USDC, USDT), DOT staking and governance, and cross-chain asset management via XCM
  • Optimization - Identify which fee component dominates costs
  • Debugging - Diagnose unexpected fee amounts

Parameters#

ParameterTypeRequiredDescription
extrinsicBytesYesSCALE-encoded extrinsic (signed or unsigned)
blockHashHashNoBlock hash for fee calculation context

Returns#

FieldTypeDescription
inclusionFeeOption<InclusionFee>Fee details (null for unsigned extrinsics)

InclusionFee Structure#

FieldTypeDescription
baseFeeBalanceFixed base fee per extrinsic
lenFeeBalanceFee based on encoded extrinsic length
adjustedWeightFeeBalanceFee based on execution weight

Code Examples#

curl https://api-asset-hub-polkadot.n.dwellir.com/<YOUR_API_KEY>/YOUR_API_KEY \
-X POST \
-H "Content-Type: application/json" \
-d '{
"jsonrpc": "2.0",
"method": "payment_queryFeeDetails",
"params": ["0x...encodedExtrinsic"],
"id": 1
}'

Fee Components Explained#

ComponentCalculationOptimization
Base feeFixed per extrinsicBatch calls to share base fee
Length feelength * lengthToFeeMinimize call data size
Weight feeweight * weightToFeeChoose efficient operations