starknet_getTransactionByHash
curl --request POST \
--url https://starknet-mainnet.core.chainstack.com/365cf697a3ad6d950b4c4a911e2e4f4d \
--header 'Content-Type: application/json' \
--data '
{
"id": 1,
"jsonrpc": "2.0",
"method": "starknet_getTransactionByHash",
"params": [
"0x295ee040949bd23a4bba5d5fa0d9d776c3b1fc7cafd511d025e689e665d05b2"
]
}
'import requests
url = "https://starknet-mainnet.core.chainstack.com/365cf697a3ad6d950b4c4a911e2e4f4d"
payload = {
"id": 1,
"jsonrpc": "2.0",
"method": "starknet_getTransactionByHash",
"params": ["0x295ee040949bd23a4bba5d5fa0d9d776c3b1fc7cafd511d025e689e665d05b2"]
}
headers = {"Content-Type": "application/json"}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {'Content-Type': 'application/json'},
body: JSON.stringify({
id: 1,
jsonrpc: '2.0',
method: 'starknet_getTransactionByHash',
params: ['0x295ee040949bd23a4bba5d5fa0d9d776c3b1fc7cafd511d025e689e665d05b2']
})
};
fetch('https://starknet-mainnet.core.chainstack.com/365cf697a3ad6d950b4c4a911e2e4f4d', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://starknet-mainnet.core.chainstack.com/365cf697a3ad6d950b4c4a911e2e4f4d",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
CURLOPT_POSTFIELDS => json_encode([
'id' => 1,
'jsonrpc' => '2.0',
'method' => 'starknet_getTransactionByHash',
'params' => [
'0x295ee040949bd23a4bba5d5fa0d9d776c3b1fc7cafd511d025e689e665d05b2'
]
]),
CURLOPT_HTTPHEADER => [
"Content-Type: application/json"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "https://starknet-mainnet.core.chainstack.com/365cf697a3ad6d950b4c4a911e2e4f4d"
payload := strings.NewReader("{\n \"id\": 1,\n \"jsonrpc\": \"2.0\",\n \"method\": \"starknet_getTransactionByHash\",\n \"params\": [\n \"0x295ee040949bd23a4bba5d5fa0d9d776c3b1fc7cafd511d025e689e665d05b2\"\n ]\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("Content-Type", "application/json")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.post("https://starknet-mainnet.core.chainstack.com/365cf697a3ad6d950b4c4a911e2e4f4d")
.header("Content-Type", "application/json")
.body("{\n \"id\": 1,\n \"jsonrpc\": \"2.0\",\n \"method\": \"starknet_getTransactionByHash\",\n \"params\": [\n \"0x295ee040949bd23a4bba5d5fa0d9d776c3b1fc7cafd511d025e689e665d05b2\"\n ]\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://starknet-mainnet.core.chainstack.com/365cf697a3ad6d950b4c4a911e2e4f4d")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["Content-Type"] = 'application/json'
request.body = "{\n \"id\": 1,\n \"jsonrpc\": \"2.0\",\n \"method\": \"starknet_getTransactionByHash\",\n \"params\": [\n \"0x295ee040949bd23a4bba5d5fa0d9d776c3b1fc7cafd511d025e689e665d05b2\"\n ]\n}"
response = http.request(request)
puts response.read_bodyStarknet node API
starknet_getTransactionByHash | Starknet
Starknet API method that returns a transaction by its hash. It provides the details of a specific transaction that is identified by its unique hash.
POST
/
365cf697a3ad6d950b4c4a911e2e4f4d
starknet_getTransactionByHash
curl --request POST \
--url https://starknet-mainnet.core.chainstack.com/365cf697a3ad6d950b4c4a911e2e4f4d \
--header 'Content-Type: application/json' \
--data '
{
"id": 1,
"jsonrpc": "2.0",
"method": "starknet_getTransactionByHash",
"params": [
"0x295ee040949bd23a4bba5d5fa0d9d776c3b1fc7cafd511d025e689e665d05b2"
]
}
'import requests
url = "https://starknet-mainnet.core.chainstack.com/365cf697a3ad6d950b4c4a911e2e4f4d"
payload = {
"id": 1,
"jsonrpc": "2.0",
"method": "starknet_getTransactionByHash",
"params": ["0x295ee040949bd23a4bba5d5fa0d9d776c3b1fc7cafd511d025e689e665d05b2"]
}
headers = {"Content-Type": "application/json"}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {'Content-Type': 'application/json'},
body: JSON.stringify({
id: 1,
jsonrpc: '2.0',
method: 'starknet_getTransactionByHash',
params: ['0x295ee040949bd23a4bba5d5fa0d9d776c3b1fc7cafd511d025e689e665d05b2']
})
};
fetch('https://starknet-mainnet.core.chainstack.com/365cf697a3ad6d950b4c4a911e2e4f4d', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://starknet-mainnet.core.chainstack.com/365cf697a3ad6d950b4c4a911e2e4f4d",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
CURLOPT_POSTFIELDS => json_encode([
'id' => 1,
'jsonrpc' => '2.0',
'method' => 'starknet_getTransactionByHash',
'params' => [
'0x295ee040949bd23a4bba5d5fa0d9d776c3b1fc7cafd511d025e689e665d05b2'
]
]),
CURLOPT_HTTPHEADER => [
"Content-Type: application/json"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "https://starknet-mainnet.core.chainstack.com/365cf697a3ad6d950b4c4a911e2e4f4d"
payload := strings.NewReader("{\n \"id\": 1,\n \"jsonrpc\": \"2.0\",\n \"method\": \"starknet_getTransactionByHash\",\n \"params\": [\n \"0x295ee040949bd23a4bba5d5fa0d9d776c3b1fc7cafd511d025e689e665d05b2\"\n ]\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("Content-Type", "application/json")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.post("https://starknet-mainnet.core.chainstack.com/365cf697a3ad6d950b4c4a911e2e4f4d")
.header("Content-Type", "application/json")
.body("{\n \"id\": 1,\n \"jsonrpc\": \"2.0\",\n \"method\": \"starknet_getTransactionByHash\",\n \"params\": [\n \"0x295ee040949bd23a4bba5d5fa0d9d776c3b1fc7cafd511d025e689e665d05b2\"\n ]\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://starknet-mainnet.core.chainstack.com/365cf697a3ad6d950b4c4a911e2e4f4d")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["Content-Type"] = 'application/json'
request.body = "{\n \"id\": 1,\n \"jsonrpc\": \"2.0\",\n \"method\": \"starknet_getTransactionByHash\",\n \"params\": [\n \"0x295ee040949bd23a4bba5d5fa0d9d776c3b1fc7cafd511d025e689e665d05b2\"\n ]\n}"
response = http.request(request)
puts response.read_bodyStarknet OpenRPC specFor the latest version of the publicly maintained OpenRPC spec, see the Starknet specs GitHub repo.
Get your own node endpoint todayStart for free and get your app to production levels immediately. No credit card required.You can sign up with your GitHub, X, Google, or Microsoft account.
Parameters
hash— the string of the transaction hash.
Response
transaction— the details of the transaction, including its sender, receiver, amount, and status.
Use case
A practical use case forstarknet_getTransactionByHash is to retrieve the details of a specific transaction. For example, a wallet may use this method to display the details of a user’s past transactions, or a client may use it to verify the status of a transaction.
Deprecated feeder gateway method
The feeder gateway was deprecated on December 11, 2023. Example of the call you had to make to the feeder gateway before the deprecation:Shell
curl 'https://alpha-mainnet.starknet.io/feeder_gateway/get_transaction_id_by_hash?transactionHash=0x295ee040949bd23a4bba5d5fa0d9d776c3b1fc7cafd511d025e689e665d05b2'
Last modified on June 22, 2026
Was this page helpful?