Body Parameters
tx
string
REQUIRED
The transaction hash in hexadecimal format
Returns
weight
object
Contains details about the computational effort required for the operation
refTime
string
The weight of computational time used based on some reference hardware
proofSize
string
The weight of storage space used by proof of validity
class
string
The extrinsic class. It can be one of these - Normal, Operational or Mandatory
partialFee
string
The expected inclusion fee for the transaction. Note that the fee rate changes up to 30% in a 24 hour period and this will not be the exact fee
Request
1# AssetHub (default) - for transaction fee estimation on AssetHub parachain2curl --location 'https://docs-demo.dot-mainnet.quiknode.pro/transaction/fee-estimate' \3--header 'Content-Type: application/json' \4--header 'Accept: application/json' \5--data '{6"tx": "YOUR_TRANSACTION"7}'89# Polkadot Relaychain - for transaction fee estimation on Relaychain (requires /rc prefix)10curl --location 'https://docs-demo.dot-mainnet.quiknode.pro/rc/transaction/fee-estimate' \11--header 'Content-Type: application/json' \12--header 'Accept: application/json' \13--data '{14"tx": "YOUR_TRANSACTION"15}'
1# AssetHub (default) - for transaction fee estimation on AssetHub parachain2curl --location 'https://docs-demo.dot-mainnet.quiknode.pro/transaction/fee-estimate' \3--header 'Content-Type: application/json' \4--header 'Accept: application/json' \5--data '{6"tx": "YOUR_TRANSACTION"7}'89# Polkadot Relaychain - for transaction fee estimation on Relaychain (requires /rc prefix)10curl --location 'https://docs-demo.dot-mainnet.quiknode.pro/rc/transaction/fee-estimate' \11--header 'Content-Type: application/json' \12--header 'Accept: application/json' \13--data '{14"tx": "YOUR_TRANSACTION"15}'
1// For Polkadot Relaychain access, add '/rc' after https://docs-demo.dot-mainnet.quiknode.pro/ (e.g., https://docs-demo.dot-mainnet.quiknode.pro/rc/accounts/...)23const myHeaders = new Headers();4myHeaders.append("Content-Type", "application/json");5myHeaders.append("Accept", "application/json");67const raw = JSON.stringify({8"tx": "YOUR_TRANSACTION"9});1011const requestOptions = {12method: "POST",13headers: myHeaders,14body: raw,15redirect: "follow"16};1718fetch("{(url}}transaction/fee-estimate", requestOptions)19.then((response) => response.text())20.then((result) => console.log(result))21.catch((error) => console.error(error));
1// For Polkadot Relaychain access, add '/rc' after https://docs-demo.dot-mainnet.quiknode.pro/ (e.g., https://docs-demo.dot-mainnet.quiknode.pro/rc/accounts/...)23const myHeaders = new Headers();4myHeaders.append("Content-Type", "application/json");5myHeaders.append("Accept", "application/json");67const raw = JSON.stringify({8"tx": "YOUR_TRANSACTION"9});1011const requestOptions = {12method: "POST",13headers: myHeaders,14body: raw,15redirect: "follow"16};1718fetch("{(url}}transaction/fee-estimate", requestOptions)19.then((response) => response.text())20.then((result) => console.log(result))21.catch((error) => console.error(error));
1import requests2# For Polkadot Relaychain access, add '/rc' after https://docs-demo.dot-mainnet.quiknode.pro/ (e.g., https://docs-demo.dot-mainnet.quiknode.pro/rc/accounts/...)34import json56url = "{(url}}transaction/fee-estimate"78payload = json.dumps({9"tx": "YOUR_TRANSACTION"10})11headers = {12'Content-Type': 'application/json',13'Accept': 'application/json'14}1516response = requests.request("POST", url, headers=headers, data=payload)1718print(response.text)19
1import requests2# For Polkadot Relaychain access, add '/rc' after https://docs-demo.dot-mainnet.quiknode.pro/ (e.g., https://docs-demo.dot-mainnet.quiknode.pro/rc/accounts/...)34import json56url = "{(url}}transaction/fee-estimate"78payload = json.dumps({9"tx": "YOUR_TRANSACTION"10})11headers = {12'Content-Type': 'application/json',13'Accept': 'application/json'14}1516response = requests.request("POST", url, headers=headers, data=payload)1718print(response.text)19
1require "uri"2require "json"3# For Polkadot Relaychain access, add '/rc' after https://docs-demo.dot-mainnet.quiknode.pro/ (e.g., https://docs-demo.dot-mainnet.quiknode.pro/rc/accounts/...)45require "net/http"67url = URI("{(url}}transaction/fee-estimate")89http = Net::HTTP.new(url.host, url.port);10request = Net::HTTP::Post.new(url)11request["Content-Type"] = "application/json"12request["Accept"] = "application/json"13request.body = JSON.dump({14"tx": "YOUR_TRANSACTION"15})1617response = http.request(request)18puts response.read_body19
1require "uri"2require "json"3# For Polkadot Relaychain access, add '/rc' after https://docs-demo.dot-mainnet.quiknode.pro/ (e.g., https://docs-demo.dot-mainnet.quiknode.pro/rc/accounts/...)45require "net/http"67url = URI("{(url}}transaction/fee-estimate")89http = Net::HTTP.new(url.host, url.port);10request = Net::HTTP::Post.new(url)11request["Content-Type"] = "application/json"12request["Accept"] = "application/json"13request.body = JSON.dump({14"tx": "YOUR_TRANSACTION"15})1617response = http.request(request)18puts response.read_body19
Don't have an account yet?
Create your Quicknode endpoint in seconds and start building
Get started for free