starknet_traceBlockTransactions
curl --request POST \
--url https://starknet-mainnet.core.chainstack.com/mt_c524ad9781ae5dccd9ac6f5b0370e \
--header 'Content-Type: application/json' \
--data '
{
"id": 1,
"jsonrpc": "2.0",
"method": "starknet_traceBlockTransactions",
"params": {
"block_id": {
"block_number": 5000000
}
}
}
'import requests
url = "https://starknet-mainnet.core.chainstack.com/mt_c524ad9781ae5dccd9ac6f5b0370e"
payload = {
"id": 1,
"jsonrpc": "2.0",
"method": "starknet_traceBlockTransactions",
"params": { "block_id": { "block_number": 5000000 } }
}
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_traceBlockTransactions',
params: {block_id: {block_number: 5000000}}
})
};
fetch('https://starknet-mainnet.core.chainstack.com/mt_c524ad9781ae5dccd9ac6f5b0370e', 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/mt_c524ad9781ae5dccd9ac6f5b0370e",
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_traceBlockTransactions',
'params' => [
'block_id' => [
'block_number' => 5000000
]
]
]),
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/mt_c524ad9781ae5dccd9ac6f5b0370e"
payload := strings.NewReader("{\n \"id\": 1,\n \"jsonrpc\": \"2.0\",\n \"method\": \"starknet_traceBlockTransactions\",\n \"params\": {\n \"block_id\": {\n \"block_number\": 5000000\n }\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/mt_c524ad9781ae5dccd9ac6f5b0370e")
.header("Content-Type", "application/json")
.body("{\n \"id\": 1,\n \"jsonrpc\": \"2.0\",\n \"method\": \"starknet_traceBlockTransactions\",\n \"params\": {\n \"block_id\": {\n \"block_number\": 5000000\n }\n }\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://starknet-mainnet.core.chainstack.com/mt_c524ad9781ae5dccd9ac6f5b0370e")
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_traceBlockTransactions\",\n \"params\": {\n \"block_id\": {\n \"block_number\": 5000000\n }\n }\n}"
response = http.request(request)
puts response.read_bodyStarknet node API
starknet_traceBlockTransactions | Starknet
Starknet API method that returns the execution trace of all transactions in a given block. starknet_traceBlockTransactions on Starknet via Chainstack.
POST
/
mt_c524ad9781ae5dccd9ac6f5b0370e
starknet_traceBlockTransactions
curl --request POST \
--url https://starknet-mainnet.core.chainstack.com/mt_c524ad9781ae5dccd9ac6f5b0370e \
--header 'Content-Type: application/json' \
--data '
{
"id": 1,
"jsonrpc": "2.0",
"method": "starknet_traceBlockTransactions",
"params": {
"block_id": {
"block_number": 5000000
}
}
}
'import requests
url = "https://starknet-mainnet.core.chainstack.com/mt_c524ad9781ae5dccd9ac6f5b0370e"
payload = {
"id": 1,
"jsonrpc": "2.0",
"method": "starknet_traceBlockTransactions",
"params": { "block_id": { "block_number": 5000000 } }
}
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_traceBlockTransactions',
params: {block_id: {block_number: 5000000}}
})
};
fetch('https://starknet-mainnet.core.chainstack.com/mt_c524ad9781ae5dccd9ac6f5b0370e', 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/mt_c524ad9781ae5dccd9ac6f5b0370e",
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_traceBlockTransactions',
'params' => [
'block_id' => [
'block_number' => 5000000
]
]
]),
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/mt_c524ad9781ae5dccd9ac6f5b0370e"
payload := strings.NewReader("{\n \"id\": 1,\n \"jsonrpc\": \"2.0\",\n \"method\": \"starknet_traceBlockTransactions\",\n \"params\": {\n \"block_id\": {\n \"block_number\": 5000000\n }\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/mt_c524ad9781ae5dccd9ac6f5b0370e")
.header("Content-Type", "application/json")
.body("{\n \"id\": 1,\n \"jsonrpc\": \"2.0\",\n \"method\": \"starknet_traceBlockTransactions\",\n \"params\": {\n \"block_id\": {\n \"block_number\": 5000000\n }\n }\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://starknet-mainnet.core.chainstack.com/mt_c524ad9781ae5dccd9ac6f5b0370e")
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_traceBlockTransactions\",\n \"params\": {\n \"block_id\": {\n \"block_number\": 5000000\n }\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
-
block_id— the hash of the requested block, or number (height) of the requested block, or a block tag:block_hash— hash of the block.block_number— block number, as an integer.block_tag—latestfor the latest block finalized by consensus on L2, orl1_acceptedfor the latest block included in a state update on L1 and finalized by consensus on L1. The Starknet spec doesn’t allowpre_confirmedfor this method.
Response
result— the execution trace of all transactions in the block, represented as a list of transaction traces.
Use case
A practical use case forstarknet_traceBlockTransactions is to analyze the execution of transactions in a specific block. This can be useful for debugging purposes, as it allows developers to understand the sequence of operations that were performed during the execution of each transaction.Last modified on November 13, 2026
Was this page helpful?