---
title: "Retrieve a transaction by global index number"
method: GET
path: "/blockchain/transaction/byIndex/{txIndex}"
tags: ["blockchain"]
---

# Retrieve a transaction by global index number

`GET /blockchain/transaction/byIndex/{txIndex}`

## Path parameters

- `txIndex` number, required

## Response `200`

transaction with wanted index

- IndexedErgoTransaction — Transaction indexed with extra information
  - `id` string, base16, required — Base16-encoded transaction id bytes
  - `inputs` IndexedErgoBox[], required — Transaction inputs
    - `boxId` string, base16 — Base16-encoded transaction box id bytes. Should be 32 bytes long
    - `value` integer, required — Amount of Ergo token
    - `ergoTree` string, base16, required — Base16-encoded ergo tree bytes
    - `creationHeight` integer, required — Height the output was created at
    - `assets` Asset[] — Assets list in the transaction
      - `tokenId` string, base16, required — Base16-encoded 32 byte digest
      - `amount` integer, required — Amount of the token
    - `additionalRegisters` Registers, required — Ergo box registers
    - `transactionId` string, base16 — Base16-encoded transaction id bytes
    - `index` integer — Index in the transaction outputs
    - `address` string, required — Encoded Ergo Address
    - `spentTransactionId` string, base16, required — Base16-encoded 32 byte modifier id
    - `spendingHeight` integer, nullable, required — The height the box was spent at
    - `inclusionHeight` integer, required — The height the transaction containing the box was included in a block at
    - `spendingProof` SpendingProof — Spending proof for transaction input
      - `proofBytes` string, base16, required — Base16-encoded spending proofs
      - `extension` object, required — Variables to be put into context
    - `globalIndex` integer, required — Global index of the output in the blockchain
  - `dataInputs` ErgoTransactionDataInput[], required — Transaction data inputs
    - `boxId` string, base16, required — Base16-encoded transaction box id bytes. Should be 32 bytes long
  - `outputs` IndexedErgoBox[], required — Transaction outputs
    - `boxId` string, base16 — Base16-encoded transaction box id bytes. Should be 32 bytes long
    - `value` integer, required — Amount of Ergo token
    - `ergoTree` string, base16, required — Base16-encoded ergo tree bytes
    - `creationHeight` integer, required — Height the output was created at
    - `assets` Asset[] — Assets list in the transaction
      - `tokenId` string, base16, required — Base16-encoded 32 byte digest
      - `amount` integer, required — Amount of the token
    - `additionalRegisters` Registers, required — Ergo box registers
    - `transactionId` string, base16 — Base16-encoded transaction id bytes
    - `index` integer — Index in the transaction outputs
    - `address` string, required — Encoded Ergo Address
    - `spentTransactionId` string, base16, required — Base16-encoded 32 byte modifier id
    - `spendingHeight` integer, nullable, required — The height the box was spent at
    - `inclusionHeight` integer, required — The height the transaction containing the box was included in a block at
    - `spendingProof` SpendingProof — Spending proof for transaction input
      - `proofBytes` string, base16, required — Base16-encoded spending proofs
      - `extension` object, required — Variables to be put into context
    - `globalIndex` integer, required — Global index of the output in the blockchain
  - `inclusionHeight` integer, required — Height of a block the transaction was included in
  - `numConfirmations` integer, required — Number of transaction confirmations
  - `blockId` string, base16, required — Base16-encoded 32 byte modifier id
  - `timestamp` integer, required — Basic timestamp definition
  - `index` integer, required — index of the transaction in the block it was included in
  - `globalIndex` integer, required — Global index of the transaction in the blockchain
  - `size` integer, required — Size in bytes

## Other responses

- `404` — Transaction with this index doesn't exist
- `default` — Error

---

[API](https://skmtc.net/ergoplatform/apis/ergo-node-api.md) · [All operations](https://skmtc.net/ergoplatform/apis/ergo-node-api/llms.txt) · [OpenAPI document](https://skmtc-service-staging.skmtc.workers.dev/v1/apis/ergoplatform/ergo-node-api/versions/ef97e678f020/schema)
