Body Parameters
tx
string
REQUIRED
The transaction hash in hexadecimal format
Returns
resultType
string
Retuns either DispatchOutcome if the transaction is valid or TransactionValidityError if the result is invalid.
result
string
If there was an error it will be the cause of the error. If the transaction executed correctly it will be `Ok'
validityErrorType
string
Specifies the type of error encountered. It can be one of these - InvalidTransaction or UnknownTransaction
Request
1# AssetHub (default) - for transaction dry-run on AssetHub parachain2curl --location 'https://docs-demo.dot-mainnet.quiknode.pro/transaction/dry-run' \3--header 'Content-Type: application/json' \4--header 'Accept: application/json' \5--data '{6"tx": "YOUR_TRANSACTION"7}'89# Polkadot Relaychain - for transaction dry-run on Relaychain (requires /rc prefix)10curl --location 'https://docs-demo.dot-mainnet.quiknode.pro/rc/transaction/dry-run' \11--header 'Content-Type: application/json' \12--header 'Accept: application/json' \13--data '{14"tx": "YOUR_TRANSACTION"15}'
1# AssetHub (default) - for transaction dry-run on AssetHub parachain2curl --location 'https://docs-demo.dot-mainnet.quiknode.pro/transaction/dry-run' \3--header 'Content-Type: application/json' \4--header 'Accept: application/json' \5--data '{6"tx": "YOUR_TRANSACTION"7}'89# Polkadot Relaychain - for transaction dry-run on Relaychain (requires /rc prefix)10curl --location 'https://docs-demo.dot-mainnet.quiknode.pro/rc/transaction/dry-run' \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/dry-run", 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/dry-run", 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/dry-run"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/dry-run"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/dry-run")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/dry-run")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