⚠️Blast API (blastapi.io) ends Oct 31. Migrate to Dwellir and skip Alchemy's expensive compute units.
Switch Today →
Skip to main content

payment_queryInfo

Description

Returns fee and weight information for a signed extrinsic without submitting it. Supports planning fee buffers and offline signing workflows.

Parameters

PositionTypeDescription
0stringSigned extrinsic hex
1 (optional)stringBlock hash to evaluate against

Response Fields

FieldTypeDescription
weight.ref_timenumberEstimated execution time weight
weight.proof_sizenumberProof size weight
classstringnormal, operational, or mandatory
partialFeestringEstimated partial fee in plancks

Sample Request & Response

{
"jsonrpc": "2.0",
"method": "payment_queryInfo",
"params": ["0x2523053d0002500200…63155"],
"id": 99
}
{
"jsonrpc": "2.0",
"id": 99,
"result": {
"weight": { "ref_time": 3636401000, "proof_size": 18750 },
"class": "normal",
"partialFee": "0"
}
}
note

A zero partialFee indicates the runtime uses fee subsidies (for example, dApp staking payouts). Standard transfers will return positive fees.

Code Examples

JavaScript (polkadot.js)

const tx = api.tx.balances.transferKeepAlive(dest, amount);
const info = await api.rpc.payment.queryInfo(tx.toHex());
console.log(info.toHuman());

Python (py-substrate-interface)

extrinsic_hex = substrate.create_signed_extrinsic(call=call, keypair=keypair).to_hex()
info = substrate.rpc_request('payment_queryInfo', [extrinsic_hex])['result']
print(info)