Body Parameters
- txstringREQUIRED
The transaction hash in hexadecimal format
Returns
- resultTypestring
Retuns either
DispatchOutcomeif the transaction is valid orTransactionValidityErrorif the result is invalid.
- resultstring
If there was an error it will be the cause of the error. If the transaction executed correctly it will be `Ok'
- validityErrorTypestring
Specifies the type of error encountered. It can be one of these -
InvalidTransactionorUnknownTransaction
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-H "x-token: AUTH_TOKEN" \5--header 'Accept: application/json' \6--data '{7"tx": "YOUR_TRANSACTION"8}'910# Polkadot Relaychain - for transaction dry-run on Relaychain (requires /rc prefix)11curl --location 'https://docs-demo.dot-mainnet.quiknode.pro/rc/transaction/dry-run' \12--header 'Content-Type: application/json' \13--header 'Accept: application/json' \14--data '{15"tx": "YOUR_TRANSACTION"16}'
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-H "x-token: AUTH_TOKEN" \5--header 'Accept: application/json' \6--data '{7"tx": "YOUR_TRANSACTION"8}'910# Polkadot Relaychain - for transaction dry-run on Relaychain (requires /rc prefix)11curl --location 'https://docs-demo.dot-mainnet.quiknode.pro/rc/transaction/dry-run' \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/dry-run", 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/dry-run", 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/dry-run"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/dry-run"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/dry-run")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/dry-run")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