Skip to main content

payment_queryInfo

Estimates the fee for an extrinsic on Asset Hub.

Use Cases#

  • Fee estimation - Calculate transaction costs before sending
  • UI display - Show fees to users for native stablecoin transfers (USDC, USDT), DOT staking and governance, and cross-chain asset management via XCM
  • Transaction planning - Ensure sufficient funds

Parameters#

ParameterTypeRequiredDescription
extrinsicStringYesHex-encoded unsigned extrinsic
blockHashStringNoBlock hash for fee calculation

Request#

{
"jsonrpc": "2.0",
"method": "payment_queryInfo",
"params": ["0x..."],
"id": 1
}

Returns#

FieldTypeDescription
weightObjectTransaction weight
classStringDispatch class
partialFeeStringEstimated fee

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_queryInfo",
"params": ["0x..."],
"id": 1
}'