---
title: "Get transaction"
method: GET
path: "/v1/tx/detail"
tags: ["Transaction"]
---

# Get transaction

`GET /v1/tx/detail`

Get the detail of a transaction given the transaction hash.

Provide the param "hash" or ("block_number" and "tx_index"). If both params are provided,
"hash" will be used.

## Query parameters

- `chain_id` integer, required — chain network id, see [list of details](/platform/features/api/web3-api)
- `hash` string — The transaction hash
- `block_number` integer — Block number of the transaction
- `tx_index` integer — Index of the transaction

## Headers

- `x-api-key` string, required

## Response `200`

Successful Response

- ResponseGetTxDetail
  - `code` integer
  - `message` string
  - `data` TxDetail, required
    - `type` integer, required — tx type, 0: LegacyTx, 1: AccessListTx, 2: DynamicFeeTx, 3: BlobTx
    - `status` integer, required — tx status, 0: failed, 1: success
    - `block_number` integer, required — block number
    - `block_timestamp` string, date-time, required — block time
    - `transaction_hash` string, required — transaction hash
    - `transaction_index` integer, required — transaction index
    - `from_address` string, required — from address
    - `to_address` string, required — to address
    - `value` string, required — tx value
    - `input` string, required — tx input
    - `nonce` integer, required — from address nonce
    - `contract_address` string, required — contract address, when tx is contract creation tx
    - `gas` integer, required — gas limit
    - `gas_price` integer, required — gas price
    - `gas_used` integer, required — gas used
    - `effective_gas_price` integer, required — effective gas price
    - `cumulative_gas_used` integer, required — cumulative gas used
    - `max_fee_per_gas` integer, required — max fee per gas
    - `max_priority_fee_per_gas` integer, required — max priority fee per gas
    - `tx_fee` integer, required — tx fee
    - `saving_fee` integer, required — saving fee
    - `burnt_fee` integer, required — burnt fee

## Other responses

- `400` — Bad Request
- `401` — Unauthorized
- `403` — Forbidden
- `404` — Not Found
- `422` — Unprocessable Entity
- `500` — Internal Server Error

---

[API](https://skmtc.dev/chainbase/apis/data-cloud-task-api.md) · [All operations](https://skmtc.dev/chainbase/apis/data-cloud-task-api/llms.txt) · [OpenAPI document](https://skmtc-service-production.skmtc.workers.dev/v1/apis/chainbase/data-cloud-task-api/revisions/4013781aa422/schema)
