/tx

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

Parameters:

hash- string, hash of transaction to retrieve

Example:

// Request
curl -X GET -H 'Content-Type: application/json'  https://cosmos.blockpi.network/rpc/v1/<your-api-key>/tx?hash=0x547DC59DD6EE54082183A5F75F1D350BE4D271825BB75C6A626F74DAE2FA2489

// Result
{
    "jsonrpc": "2.0",
    "id": -1,
    "result": {
        "hash": "547DC59DD6EE54082183A5F75F1D350BE4D271825BB75C6A626F74DAE2FA2489",
        "height": "14183822",
        "index": 0,
        "tx_result": {
            "code": 0,
            "data": "Ch4KHC9jb3Ntb3MuYmFuay52MWJldGExLk1zZ1NlbmQ=",
            "log": "[{\"events\":[{\"type\":\"coin_received\",\"attributes\":[{\"key\":\"receiver\",\"value\":\"cosmos1f0d77kqccjcz95r4py478zppgwl3pl8w4x9s0p\"},{\"key\":\"amount\",\"value\":\"1719939uatom\"}]},{\"type\":\"coin_spent\",\"attributes\":[{\"key\":\"spender\",\"value\":\"cosmos1s5z672rlcfy596xvm3q2c4phfhg9pk704654af\"},{\"key\":\"amount\",\"value\":\"1719939uatom\"}]},{\"type\":\"message\",\"attributes\":[{\"key\":\"action\",\"value\":\"/cosmos.bank.v1beta1.MsgSend\"},{\"key\":\"sender\",\"value\":\"cosmos1s5z672rlcfy596xvm3q2c4phfhg9pk704654af\"},{\"key\":\"module\",\"value\":\"bank\"}]},{\"type\":\"transfer\",\"attributes\":[{\"key\":\"recipient\",\"value\":\"cosmos1f0d77kqccjcz95r4py478zppgwl3pl8w4x9s0p\"},{\"key\":\"sender\",\"value\":\"cosmos1s5z672rlcfy596xvm3q2c4phfhg9pk704654af\"},{\"key\":\"amount\",\"value\":\"1719939uatom\"}]}]}]",
            "info": "",
            "gas_wanted": "91770",
            "gas_used": "69111",
            "events": [
                {
                    "type": "coin_spent",
                    "attributes": [
                        {
                            "key": "c3BlbmRlcg==",
                            "value": "Y29zbW9zMXM1ejY3MnJsY2Z5NTk2eHZtM3EyYzRwaGZoZzlwazcwNDY1NGFm",
                            "index": true
                        },
                        {
                            "key": "YW1vdW50",
                            "value": "MjI5NXVhdG9t",
                            "index": true
                        }
                    ]
                },
                {
                    "type": "coin_received",
                    "attributes": [
                        {
                            "key": "cmVjZWl2ZXI=",
                            "value": "Y29zbW9zMTd4cGZ2YWttMmFtZzk2MnlsczZmODR6M2tlbGw4YzVsc2VycXRh",
                            "index": true
                        },
                        {
                            "key": "YW1vdW50",
                            "value": "MjI5NXVhdG9t",
                            "index": true
                        }
                    ]
                },
                {
                    "type": "transfer",
                    "attributes": [
                        {
                            "key": "cmVjaXBpZW50",
                            "value": "Y29zbW9zMTd4cGZ2YWttMmFtZzk2MnlsczZmODR6M2tlbGw4YzVsc2VycXRh",
                            "index": true
                        },
                        {
                            "key": "c2VuZGVy",
                            "value": "Y29zbW9zMXM1ejY3MnJsY2Z5NTk2eHZtM3EyYzRwaGZoZzlwazcwNDY1NGFm",
                            "index": true
                        },
                        {
                            "key": "YW1vdW50",
                            "value": "MjI5NXVhdG9t",
                            "index": true
                        }
                    ]
                },
                {
                    "type": "message",
                    "attributes": [
                        {
                            "key": "c2VuZGVy",
                            "value": "Y29zbW9zMXM1ejY3MnJsY2Z5NTk2eHZtM3EyYzRwaGZoZzlwazcwNDY1NGFm",
                            "index": true
                        }
                    ]
                },
                {
                    "type": "tx",
                    "attributes": [
                        {
                            "key": "ZmVl",
                            "value": "MjI5NXVhdG9t",
                            "index": true
                        },
                        {
                            "key": "ZmVlX3BheWVy",
                            "value": "Y29zbW9zMXM1ejY3MnJsY2Z5NTk2eHZtM3EyYzRwaGZoZzlwazcwNDY1NGFm",
                            "index": true
                        }
                    ]
                },
                {
                    "type": "tx",
                    "attributes": [
                        {
                            "key": "YWNjX3NlcQ==",
                            "value": "Y29zbW9zMXM1ejY3MnJsY2Z5NTk2eHZtM3EyYzRwaGZoZzlwazcwNDY1NGFmLzI3Ng==",
                            "index": true
                        }
                    ]
                },
                {
                    "type": "tx",
                    "attributes": [
                        {
                            "key": "c2lnbmF0dXJl",
                            "value": "ZGU4amlyQ2FxVTVzUHZsMHdQcXhrdDFWL3hvbkUzYldzWEY2bm5YVWdwWjRIbmVyTzkrRmhUL2NVbmZGSDBiUWZNbjRnQnVvek1xdlFtWGNSS2JBTkE9PQ==",
                            "index": true
                        }
                    ]
                },
                {
                    "type": "message",
                    "attributes": [
                        {
                            "key": "YWN0aW9u",
                            "value": "L2Nvc21vcy5iYW5rLnYxYmV0YTEuTXNnU2VuZA==",
                            "index": true
                        }
                    ]
                },
                {
                    "type": "coin_spent",
                    "attributes": [
                        {
                            "key": "c3BlbmRlcg==",
                            "value": "Y29zbW9zMXM1ejY3MnJsY2Z5NTk2eHZtM3EyYzRwaGZoZzlwazcwNDY1NGFm",
                            "index": true
                        },
                        {
                            "key": "YW1vdW50",
                            "value": "MTcxOTkzOXVhdG9t",
                            "index": true
                        }
                    ]
                },
                {
                    "type": "coin_received",