Get Block Traces
curl --request GET \
--url https://api-gateway.sonarx.com/api/v1/customer/{chain}/blocks/traces \
--header 'apikey: <api-key>'import requests
url = "https://api-gateway.sonarx.com/api/v1/customer/{chain}/blocks/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}/blocks/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}/blocks/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}/blocks/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}/blocks/traces")
.header("apikey", "<api-key>")
.asString();require 'uri'
require 'net/http'
url = URI("https://api-gateway.sonarx.com/api/v1/customer/{chain}/blocks/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{
"block_number": 81901165,
"offset": 0,
"limit": 10,
"result": [
{
"block_number": 81901165,
"timestamp": 1768922302,
"datetime": "2026-01-20T15:18:22",
"transaction_hash": "0x6a9cb0071fe44d7cf50962bc9ea05dfe45662d34c71f4f8b12fb3918f62f9692",
"transaction_index": 0,
"trace_address": "0.0.0.0",
"transaction_from": "0x17fc3813d8761eab20e8d16ba7d38b92547dec91",
"transaction_to": "0x4eb48fecfb61873809270972f7d9d5a90c23752d",
"transaction_status": false,
"call_type": "delegatecall",
"from_address": "0x3c499c542cef5e3811e1192ce70d8cc03d5c3359",
"to_address": "0x235ae97b28466db30469b89a9fe4cff0659f82cb",
"gas": 168760,
"gas_used": 16263,
"gas_refund": 152497,
"value": "0",
"subtraces": 0,
"type": "call",
"input": "0xa9059cbb0000000000000000000000004eb48fecfb61873809270972f7d9d5a90c23752d000000000000000000000000000000000000000000000000000000000a6751f4",
"output": "0x0000000000000000000000000000000000000000000000000000000000000001",
"error": null,
"function_signature": "0xa9059cbb",
"version": 0
}
],
"count": 1
}{
"detail": "<string>"
}{
"detail": "<string>"
}{
"detail": "<string>"
}{
"detail": "<string>"
}Traces
Get Block Traces
Get traces for all transactions in a block
GET
/
api
/
v1
/
customer
/
{chain}
/
blocks
/
traces
Get Block Traces
curl --request GET \
--url https://api-gateway.sonarx.com/api/v1/customer/{chain}/blocks/traces \
--header 'apikey: <api-key>'import requests
url = "https://api-gateway.sonarx.com/api/v1/customer/{chain}/blocks/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}/blocks/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}/blocks/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}/blocks/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}/blocks/traces")
.header("apikey", "<api-key>")
.asString();require 'uri'
require 'net/http'
url = URI("https://api-gateway.sonarx.com/api/v1/customer/{chain}/blocks/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{
"block_number": 81901165,
"offset": 0,
"limit": 10,
"result": [
{
"block_number": 81901165,
"timestamp": 1768922302,
"datetime": "2026-01-20T15:18:22",
"transaction_hash": "0x6a9cb0071fe44d7cf50962bc9ea05dfe45662d34c71f4f8b12fb3918f62f9692",
"transaction_index": 0,
"trace_address": "0.0.0.0",
"transaction_from": "0x17fc3813d8761eab20e8d16ba7d38b92547dec91",
"transaction_to": "0x4eb48fecfb61873809270972f7d9d5a90c23752d",
"transaction_status": false,
"call_type": "delegatecall",
"from_address": "0x3c499c542cef5e3811e1192ce70d8cc03d5c3359",
"to_address": "0x235ae97b28466db30469b89a9fe4cff0659f82cb",
"gas": 168760,
"gas_used": 16263,
"gas_refund": 152497,
"value": "0",
"subtraces": 0,
"type": "call",
"input": "0xa9059cbb0000000000000000000000004eb48fecfb61873809270972f7d9d5a90c23752d000000000000000000000000000000000000000000000000000000000a6751f4",
"output": "0x0000000000000000000000000000000000000000000000000000000000000001",
"error": null,
"function_signature": "0xa9059cbb",
"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"
Query Parameters
Block number to query (>= 0)
Required range:
x >= 0Example:
81901165
Maximum number of results (1-50)
Required range:
1 <= x <= 50Number of results to skip for pagination
Required range:
x >= 0⌘I