Body Parameters
- txstringREQUIRED
The transaction hash in hexadecimal format
Returns
- weightobject
Contains details about the computational effort required for the operation
- refTimestring
The weight of computational time used based on some reference hardware
- proofSizestring
The weight of storage space used by proof of validity
- classstring
The extrinsic class. It can be one of these -
Normal,OperationalorMandatory
- partialFeestring
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-H "x-token: AUTH_TOKEN" \5--header 'Accept: application/json' \6--data '{7"tx": "YOUR_TRANSACTION"8}'910# Polkadot Relaychain - for transaction fee estimation on Relaychain (requires /rc prefix)11curl --location 'https://docs-demo.dot-mainnet.quiknode.pro/rc/transaction/fee-estimate' \12--header 'Content-Type: application/json' \13--header 'Accept: application/json' \14--data '{15"tx": "YOUR_TRANSACTION"16}'
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-H "x-token: AUTH_TOKEN" \5--header 'Accept: application/json' \6--data '{7"tx": "YOUR_TRANSACTION"8}'910# Polkadot Relaychain - for transaction fee estimation on Relaychain (requires /rc prefix)11curl --location 'https://docs-demo.dot-mainnet.quiknode.pro/rc/transaction/fee-estimate' \12--header 'Content-Type: application/json' \13--header 'Accept: application/json' \14--data '{15"tx": "YOUR_TRANSACTION"16}'
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("x-token", "AUTH_TOKEN");5myHeaders.append("Content-Type", "application/json");6myHeaders.append("Accept", "application/json");78const raw = JSON.stringify({9"tx": "YOUR_TRANSACTION"10});1112const requestOptions = {13method: "POST",14headers: myHeaders,15body: raw,16redirect: "follow"17};1819fetch("{(url}}transaction/fee-estimate", requestOptions)20.then((response) => response.text())21.then((result) => console.log(result))22.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("x-token", "AUTH_TOKEN");5myHeaders.append("Content-Type", "application/json");6myHeaders.append("Accept", "application/json");78const raw = JSON.stringify({9"tx": "YOUR_TRANSACTION"10});1112const requestOptions = {13method: "POST",14headers: myHeaders,15body: raw,16redirect: "follow"17};1819fetch("{(url}}transaction/fee-estimate", requestOptions)20.then((response) => response.text())21.then((result) => console.log(result))22.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'x-token': 'AUTH_TOKEN',13'Content-Type': 'application/json',14'Accept': 'application/json'15}1617response = requests.request("POST", url, headers=headers, data=payload)1819print(response.text)20
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'x-token': 'AUTH_TOKEN',13'Content-Type': 'application/json',14'Accept': 'application/json'15}1617response = requests.request("POST", url, headers=headers, data=payload)1819print(response.text)20
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["x-token"] = "AUTH_TOKEN"12request["Content-Type"] = "application/json"13request["Accept"] = "application/json"14request.body = JSON.dump({15"tx": "YOUR_TRANSACTION"16})1718response = http.request(request)19puts response.read_body20
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["x-token"] = "AUTH_TOKEN"12request["Content-Type"] = "application/json"13request["Accept"] = "application/json"14request.body = JSON.dump({15"tx": "YOUR_TRANSACTION"16})1718response = http.request(request)19puts response.read_body20
Don't have an account yet?
Create your Quicknode endpoint in seconds and start building
Get started for free