---
title: "Get the account traces for a historical transaction on the network with the given transaction ID or hash"
method: GET
path: "/api/v1/contracts/results/{transactionIdOrHash}/prestate"
tags: ["contracts"]
---

# Get the account traces for a historical transaction on the network with the given transaction ID or hash

`GET /api/v1/contracts/results/{transactionIdOrHash}/prestate`

## Request

- Base URL: `` (relative, and the document was published on a file host, not at the API’s origin)
- URL: `/api/v1/contracts/results/{transactionIdOrHash}/prestate`
- Auth: none declared. Required headers: `Accept-Encoding`

Inspects contract result related data for a transaction and returns a response containing detailed information
for the accounts needed for the transaction execution with some basic fields about them.

The `Accept-Encoding` request header must include `gzip`. Responses can be large (especially with `code` or
`storage`), and compression is required to keep the payload size bounded.

When `diff=true`, each `post` entry always includes `address` and only the fields that changed relative to the
matching `pre` entry. Unchanged storage keys are omitted; slots cleared during the transaction are reported as
a 32-byte zero word.

## Path parameters

- `transactionIdOrHash` string, required

## Query parameters

- `diff` boolean
- `code` boolean
- `storage` boolean

## Headers

- `Accept-Encoding` string, required

## Response `200`

OK

- PrestateResponse
  - `pre` PrestateAccountTrace[]: The accounts/contracts which state is touched during transaction execution
    - `address` string, binary: the address of the account
    - `balance` string, binary: The account balance as a hex-encoded quantity in weibars
    - `code` string, binary: the bytecode of the account
    - `nonce` integer: the nonce of the account
    - `storage` object: The storage slots (keys and values in hex) of the contract which is read from and written to
  - `post` PrestateAccountTrace[]: Account traces after execution, present only in diff mode. Each entry always includes `address` and only the fields that changed relative to the matching pre entry. Unchanged storage keys are omitted; cleared slots are a 32-byte zero word.
    - `address` string, binary: the address of the account
    - `balance` string, binary: The account balance as a hex-encoded quantity in weibars
    - `code` string, binary: the bytecode of the account
    - `nonce` integer: the nonce of the account
    - `storage` object: The storage slots (keys and values in hex) of the contract which is read from and written to

## Other responses

- `400`: Validation error
- `404`: Transaction or record file not found
- `406`: Accept-Encoding must include gzip
- `429`: Too many requests
- `500`: Generic error
- `501`: Not implemented error

## Changes

- **2026-10-13** (v1) `4deb07b77b7d`: 1 info
  - endpoint added

[Operation history](https://skmtc.dev/hiero-ledger/apis/mirror-node-rest-api/changes/api/v1/contracts/results/:transactionIdOrHash/prestate/get.md)

---

[API](https://skmtc.dev/hiero-ledger/apis/mirror-node-rest-api.md) - [All operations](https://skmtc.dev/hiero-ledger/apis/mirror-node-rest-api/llms.txt) - [OpenAPI document](https://skmtc.dev/hiero-ledger/apis/mirror-node-rest-api/revisions/e27696aab264?raw)
