Get Transaction Traces
curl --request GET \
--url https://api-gateway.sonarx.com/api/v1/customer/{chain}/transactions/{tx_hash}/traces \
--header 'apikey: <api-key>'import requests
url = "https://api-gateway.sonarx.com/api/v1/customer/{chain}/transactions/{tx_hash}/traces"
headers = {"apikey": "<api-key>"}
response = requests.get(url, headers=headers)
print(response.text)const options = {method: 'GET', headers: {apikey: '<api-key>'}};
fetch('https://api-gateway.sonarx.com/api/v1/customer/{chain}/transactions/{tx_hash}/traces', 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://api-gateway.sonarx.com/api/v1/customer/{chain}/transactions/{tx_hash}/traces",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "GET",
CURLOPT_HTTPHEADER => [
"apikey: <api-key>"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"net/http"
"io"
)
func main() {
url := "https://api-gateway.sonarx.com/api/v1/customer/{chain}/transactions/{tx_hash}/traces"
req, _ := http.NewRequest("GET", url, nil)
req.Header.Add("apikey", "<api-key>")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.get("https://api-gateway.sonarx.com/api/v1/customer/{chain}/transactions/{tx_hash}/traces")
.header("apikey", "<api-key>")
.asString();require 'uri'
require 'net/http'
url = URI("https://api-gateway.sonarx.com/api/v1/customer/{chain}/transactions/{tx_hash}/traces")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Get.new(url)
request["apikey"] = '<api-key>'
response = http.request(request)
puts response.read_body{
"transaction_hash": "0x0063079708b5fab44762765a01c17ab2754ebc15cb9ecd0e14fcbbd520452c27",
"offset": 0,
"limit": 10,
"result": [
{
"block_number": 81911103,
"timestamp": 1768942178,
"datetime": "2026-01-20T20:49:38",
"transaction_hash": "0x0063079708b5fab44762765a01c17ab2754ebc15cb9ecd0e14fcbbd520452c27",
"transaction_index": 80,
"trace_address": "",
"transaction_from": "0xb63c1246a11edc1e784c39ab95295e4180c5071b",
"transaction_to": "0x9ead30c8518a19f0b493eea1bd5af8fcc5fd4ba2",
"transaction_status": true,
"call_type": "call",
"from_address": "0xb63c1246a11edc1e784c39ab95295e4180c5071b",
"to_address": "0x9ead30c8518a19f0b493eea1bd5af8fcc5fd4ba2",
"gas": 200,
"gas_used": 0,
"gas_refund": 200,
"value": "100000000000",
"subtraces": 0,
"type": "call",
"input": "0x",
"output": "0x",
"error": null,
"function_signature": "0x",
"version": 0
}
],
"count": 1
}{
"detail": "<string>"
}{
"detail": "<string>"
}{
"detail": "<string>"
}{
"detail": "<string>"
}Traces
Get Transaction Traces
Get execution trace for a specific transaction
GET
/
api
/
v1
/
customer
/
{chain}
/
transactions
/
{tx_hash}
/
traces
Get Transaction Traces
curl --request GET \
--url https://api-gateway.sonarx.com/api/v1/customer/{chain}/transactions/{tx_hash}/traces \
--header 'apikey: <api-key>'import requests
url = "https://api-gateway.sonarx.com/api/v1/customer/{chain}/transactions/{tx_hash}/traces"
headers = {"apikey": "<api-key>"}
response = requests.get(url, headers=headers)
print(response.text)const options = {method: 'GET', headers: {apikey: '<api-key>'}};
fetch('https://api-gateway.sonarx.com/api/v1/customer/{chain}/transactions/{tx_hash}/traces', 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://api-gateway.sonarx.com/api/v1/customer/{chain}/transactions/{tx_hash}/traces",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "GET",
CURLOPT_HTTPHEADER => [
"apikey: <api-key>"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"net/http"
"io"
)
func main() {
url := "https://api-gateway.sonarx.com/api/v1/customer/{chain}/transactions/{tx_hash}/traces"
req, _ := http.NewRequest("GET", url, nil)
req.Header.Add("apikey", "<api-key>")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.get("https://api-gateway.sonarx.com/api/v1/customer/{chain}/transactions/{tx_hash}/traces")
.header("apikey", "<api-key>")
.asString();require 'uri'
require 'net/http'
url = URI("https://api-gateway.sonarx.com/api/v1/customer/{chain}/transactions/{tx_hash}/traces")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Get.new(url)
request["apikey"] = '<api-key>'
response = http.request(request)
puts response.read_body{
"transaction_hash": "0x0063079708b5fab44762765a01c17ab2754ebc15cb9ecd0e14fcbbd520452c27",
"offset": 0,
"limit": 10,
"result": [
{
"block_number": 81911103,
"timestamp": 1768942178,
"datetime": "2026-01-20T20:49:38",
"transaction_hash": "0x0063079708b5fab44762765a01c17ab2754ebc15cb9ecd0e14fcbbd520452c27",
"transaction_index": 80,
"trace_address": "",
"transaction_from": "0xb63c1246a11edc1e784c39ab95295e4180c5071b",
"transaction_to": "0x9ead30c8518a19f0b493eea1bd5af8fcc5fd4ba2",
"transaction_status": true,
"call_type": "call",
"from_address": "0xb63c1246a11edc1e784c39ab95295e4180c5071b",
"to_address": "0x9ead30c8518a19f0b493eea1bd5af8fcc5fd4ba2",
"gas": 200,
"gas_used": 0,
"gas_refund": 200,
"value": "100000000000",
"subtraces": 0,
"type": "call",
"input": "0x",
"output": "0x",
"error": null,
"function_signature": "0x",
"version": 0
}
],
"count": 1
}{
"detail": "<string>"
}{
"detail": "<string>"
}{
"detail": "<string>"
}{
"detail": "<string>"
}Polygon Data Availability: Polygon traces are only available from January 2025 onwards.
Authorizations
API key for authentication
Path Parameters
The blockchain network to query
Available options:
polygon Example:
"polygon"
Transaction hash (66 character hex string starting with 0x)
Pattern:
^0x[a-fA-F0-9]{64}$Example:
"0x00dcc066aad65ae4f10c0fc4ec1fac5d3693c12c01d98a9f6a87448be9b26200"
Query Parameters
Maximum number of results (1-50)
Required range:
1 <= x <= 50Number of results to skip for pagination
Required range:
x >= 0⌘I