tx

Get transactions by hash

Get a transaction

Upon success, the Cache-Control header will be set with the default maximum age.

Parameters

  • hash: STRING - base64 encoded transaction hash to retrieve
    • 📘

      Tip

      To pass a transaction hash as a parameter in JSON RPC, you need to convert the transaction hash from hexadecimal format to base64 format. Since the transaction hash is already in hexadecimal format, you first need to decode it into bytes and then convert it to base64 format.

      You can easily convert hex to base64 at once here.

    • prove: BOOLEAN - Include proofs of the transaction's inclusion in the block
curl https://cosmos-mainnet-archive.allthatnode.com:26657/8U3JLUhzIDg3GShvy9hkCCSYkLGc11kj \
--header "Content-Type: application/json" \
--data '{
  "jsonrpc": "2.0",
  "id": 1,
  "method": "tx",
  "params": {
    "hash": "b0XPyHNC8jIvYhQL6u2ZHav5HU6kDalNvYvd5yxJgok=",
    "prove": true
  }
}'

Returns

  • OBJECT - Transaction information
{
    "jsonrpc": "2.0",
    "id": 1,
    "result": {
        "hash": "6F45CFC87342F2322F62140BEAED991DABF91D4EA40DA94DBD8BDDE72C498289",
        "height": "16369419",
        "index": 0,
        "tx_result": {
            "code": 0,
            "data": "CiUKIy9jb3Ntb3Muc3Rha2luZy52MWJldGExLk1zZ0RlbGVnYXRl",
            "log": "[{\"events\":[{\"type\":\"coin_received\",\"attributes\":[{\"key\":\"receiver\",\"value\":\"cosmos1804fph884kgxgd5rj7aznmmkrmnrx9a0mwwpql\"},{\"key\":\"amount\",\"value\":\"3uatom\"},{\"key\":\"receiver\",\"value\":\"cosmos1fl48vsnmsdzcv85q5d2q4z5ajdha8yu34mf0eh\"},{\"key\":\"amount\",\"value\":\"1850000uatom\"}]},{\"type\":\"coin_spent\",\"attributes\":[{\"key\":\"spender\",\"value\":\"cosmos1jv65s3grqf6v6jl3dp4t6c9t9rk99cd88lyufl\"},{\"key\":\"amount\",\"value\":\"3uatom\"},{\"key\":\"spender\",\"value\":\"cosmos1804fph884kgxgd5rj7aznmmkrmnrx9a0mwwpql\"},{\"key\":\"amount\",\"value\":\"1850000uatom\"}]},{\"type\":\"delegate\",\"attributes\":[{\"key\":\"validator\",\"value\":\"cosmosvaloper1wrx0x9m9ykdhw9sg04v7uljme53wuj03aa5d4f\"},{\"key\":\"amount\",\"value\":\"1850000uatom\"},{\"key\":\"new_shares\",\"value\":\"1851110.318304667683218979\"}]},{\"type\":\"message\",\"attributes\":[{\"key\":\"action\",\"value\":\"/cosmos.staking.v1beta1.MsgDelegate\"},{\"key\":\"sender\",\"value\":\"cosmos1jv65s3grqf6v6jl3dp4t6c9t9rk99cd88lyufl\"},{\"key\":\"module\",\"value\":\"staking\"},{\"key\":\"sender\",\"value\":\"cosmos1804fph884kgxgd5rj7aznmmkrmnrx9a0mwwpql\"}]},{\"type\":\"transfer\",\"attributes\":[{\"key\":\"recipient\",\"value\":\"cosmos1804fph884kgxgd5rj7aznmmkrmnrx9a0mwwpql\"},{\"key\":\"sender\",\"value\":\"cosmos1jv65s3grqf6v6jl3dp4t6c9t9rk99cd88lyufl\"},{\"key\":\"amount\",\"value\":\"3uatom\"}]},{\"type\":\"withdraw_rewards\",\"attributes\":[{\"key\":\"amount\",\"value\":\"3uatom\"},{\"key\":\"validator\",\"value\":\"cosmosvaloper1wrx0x9m9ykdhw9sg04v7uljme53wuj03aa5d4f\"}]}]}]",
            "info": "",
            "gas_wanted": "272722",
            "gas_used": "227506",
            "events": [
                {
                    "type": "coin_spent",
                    "attributes": [
                        {
                            "key": "c3BlbmRlcg==",
                            "value": "Y29zbW9zMTgwNGZwaDg4NGtneGdkNXJqN2F6bm1ta3JtbnJ4OWEwbXd3cHFs",
                            "index": true
                        },
                        {
                            "key": "YW1vdW50",
                            "value": "NjgxOXVhdG9t",
                            "index": true
                        }
                    ]
                },
                {
                    "type": "coin_received",
                    "attributes": [
                        {
                            "key": "cmVjZWl2ZXI=",
                            "value": "Y29zbW9zMTd4cGZ2YWttMmFtZzk2MnlsczZmODR6M2tlbGw4YzVsc2VycXRh",
                            "index": true
                        },
                        {
                            "key": "YW1vdW50",
                            "value": "NjgxOXVhdG9t",
                            "index": true
                        }
                    ]
                },
                {
                    "type": "transfer",
                    "attributes": [
                        {
                            "key": "cmVjaXBpZW50",
                            "value": "Y29zbW9zMTd4cGZ2YWttMmFtZzk2MnlsczZmODR6M2tlbGw4YzVsc2VycXRh",
                            "index": true
                        },
                        {
                            "key": "c2VuZGVy",
                            "value": "Y29zbW9zMTgwNGZwaDg4NGtneGdkNXJqN2F6bm1ta3JtbnJ4OWEwbXd3cHFs",
                            "index": true
                        },
                        {
                            "key": "YW1vdW50",
                            "value": "NjgxOXVhdG9t",
                            "index": true
                        }
                    ]
                },
                {
                    "type": "message",
                    "attributes": [
                        {
                            "key": "c2VuZGVy",
                            "value": "Y29zbW9zMTgwNGZwaDg4NGtneGdkNXJqN2F6bm1ta3JtbnJ4OWEwbXd3cHFs",
                            "index": true
                        }
                    ]
                },
                {
                    "type": "coin_received",
                    "attributes": [
                        {
                            "key": "cmVjZWl2ZXI=",
                            "value": "Y29zbW9zMTgwNGZwaDg4NGtneGdkNXJqN2F6bm1ta3JtbnJ4OWEwbXd3cHFs",
                            "index": true
                        },
                        {
                            "key": "YW1vdW50",
                            "value": "M3VhdG9t",
                            "index": true
                        }
                    ]
                },
                {
                    "type": "transfer",
                    "attributes": [
                        {
                            "key": "cmVjaXBpZW50",
                            "value": "Y29zbW9zMTgwNGZwaDg4NGtneGdkNXJqN2F6bm1ta3JtbnJ4OWEwbXd3cHFs",
                            "index": true
                        },
                        {
                            "key": "c2VuZGVy",
                            "value": "Y29zbW9zMWp2NjVzM2dycWY2djZqbDNkcDR0NmM5dDlyazk5Y2Q4OGx5dWZs",
                            "index": true
                        },
                        {
                            "key": "YW1vdW50",
                            "value": "M3VhdG9t",
                            "index": true
                        }
                    ]
                },
                {
                    "type": "message",
                    "attributes": [
                        {
                            "key": "c2VuZGVy",
                            "value": "Y29zbW9zMWp2NjVzM2dycWY2djZqbDNkcDR0NmM5dDlyazk5Y2Q4OGx5dWZs",
                            "index": true
                        }
                    ]
                },
                {
                    "type": "withdraw_rewards",
                    "attributes": [
                        {
                            "key": "YW1vdW50",
                            "value": "M3VhdG9t",
                            "index": true
                        },
                        {
                            "key": "dmFsaWRhdG9y",
                            "value": "Y29zbW9zdmFsb3BlcjF3cngweDltOXlrZGh3OXNnMDR2N3Vsam1lNTN3dWowM2FhNWQ0Zg==",
                            "index": true
                        }
                    ]
                },
                {
                    "type": "coin_spent",
                    "attributes": [
                        {
                            "key": "c3BlbmRlcg==",
                            "value": "Y29zbW9zMTgwNGZwaDg4NGtneGdkNXJqN2F6bm1ta3JtbnJ4OWEwbXd3cHFs",
                            "index": true
                        },
                        {
                            "key": "YW1vdW50",
                            "value": "MTg1MDAwMHVhdG9t",
                            "index": true
                        }
                    ]
                },
                {
                    "type": "coin_received",
                    "attributes": [
                        {
                            "key": "cmVjZWl2ZXI=",
                            "value": "Y29zbW9zMWZsNDh2c25tc2R6Y3Y4NXE1ZDJxNHo1YWpkaGE4eXUzNG1mMGVo",
                            "index": true
                        },
                        {
                            "key": "YW1vdW50",
                            "value": "MTg1MDAwMHVhdG9t",
                            "index": true
                        }
                    ]
                },
                {
                    "type": "delegate",
                    "attributes": [
                        {
                            "key": "dmFsaWRhdG9y",
                            "value": "Y29zbW9zdmFsb3BlcjF3cngweDltOXlrZGh3OXNnMDR2N3Vsam1lNTN3dWowM2FhNWQ0Zg==",
                            "index": true
                        },
                        {
                            "key": "YW1vdW50",
                            "value": "MTg1MDAwMHVhdG9t",
                            "index": true
                        },
                        {
                            "key": "bmV3X3NoYXJlcw==",
                            "value": "MTg1MTExMC4zMTgzMDQ2Njc2ODMyMTg5Nzk=",
                            "index": true
                        }
                    ]
                },
                {
                    "type": "message",
                    "attributes": [
                        {
                            "key": "bW9kdWxl",
                            "value": "c3Rha2luZw==",
                            "index": true
                        },
                        {
                            "key": "c2VuZGVy",
                            "value": "Y29zbW9zMTgwNGZwaDg4NGtneGdkNXJqN2F6bm1ta3JtbnJ4OWEwbXd3cHFs",
                            "index": true
                        }
                    ]
                }
            ],
            "codespace": ""
        },
        "tx": "Cq4BCp4BCiMvY29zbW9zLnN0YWtpbmcudjFiZXRhMS5Nc2dEZWxlZ2F0ZRJ3Ci1jb3Ntb3MxODA0ZnBoODg0a2d4Z2Q1cmo3YXpubW1rcm1ucng5YTBtd3dwcWwSNGNvc21vc3ZhbG9wZXIxd3J4MHg5bTl5a2RodzlzZzA0djd1bGptZTUzd3VqMDNhYTVkNGYaEAoFdWF0b20SBzE4NTAwMDASC0xlZGdlciBMaXZlEmcKUApGCh8vY29zbW9zLmNyeXB0by5zZWNwMjU2azEuUHViS2V5EiMKIQKI0OYmJGDOmGLfZ0U+YrseJGxgpxmd/VuwVUJ2I9PdNxIECgIIfxgFEhMKDQoFdWF0b20SBDY4MTkQ0tIQGkA7EjKXw7Z8p298tTj+tFK6P0aqErj29AU+8RaqHpgVy20LMnJh0z8/j8jiDRNVZ+qjpr3Y9N6zgRjRZxsLOuMb",
        "proof": {
            "root_hash": "FDBDFCCB4DD09BC09EC84380B84B89E29FF2C69E81AC944F1F83338917C05A31",
            "data": "Cq4BCp4BCiMvY29zbW9zLnN0YWtpbmcudjFiZXRhMS5Nc2dEZWxlZ2F0ZRJ3Ci1jb3Ntb3MxODA0ZnBoODg0a2d4Z2Q1cmo3YXpubW1rcm1ucng5YTBtd3dwcWwSNGNvc21vc3ZhbG9wZXIxd3J4MHg5bTl5a2RodzlzZzA0djd1bGptZTUzd3VqMDNhYTVkNGYaEAoFdWF0b20SBzE4NTAwMDASC0xlZGdlciBMaXZlEmcKUApGCh8vY29zbW9zLmNyeXB0by5zZWNwMjU2azEuUHViS2V5EiMKIQKI0OYmJGDOmGLfZ0U+YrseJGxgpxmd/VuwVUJ2I9PdNxIECgIIfxgFEhMKDQoFdWF0b20SBDY4MTkQ0tIQGkA7EjKXw7Z8p298tTj+tFK6P0aqErj29AU+8RaqHpgVy20LMnJh0z8/j8jiDRNVZ+qjpr3Y9N6zgRjRZxsLOuMb",
            "proof": {
                "total": "1",
                "index": "0",
                "leaf_hash": "/b38y03Qm8CeyEOAuEuJ4p/yxp6BrJRPH4MziRfAWjE=",
                "aunts": []
            }
        }
    }
}

Try Yourself

Language
Click Try It! to start a request and see the response here!