eth_getTransactionByHash RPC Method
Parameters
hash
string
REQUIRED
Loading...
Returns
object
Loading...
blockHash
Loading...
blockNumber
Loading...
from
Loading...
gas
Loading...
gasPrice
Loading...
maxFeePerGas
Loading...
maxPriorityFeePerGas
Loading...
hash
Loading...
input
Loading...
nonce
Loading...
to
Loading...
transactionIndex
Loading...
value
Loading...
type
Loading...
accessList
Loading...
chainId
Loading...
v
Loading...
r
Loading...
s
Loading...
Request
1curl https://docs-demo.sei-pacific.quiknode.pro/ \2-X POST \3-H "Content-Type: application/json" \4--data '{"method":"eth_getTransactionByHash","params":["0xa2c2ef6b721b903b4358a577341199005762e062db77cc98bd2c41f0bfad2e1a"],"id":1,"jsonrpc":"2.0"}'
1curl https://docs-demo.sei-pacific.quiknode.pro/ \2-X POST \3-H "Content-Type: application/json" \4--data '{"method":"eth_getTransactionByHash","params":["0xa2c2ef6b721b903b4358a577341199005762e062db77cc98bd2c41f0bfad2e1a"],"id":1,"jsonrpc":"2.0"}'
1require 'eth'23client = Eth::Client.create 'https://docs-demo.sei-pacific.quiknode.pro/'4payload = {5"jsonrpc": "2.0",6"method": "eth_getTransactionByHash",7"params": ["0xa2c2ef6b721b903b4358a577341199005762e062db77cc98bd2c41f0bfad2e1a"],8"id": "1"9}1011response = client.send(payload.to_json)12puts response
1require 'eth'23client = Eth::Client.create 'https://docs-demo.sei-pacific.quiknode.pro/'4payload = {5"jsonrpc": "2.0",6"method": "eth_getTransactionByHash",7"params": ["0xa2c2ef6b721b903b4358a577341199005762e062db77cc98bd2c41f0bfad2e1a"],8"id": "1"9}1011response = client.send(payload.to_json)12puts response
1import { ethers } from "ethers";2(async () => {3const provider = new ethers.JsonRpcProvider("https://docs-demo.sei-pacific.quiknode.pro/");4const txInfo = await provider.send("eth_getTransactionByHash", [5"0xa2c2ef6b721b903b4358a577341199005762e062db77cc98bd2c41f0bfad2e1a",6]);7console.log(txInfo);8})();
1import { ethers } from "ethers";2(async () => {3const provider = new ethers.JsonRpcProvider("https://docs-demo.sei-pacific.quiknode.pro/");4const txInfo = await provider.send("eth_getTransactionByHash", [5"0xa2c2ef6b721b903b4358a577341199005762e062db77cc98bd2c41f0bfad2e1a",6]);7console.log(txInfo);8})();
1var myHeaders = new Headers();2myHeaders.append("Content-Type", "application/json");34var raw = JSON.stringify({5"method": "eth_getTransactionByHash",6"params": [7"0xa2c2ef6b721b903b4358a577341199005762e062db77cc98bd2c41f0bfad2e1a"8],9"id": 1,10"jsonrpc": "2.0"11});1213var requestOptions = {14method: 'POST',15headers: myHeaders,16body: raw,17redirect: 'follow'18};1920fetch("https://docs-demo.sei-pacific.quiknode.pro/", requestOptions)21.then(response => response.text())22.then(result => console.log(result))23.catch(error => console.log('error', error));24
1var myHeaders = new Headers();2myHeaders.append("Content-Type", "application/json");34var raw = JSON.stringify({5"method": "eth_getTransactionByHash",6"params": [7"0xa2c2ef6b721b903b4358a577341199005762e062db77cc98bd2c41f0bfad2e1a"8],9"id": 1,10"jsonrpc": "2.0"11});1213var requestOptions = {14method: 'POST',15headers: myHeaders,16body: raw,17redirect: 'follow'18};1920fetch("https://docs-demo.sei-pacific.quiknode.pro/", requestOptions)21.then(response => response.text())22.then(result => console.log(result))23.catch(error => console.log('error', error));24
1import requests2import json34url = "https://docs-demo.sei-pacific.quiknode.pro/"56payload = json.dumps({7"method": "eth_getTransactionByHash",8"params": [9"0xa2c2ef6b721b903b4358a577341199005762e062db77cc98bd2c41f0bfad2e1a"10],11"id": 1,12"jsonrpc": "2.0"13})14headers = {15'Content-Type': 'application/json'16}1718response = requests.request("POST", url, headers=headers, data=payload)1920print(response.text)21
1import requests2import json34url = "https://docs-demo.sei-pacific.quiknode.pro/"56payload = json.dumps({7"method": "eth_getTransactionByHash",8"params": [9"0xa2c2ef6b721b903b4358a577341199005762e062db77cc98bd2c41f0bfad2e1a"10],11"id": 1,12"jsonrpc": "2.0"13})14headers = {15'Content-Type': 'application/json'16}1718response = requests.request("POST", url, headers=headers, data=payload)1920print(response.text)21
1require "uri"2require "json"3require "net/http"45url = URI("https://docs-demo.sei-pacific.quiknode.pro/")67https = Net::HTTP.new(url.host, url.port)8https.use_ssl = true910request = Net::HTTP::Post.new(url)11request["Content-Type"] = "application/json"12request.body = JSON.dump({13"method": "eth_getTransactionByHash",14"params": [15"0xa2c2ef6b721b903b4358a577341199005762e062db77cc98bd2c41f0bfad2e1a"16],17"id": 1,18"jsonrpc": "2.0"19})2021response = https.request(request)22puts response.read_body23
1require "uri"2require "json"3require "net/http"45url = URI("https://docs-demo.sei-pacific.quiknode.pro/")67https = Net::HTTP.new(url.host, url.port)8https.use_ssl = true910request = Net::HTTP::Post.new(url)11request["Content-Type"] = "application/json"12request.body = JSON.dump({13"method": "eth_getTransactionByHash",14"params": [15"0xa2c2ef6b721b903b4358a577341199005762e062db77cc98bd2c41f0bfad2e1a"16],17"id": 1,18"jsonrpc": "2.0"19})2021response = https.request(request)22puts response.read_body23
1from web3 import Web3, HTTPProvider2w3 = Web3(HTTPProvider('https://docs-demo.sei-pacific.quiknode.pro/'))3print(w3.eth.get_transaction('0xa2c2ef6b721b903b4358a577341199005762e062db77cc98bd2c41f0bfad2e1a'))4
1from web3 import Web3, HTTPProvider2w3 = Web3(HTTPProvider('https://docs-demo.sei-pacific.quiknode.pro/'))3print(w3.eth.get_transaction('0xa2c2ef6b721b903b4358a577341199005762e062db77cc98bd2c41f0bfad2e1a'))4
Don't have an account yet?
Create your Quicknode endpoint in seconds and start building
Get started for free