Skip to content

Traces ​

Both endpoints return an execution trace as a compressed binary blob (application/octet-stream). Decode it with the SDK's getTransactionTrace / getSimulationTrace / decodeTrace; see Execution traces for what a trace contains.

A 404 means there is no trace: the transaction ran no Clarity code, or (in a session) the step is not a Transaction, or the session was created with skip_tracing: true.

On-chain transaction ​

GET /inspect/{block_height}/{block_hash}/{txid}

ParameterMeaning
block_heightStacks block height of the block that holds the transaction
block_hashThat block's hash (block_hash in the Stacks API, not index_block_hash), 64 hex chars, no 0x
txidTransaction id, 64 hex chars, no 0x
sh
curl -s -o trace.bin -w '%{http_code} %{content_type} %{size_download}\n' \
  https://api.stxer.xyz/inspect/1018838/89945f0d9956794d453adb28d78302002a1d16885d8b4de3ee598ec69c631a54/c1bfb9616c51a17859c48f1716eefdd5ea9646f59b8e6c082033370ae17e33fa
# 200 application/octet-stream 12993

Decoded, this trace has 740 nodes across 7 contracts; the root is amm-pool-v2-01:swap-helper returning (ok u112248824) with runtime 540244.

Simulated transaction ​

GET /devtools/v2/simulations/{id}/inspect/{txid}

txid is the TxId of a Transaction step, as listed by GET /devtools/v2/simulations/{id}.

sh
curl -s -o sim-trace.bin -w '%{http_code} %{content_type}\n' \
  https://api.stxer.xyz/devtools/v2/simulations/ed81e6c266077d3cf56d640f9a543468/inspect/a1b639036dc4d55dfb3a7326d4917c0020e6340b0156f9bd1670a0a5122b3c9e
# 200 application/octet-stream

Decoded, the root returns EarlyReturn(UnwrapFailed(…)) carrying u2011: an unwrap! in the swap gave up, and the receipt of that step reports the same (err u2011).