---
updatedAt: 2026-06-04T15:59:02.000Z
---

Fetch the complete documentation index at: https://docs.blockdaemon.com/llms.txt. Use this file to discover all available pages before exploring further. Append .md to any documentation page URL to get its markdown version.

# Get a Transaction

Returns a transaction by a user-defined transaction hash.

<Callout icon="💡" theme="default">
  ### **Compute Unit Value**: `5` (fixed)
</Callout>

***

> ❗️ Note
>
> For Polkadot (DOT), the transaction hash is **not a unique identifier**. Instead, you must use the format `$blocknumber-$index` (e.g., `23298706-2`).
>
> For more details on the concept, refer to the [Polkadot documentation](https://wiki.polkadot.network/docs/build-protocol-info#unique-identifiers-for-extrinsics).

<HTMLBlock>{`
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8" />
<meta name="viewport" content="width=device-width, initial-scale=1" />
<style>
  body {
    font-family: Arial, sans-serif;
  }
  .filter-box {
    width: 100%;
  }
  .table-container {
    border: 1px solid #ccc;
    margin-top: 15px;
  }
  .show {
    display: block;
  }
  .scrollable-table {
    max-height: 320px;
    overflow-y: scroll;
  }
  table {
    width: 100%;
    border-collapse: collapse;
    table-layout: fixed;
  }
  th, td {
    border: 1px solid #ccc;
    padding: 10px;
    vertical-align: top;
    word-wrap: break-word;
  }
  #protocolTableSearchable th {
    text-align: left;
    position: sticky;
    top: 0;
    background-clip: padding-box;
    z-index: 1;
    background-color: #230688;
    color: white !important;
  }
  code {
    background-color: #eee;
    padding: 2px 6px;
    border-radius: 4px;
    font-family: monospace;
    cursor: pointer;
    transition: background-color 0.2s ease;
    position: relative;
  }
  code:hover {
    background-color: #ddd;
  }
  [data-color-mode="dark"] code:hover {
    background-color: #637288;
  }
  .tooltip {
    position: absolute;
    background-color: #333;
    color: white;
    padding: 8px 12px;
    border-radius: 4px;
    font-size: 12px;
    z-index: 1000;
    white-space: nowrap;
    pointer-events: none;
    opacity: 0;
    transition: opacity 0.2s ease;
    font-family: Arial, sans-serif;
  }
  .tooltip.show {
    opacity: 1;
  }
  .tooltip::after {
    content: '';
    position: absolute;
    top: 100%;
    left: 50%;
    margin-left: -5px;
    border-width: 5px;
    border-style: solid;
    border-color: #333 transparent transparent transparent;
  }
  [data-color-mode="light"] .protocol-group-odd td {
    background-color: #ffffff;
  }
  [data-color-mode="light"] .protocol-group-even td {
    background-color: #f5f5f5;
  }
  [data-color-mode="dark"] .protocol-group-odd td {
    background-color: #242e34;
  }
  [data-color-mode="dark"] .protocol-group-even td {
    background-color: #4f5a66;
  }
</style>
</head>
<body>

<h3>Supported Protocols & Networks</h3>

<div class="table-container show">
  <input type="text" id="searchProtocolInput" class="filter-box" placeholder="Search protocol name..." onkeyup="filterTable()" />
  <div class="scrollable-table">
    <table id="protocolTableSearchable">
      <thead>
        <tr>
          <th>Protocol</th>
          <th>Network</th>
          <th>Path Parameter</th>
        </tr>
      </thead>
<tbody>
  <tr class="protocol-group-odd">
    <td>Algorand</td>
    <td>Mainnet</td>
    <td><code class="copyable-code">algorand/mainnet</code></td>
  </tr>

  <tr class="protocol-group-even">
    <td rowspan="2">Avalanche</td>
    <td>Mainnet-c</td>
    <td><code class="copyable-code">avalanche/mainnet-c</code></td>
  </tr>
  <tr class="protocol-group-even">
    <td>Testnet-c</td>
    <td><code class="copyable-code">avalanche/testnet-c</code></td>
  </tr>

  <tr class="protocol-group-odd">
    <td rowspan="3">Bitcoin</td>
    <td>Mainnet</td>
    <td><code class="copyable-code">bitcoin/mainnet</code></td>
  </tr>
  <tr class="protocol-group-odd">
    <td>Testnet</td>
    <td><code class="copyable-code">bitcoin/testnet</code></td>
  </tr>
  <tr class="protocol-group-odd">
    <td>Testnet4</td>
    <td><code class="copyable-code">bitcoin/testnet4</code></td>
  </tr>

  <tr class="protocol-group-even">
    <td rowspan="2">Bitcoincash</td>
    <td>Mainnet</td>
    <td><code class="copyable-code">bitcoincash/mainnet</code></td>
  </tr>
  <tr class="protocol-group-even">
    <td>Testnet</td>
    <td><code class="copyable-code">bitcoincash/testnet</code></td>
  </tr>

  <tr class="protocol-group-odd">
    <td rowspan="2">Dogecoin</td>
    <td>Mainnet</td>
    <td><code class="copyable-code">dogecoin/mainnet</code></td>
  </tr>
  <tr class="protocol-group-odd">
    <td>Testnet</td>
    <td><code class="copyable-code">dogecoin/testnet</code></td>
  </tr>

  <tr class="protocol-group-even">
    <td rowspan="3">Ethereum</td>
    <td>Mainnet</td>
    <td><code class="copyable-code">ethereum/mainnet</code></td>
  </tr>
  <tr class="protocol-group-even">
    <td>Sepolia</td>
    <td><code class="copyable-code">ethereum/sepolia</code></td>
  </tr>
  <tr class="protocol-group-even">
    <td>Hoodi</td>
    <td><code class="copyable-code">ethereum/hoodi</code></td>
  </tr>

  <tr class="protocol-group-odd">
    <td rowspan="2">Litecoin</td>
    <td>Mainnet</td>
    <td><code class="copyable-code">litecoin/mainnet</code></td>
  </tr>
  <tr class="protocol-group-odd">
    <td>Testnet</td>
    <td><code class="copyable-code">litecoin/testnet</code></td>
  </tr>

  <tr class="protocol-group-even">
    <td>Optimism</td>
    <td>Mainnet</td>
    <td><code class="copyable-code">optimism/mainnet</code></td>
  </tr>

  <tr class="protocol-group-odd">
    <td rowspan="2">Polkadot</td>
    <td>Mainnet</td>
    <td><code class="copyable-code">polkadot/mainnet</code></td>
  </tr>
  <tr class="protocol-group-odd">
    <td>Westend</td>
    <td><code class="copyable-code">polkadot/westend</code></td>
  </tr>

  <tr class="protocol-group-even">
    <td rowspan="2">Polygon</td>
    <td>Mainnet</td>
    <td><code class="copyable-code">polygon/mainnet</code></td>
  </tr>
  <tr class="protocol-group-even">
    <td>Amoy</td>
    <td><code class="copyable-code">polygon/amoy</code></td>
  </tr>

  <tr class="protocol-group-odd">
    <td rowspan="3">Solana</td>
    <td>Mainnet</td>
    <td><code class="copyable-code">solana/mainnet</code></td>
  </tr>
  <tr class="protocol-group-odd">
    <td>Testnet</td>
    <td><code class="copyable-code">solana/testnet</code></td>
  </tr>
  <tr class="protocol-group-odd">
    <td>Devnet</td>
    <td><code class="copyable-code">solana/devnet</code></td>
  </tr>
  <tr class="protocol-group-even">
    <td rowspan="2">Stellar</td>
    <td>Mainnet</td>
    <td><code class="copyable-code">stellar/mainnet</code></td>
  </tr>
  <tr class="protocol-group-even">
    <td>Testnet</td>
    <td><code class="copyable-code">stellar/testnet</code></td>
  </tr>

  <tr class="protocol-group-even">
    <td rowspan="2">XRP</td>
    <td>Mainnet</td>
    <td><code class="copyable-code" title="Click to copy">xrp/mainnet</code></td>
  </tr>
  <tr class="protocol-group-even">
    <td>Testnet</td>
    <td><code class="copyable-code" title="Click to copy">xrp/testnet</code></td>
  </tr>
</tbody>

    </table>
  </div>
</div>

<script>
  function filterTable() {
    const input = document.getElementById('searchProtocolInput').value.toLowerCase();
    const rows = document.querySelectorAll('#protocolTableSearchable tbody tr');
    rows.forEach(row => {
      row.style.display = row.innerText.toLowerCase().includes(input) ? '' : 'none';
    });
  }
</script>

</body>
</html>
`}</HTMLBlock>

<br />

<br />

> 🚧 Truncation Info
>
> For responses that have big numbers (such as in transfer amounts from blockchain transactions), truncation might be applied from Javascript’s native JSON parser.
>
> To avoid this behavior, we recommend using a library such as [`json-bigint`](https://github.com/sidorares/json-bigint) or [`lossless-json`](https://github.com/josdejong/lossless-json)

# OpenAPI definition

```json
{
  "openapi": "3.0.0",
  "info": {
    "version": "3.0.0",
    "title": "Blockdaemon REST API",
    "description": "Blockdaemon REST API provides a RESTful and uniform way to access blockchain resources,\nwith a rich and reusable model across multiple protocols/cryptocurrencies.\n\n[Documentation](https://docs.blockdaemon.com/reference/rest-api-overview)\n\n### Currently supported protocols:\n\n* algorand\n  * mainnet\n* avalanche \n  * mainnet-c/testnet-c\n* bitcoin\n  * mainnet/testnet/testnet4\n* bitcoincash\n  * mainnet/testnet\n* dogecoin\n  * mainnet/testnet\n* ethereum\n  * mainnet/holesky/sepolia/hoodi\n* litecoin\n  * mainnet/testnet\n* near\n  * mainnet\n* optimism\n  * mainnet\n* polkadot\n  * mainnet/westend\n* polygon\n  * mainnet/amoy\n* solana\n  * mainnet/testnet\n* stellar\n  * mainnet/testnet\n* tezos\n  * mainnet\n* tron\n  * mainnet/nile\n* xrp\n  * mainnet\n\n### Pagination\nCertain resources contain a lot of data, more than what's practical\nto return for a single request.\nWith the help of pagination, the data is split across multiple responses.\nEach response returns a subset of the items requested, and a continuation token.\n\nTo get the next batch of items, copy the returned continuation token\nto the continuation query parameter and repeat the request with the new URL.\nIn case no continuation token is returned, there is no more data available.\n",
    "contact": {
      "name": "Blockdaemon",
      "email": "support@blockdaemon.com",
      "url": "https://blockdaemon.com"
    },
    "x-logo": {
      "url": "https://storage.googleapis.com/blockdaemon-app-static-images/marketing/PNG/dark-logo.png",
      "altText": "Blockdaemon logo"
    }
  },
  "x-readme": {
    "samples-languages": [
      "curl",
      "go",
      "javascript",
      "python",
      "node"
    ]
  },
  "servers": [
    {
      "url": "https://svc.blockdaemon.com/universal/{version}",
      "description": "Production server",
      "variables": {
        "version": {
          "enum": [
            "v1"
          ],
          "default": "v1"
        }
      }
    },
    {
      "url": "https://ubiquity.api.blockdaemon.com/{version}",
      "description": "[Legacy Auth] Production server",
      "variables": {
        "version": {
          "enum": [
            "v1"
          ],
          "default": "v1"
        }
      }
    }
  ],
  "tags": [
    {
      "name": "Transactions"
    }
  ],
  "security": [
    {
      "apiKeyAuthHeader": []
    },
    {
      "bearerAuth": []
    }
  ],
  "paths": {
    "/{protocol}/{network}/tx/{hash}": {
      "get": {
        "summary": "Get a Transaction",
        "description": "Returns a transaction by a user-defined transaction hash.",
        "operationId": "GetTxByHash",
        "tags": [
          "Transactions"
        ],
        "parameters": [
          {
            "in": "path",
            "name": "protocol",
            "required": true,
            "description": "Protocol handle, one of: `algorand`, `avalanche`, `bitcoin`, `bitcoincash`, `dogecoin`, `ethereum`, `litecoin`, `optimism`, `polkadot`, `polygon`, `solana`, `stellar` `tezos`, `xrp`.\n",
            "schema": {
              "type": "string",
              "default": "bitcoin"
            },
            "examples": {
              "Bitcoin": {
                "value": "bitcoin"
              }
            }
          },
          {
            "$ref": "#/components/parameters/network"
          },
          {
            "$ref": "#/components/parameters/tx-hash"
          }
        ],
        "responses": {
          "200": {
            "description": "Transaction",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/tx"
                },
                "example": {
                  "id": "71d4f3412ec11128bbd9ce988d5bff2ec3bb6ea3953c8faf189d88ae49de9f7a",
                  "block_id": "000000000000000000031911bca2ecf6c19ede467d81659f0c43a420ede1fd21",
                  "date": 1667882555,
                  "status": "completed",
                  "num_events": 4,
                  "meta": {
                    "index": 1562,
                    "vsize": 144
                  },
                  "block_number": 762213,
                  "confirmations": 39001,
                  "events": [
                    {
                      "id": "71d4f3412ec11128bbd9ce988d5bff2ec3bb6ea3953c8faf189d88ae49de9f7a-fee",
                      "transaction_id": "71d4f3412ec11128bbd9ce988d5bff2ec3bb6ea3953c8faf189d88ae49de9f7a",
                      "type": "fee",
                      "denomination": "BTC",
                      "meta": null,
                      "date": 1667882555,
                      "amount": 147,
                      "decimals": 8
                    },
                    {
                      "id": "input-55aeae5f9438ab72b52e51d0ebbe85d4509b6a853a60ebabe7bbd9dd33648c82-1",
                      "transaction_id": "71d4f3412ec11128bbd9ce988d5bff2ec3bb6ea3953c8faf189d88ae49de9f7a",
                      "type": "utxo_input",
                      "denomination": "BTC",
                      "source": "bc1qex0aqq8mxqfh4cpl62eg755836djjx20yzuuu8",
                      "meta": {
                        "addresses": [
                          "bc1qex0aqq8mxqfh4cpl62eg755836djjx20yzuuu8"
                        ],
                        "index": 1,
                        "script": "0014c99fd000fb30137ae03fd2b28f52878e9b29194f",
                        "script_type": "witness_v0_keyhash"
                      },
                      "date": 1667882555,
                      "amount": 81736,
                      "decimals": 8
                    },
                    {
                      "id": "71d4f3412ec11128bbd9ce988d5bff2ec3bb6ea3953c8faf189d88ae49de9f7a-0",
                      "transaction_id": "71d4f3412ec11128bbd9ce988d5bff2ec3bb6ea3953c8faf189d88ae49de9f7a",
                      "type": "utxo_output",
                      "denomination": "BTC",
                      "destination": "1A1zP1eP5QGefi2DMPTfTL5SLmv7DivfNa",
                      "meta": {
                        "addresses": [
                          "1A1zP1eP5QGefi2DMPTfTL5SLmv7DivfNa"
                        ],
                        "index": 0,
                        "script": "76a91462e907b15cbf27d5425399ebf6f0fb50ebb88f1888ac",
                        "script_type": "pubkeyhash"
                      },
                      "date": 1667882555,
                      "amount": 558,
                      "decimals": 8
                    },
                    {
                      "id": "71d4f3412ec11128bbd9ce988d5bff2ec3bb6ea3953c8faf189d88ae49de9f7a-1",
                      "transaction_id": "71d4f3412ec11128bbd9ce988d5bff2ec3bb6ea3953c8faf189d88ae49de9f7a",
                      "type": "utxo_output",
                      "denomination": "BTC",
                      "destination": "bc1qex0aqq8mxqfh4cpl62eg755836djjx20yzuuu8",
                      "meta": {
                        "addresses": [
                          "bc1qex0aqq8mxqfh4cpl62eg755836djjx20yzuuu8"
                        ],
                        "index": 1,
                        "script": "0014c99fd000fb30137ae03fd2b28f52878e9b29194f",
                        "script_type": "witness_v0_keyhash"
                      },
                      "date": 1667882555,
                      "amount": 81031,
                      "decimals": 8
                    }
                  ]
                }
              }
            }
          },
          "401": {
            "$ref": "#/components/responses/UnauthorizedError"
          },
          "404": {
            "$ref": "#/components/responses/NotFound"
          },
          "429": {
            "$ref": "#/components/responses/TooManyRequests"
          },
          "500": {
            "$ref": "#/components/responses/ServerError"
          },
          "503": {
            "$ref": "#/components/responses/ServiceUnavailable"
          }
        }
      }
    }
  },
  "components": {
    "securitySchemes": {
      "apiKeyAuthHeader": {
        "type": "apiKey",
        "in": "header",
        "name": "X-API-Key",
        "description": "Unlock higher TPS - Create your own API key in the [Blockdaemon App](https://app.blockdaemon.com).\n",
        "x-default": "2go1YqUcuAr4WZ2-3WgSD3c7qpatZqQuNWhTVBldKZnTSUtw"
      },
      "bearerAuth": {
        "type": "http",
        "scheme": "bearer",
        "bearerFormat": "Opaque",
        "description": "[Legacy Auth] Unlock higher TPS - Create your own API key in the [Blockdaemon App](https://app.blockdaemon.com).\n",
        "x-default": "2go1YqUcuAr4WZ2-3WgSD3c7qpatZqQuNWhTVBldKZnTSUtw"
      }
    },
    "responses": {
      "TooManyRequests": {
        "description": "Rate limit exceeded",
        "content": {
          "application/json": {
            "schema": {
              "$ref": "#/components/schemas/error"
            },
            "example": {
              "type": "too-many-requests",
              "title": "Too Many Requests",
              "status": 429,
              "detail": "Request rate limits have been exceeded. Try again after a few seconds."
            }
          }
        }
      },
      "NotFound": {
        "description": "Not Found",
        "content": {
          "application/json": {
            "schema": {
              "$ref": "#/components/schemas/error"
            },
            "example": {
              "type": "not-found",
              "title": "Not Found",
              "status": 404
            }
          }
        }
      },
      "UnauthorizedError": {
        "description": "Invalid or expired token",
        "content": {
          "application/json": {
            "schema": {
              "$ref": "#/components/schemas/error"
            },
            "example": {
              "type": "unauthorized",
              "title": "Invalid Token",
              "status": 401
            }
          }
        }
      },
      "ServerError": {
        "description": "An internal server error happened",
        "content": {
          "application/json": {
            "schema": {
              "$ref": "#/components/schemas/error"
            },
            "example": {
              "type": "internal-server-error",
              "title": "Internal Server Error",
              "status": 500
            }
          }
        }
      },
      "ServiceUnavailable": {
        "description": "The resource you are trying to access is currently unavailable",
        "content": {
          "application/json": {
            "schema": {
              "$ref": "#/components/schemas/error"
            },
            "example": {
              "type": "unavailable",
              "title": "Unavailable",
              "status": 503
            }
          }
        }
      }
    },
    "schemas": {
      "error": {
        "type": "object",
        "properties": {
          "type": {
            "type": "string",
            "description": "The HTTP error type.",
            "example": "bad-request"
          },
          "code": {
            "type": "integer",
            "description": "The numeric error code.",
            "example": 16384
          },
          "title": {
            "type": "string",
            "description": "The short error description.",
            "example": "Invalid Address"
          },
          "status": {
            "type": "integer",
            "description": "The HTTP status of the error.",
            "example": 400
          },
          "detail": {
            "type": "string",
            "description": "Long error description",
            "example": "The requested address is invalid on this protocol."
          }
        }
      },
      "event": {
        "type": "object",
        "properties": {
          "id": {
            "type": "string",
            "description": "The event identifier."
          },
          "transaction_id": {
            "type": "string",
            "description": "The transaction identifer this event is presented."
          },
          "type": {
            "type": "string",
            "description": "The event type.",
            "example": "transfer"
          },
          "denomination": {
            "type": "string",
            "nullable": true,
            "description": "The Symbol of currency, can be natibe currency or token currency."
          },
          "destination": {
            "type": "string",
            "nullable": true,
            "example": "1A1zP1eP5QGefi2DMPTfTL5SLmv7DivfNa",
            "description": "The destination address of the event."
          },
          "source": {
            "type": "string",
            "nullable": true,
            "description": "The source address of the event."
          },
          "meta": {
            "type": "object",
            "description": "Protocol specific data that doesn't fit into a standard model.",
            "properties": {
              "addresses": {
                "description": "A list of addresses.",
                "type": "array",
                "items": {
                  "type": "string"
                }
              },
              "index": {
                "description": "The index number.",
                "type": "integer"
              },
              "script": {
                "description": "The script.",
                "type": "string"
              },
              "script_type": {
                "description": "The script type.",
                "type": "string"
              }
            }
          },
          "date": {
            "type": "integer",
            "format": "int64",
            "description": "The event date in unix timestamp format."
          },
          "amount": {
            "type": "integer",
            "nullable": true,
            "format": "bigint",
            "example": 5000000000,
            "description": "The coin amount transfered in the event."
          },
          "decimals": {
            "type": "integer",
            "nullable": true,
            "description": "The coin amount transfered in the event."
          }
        }
      },
      "tx": {
        "type": "object",
        "properties": {
          "id": {
            "type": "string",
            "description": "Unique transaction identifier.",
            "example": "0xF00Fa860473130C1df10707223E66Cb4B839B165"
          },
          "block_id": {
            "type": "string",
            "description": "Block hash if mined, otherwise omitted.",
            "example": "0xaf2948aba2ed8cc7d5b7d4e4f4164a7c8819efc94d30aab3fce6904df68dbc07",
            "nullable": true
          },
          "date": {
            "type": "integer",
            "format": "int64",
            "description": "The transaction creation unix timestamp.",
            "example": 1571222657
          },
          "status": {
            "type": "string",
            "description": "Result status of the transaction.",
            "enum": [
              "completed",
              "failed"
            ]
          },
          "num_events": {
            "type": "integer",
            "description": "List of transaction events."
          },
          "meta": {
            "type": "object",
            "description": "Protocol specific data that doesn't fit into a standard model."
          },
          "block_number": {
            "type": "integer",
            "description": "Block number if mined, otherwise omitted.",
            "example": 789387,
            "nullable": true
          },
          "confirmations": {
            "type": "integer",
            "description": "Total transaction confirmations."
          },
          "events": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/event"
            },
            "nullable": true
          },
          "assets": {
            "type": "array",
            "description": "List of moved assets by asset path. Find all the asset paths on this [page](https://docs.blockdaemon.com/reference/available-currencies-and-tokens).",
            "uniqueItems": true,
            "items": {
              "type": "string",
              "example": "ethereum/native/eth"
            },
            "nullable": true
          },
          "nonce": {
            "type": "integer",
            "description": "The nonce of the transaction."
          }
        }
      }
    },
    "parameters": {
      "network": {
        "name": "network",
        "in": "path",
        "required": true,
        "description": "Which network to target. Available networks can be found in the list of supported protocols or with /{protocol}.",
        "schema": {
          "type": "string",
          "default": "mainnet"
        },
        "examples": {
          "Mainnet": {
            "value": "mainnet"
          },
          "Mainnet-C": {
            "value": "mainnet-c"
          },
          "Testnet": {
            "value": "testnet"
          },
          "Testnet4": {
            "value": "testnet4",
            "description": "Bitcoin testnet network"
          },
          "Testnet-C": {
            "value": "testnet-c"
          },
          "Holesky": {
            "value": "holesky",
            "description": "Ethereum testnet network"
          },
          "Hoodi": {
            "value": "hoodi",
            "description": "Ethereum testnet network"
          },
          "Sepolia": {
            "value": "sepolia",
            "description": "Ethereum testnet network"
          },
          "Westend": {
            "value": "westend",
            "description": "Polkadot testnet network"
          },
          "Amoy": {
            "value": "amoy",
            "description": "Polygon testnet network"
          }
        }
      },
      "tx-hash": {
        "name": "hash",
        "in": "path",
        "required": true,
        "description": "The transaction hash.",
        "schema": {
          "type": "string",
          "default": "71d4f3412ec11128bbd9ce988d5bff2ec3bb6ea3953c8faf189d88ae49de9f7a"
        },
        "examples": {
          "BTC_tx_hash": {
            "value": "71d4f3412ec11128bbd9ce988d5bff2ec3bb6ea3953c8faf189d88ae49de9f7a"
          },
          "ETH_tx_hash": {
            "value": "0x6d550b76008d75d25a735d2d96c640cc13b7a711372557955fbd3b1cad8a78cb"
          }
        }
      }
    }
  }
}
```