Skip to Content
GraphQL APIBlockchain APIgetTransactionByHash

getTransactionByHash

This method obtains the transaction by hash of the chains passed as parameters.

Inputs

NameTypeRequiredDescription
input[ChainHashInput!]!YesList of transaction queries with chain name and transaction hash.

ChainHashInput Fields

NameTypeRequiredDescription
chainString!YesChain ID.
hashString!YesTransaction hash.

chain

Type: Chain!

Allowed Values: A chain ID from the list of supported chains.

[!WARNING] This query requires archive data. While it works for all listed supported chains, some chains might fail for older transactions. These limited chains are marked in the supported chains list.

hash

Type: String!

Allowed Values: Any transaction hash as string.

Response

Returns a list of ChainTransactionDetails objects.

ChainTransactionDetails

FieldTypeDescription
chainString!The blockchain name.
hashStringThe transaction hash.
transactionTransactionDetailsThe detailed transaction information (type varies by chain).
errorStringError message if fetching failed.

TransactionDetails (Union)

The transaction field is a union type and can be one of the following types depending on the blockchain:

  • EVMTransactionDetails (Ethereum-compatible chains)
  • SolanaTransactionDetails (Solana)
  • TendermintTransactionDetails (Cosmos and Tendermint chains)

Query Example

Query

query GetTransactionByHash($input: [ChainHashInput!]!) { getTransactionByHash(input: $input) { chain hash transaction { ... on EVMTransactionDetails { chain blockHash blockNumber from gas gasPrice maxPriorityFeePerGas maxFeePerGas hash } ... on SolanaTransactionDetails { chain blockTime meta { computeUnitsConsumed err fee } } ... on TendermintTransactionDetails { chain tx_response { gas_used gas_wanted tx { body { memo timeout_height } } timestamp code txhash } } } error } }

Variables

{ "input": [ { "chain": "CHAIN_0X1", "hash": "0xe57793e686785c5b12c6c142b4803a19b3108684b67af64c4fa35ef84b78d101" }, { "chain": "CHAIN_OSMOSIS_1", "hash": "45EB63AD29E1D7CACCFCEAB244D5D3985DEF5D5023B054B1C9B7A727B59BD434" } ] }

Curl

curl -X POST https://your-api-endpoint/graphql \ -H "Content-Type: application/json" \ -d '{ "query": "query GetTransactionByHash($input: [ChainHashInput!]!) { getTransactionByHash(input: $input) { chain hash transaction { ... on EVMTransactionDetails { chain blockHash blockNumber from gas gasPrice maxPriorityFeePerGas maxFeePerGas hash } ... on TendermintTransactionDetails { chain tx_response { gas_used gas_wanted tx { body { memo timeout_height } } timestamp code txhash } } } error } }", "variables": { "input": [ { "chain": "CHAIN_0X1", "hash": "0xe57793e686785c5b12c6c142b4803a19b3108684b67af64c4fa35ef84b78d101" }, { "chain": "CHAIN_OSMOSIS_1", "hash": "45EB63AD29E1D7CACCFCEAB244D5D3985DEF5D5023B054B1C9B7A727B59BD434" } ] } }'

Response Example

{ "data": { "getTransactionByHash": [ { "chain": "CHAIN_0X1", "hash": "0xe57793e686785c5b12c6c142b4803a19b3108684b67af64c4fa35ef84b78d101", "transaction": { "chain": "CHAIN_0X1", "blockHash": "0x619f210fad18b7356aaa53877a7fe08d7c79d9d86a78b1dd6426849c772a2e93", "blockNumber": "0x166875e", "from": "0xe9b111f6a16f91c5917c872ae13f6685a18c784b", "gas": "0x5208", "gasPrice": "0xc00c64a", "maxPriorityFeePerGas": null, "maxFeePerGas": null, "hash": "0xe57793e686785c5b12c6c142b4803a19b3108684b67af64c4fa35ef84b78d101" }, "error": null }, { "chain": "CHAIN_OSMOSIS_1", "hash": "45EB63AD29E1D7CACCFCEAB244D5D3985DEF5D5023B054B1C9B7A727B59BD434", "transaction": { "chain": "CHAIN_OSMOSIS_1", "tx_response": { "gas_used": "277894", "gas_wanted": "500000", "tx": { "body": { "memo": "", "timeout_height": "0" } }, "timestamp": "2025-10-03T10:06:07Z", "code": 0, "txhash": "45EB63AD29E1D7CACCFCEAB244D5D3985DEF5D5023B054B1C9B7A727B59BD434" } }, "error": null } ] } }