Skip to main content

trace_get

Returns a trace at a specific position within a transaction on Sonic.

Archive Node Required

This method requires an archive node. It is not available on full nodes.

Use Cases#

  • Specific trace lookup - Get a single trace by its position index
  • Internal call inspection - Examine a specific internal call
  • Targeted debugging - Investigate particular call depth for ultra-fast DeFi, high-frequency trading dApps, and performance-critical applications

Parameters#

ParameterTypeRequiredDescription
txHashDATAYes32-byte transaction hash
indicesArray<QUANTITY>YesTrace index positions (e.g., ["0x0"] for the first trace)

Request#

{
"jsonrpc": "2.0",
"method": "trace_get",
"params": ["0xac0f2115a24c6f7b52989a17a8b0f8a6013a0d84df3ba93254fc26a116508938", ["0x0"]],
"id": 1
}

Code Examples#

curl -X POST https://api-sonic-mainnet-archive.n.dwellir.com/YOUR_API_KEY \
-H "Content-Type: application/json" \
-d '{
"jsonrpc": "2.0",
"method": "trace_get",
"params": ["0xac0f2115a24c6f7b52989a17a8b0f8a6013a0d84df3ba93254fc26a116508938", ["0x0"]],
"id": 1
}'