_getTransactionByHash

Fetches a tx by hash.

Parameters

Body

  • hash: STRING - The tx hash to query, encoded as a hex string.
curl "https://cosmos-mainnet-archive.allthatnode.com:1317/cosmos/tx/v1beta1/txs/1F2B8CFE67816504FB4C5B305A7DCBF8553328F6EFE68A32CA8A268AB7C7001C" \
-H 'x-allthatnode-api-key: 8U3JLUhzIDg3GShvy9hkCCSYkLGc11kj'

Returns

  • OBJECT - The transaction information.
{
  "tx": {
    "body": {
      "messages": [
        {
          "@type": "/cosmos.bank.v1beta1.MsgSend",
          "from_address": "cosmos1htkh2pq7cf8x64cw76mp9n4sq6tljw54tp59a5",
          "to_address": "cosmos1j8pp7zvcu9z8vd882m284j29fn2dszh05cqvf9",
          "amount": [
            {
              "denom": "uatom",
              "amount": "31553725"
            }
          ]
        }
      ],
      "memo": "106271980",
      "timeout_height": "0",
      "extension_options": [],
      "non_critical_extension_options": []
    },
    "auth_info": {
      "signer_infos": [
        {
          "public_key": {
            "@type": "/cosmos.crypto.secp256k1.PubKey",
            "key": "AyvPB8W45KPM76WGMAZJXPk6s/Br7nkZLr60ByXiRcM2"
          },
          "mode_info": {
            "single": {
              "mode": "SIGN_MODE_LEGACY_AMINO_JSON"
            }
          },
          "sequence": "0"
        }
      ],
      "fee": {
        "amount": [
          {
            "denom": "uatom",
            "amount": "2273"
          }
        ],
        "gas_limit": "90884",
        "payer": "",
        "granter": ""
      }
    },
    "signatures": [
      "IwCdeEEZsGdLfQu3IhBHbfPAVf8PSrJrFvvtNtNb+mwhwkfWhi3kww8+Oe+wauEfRwrBg/91EEJg37Sc21xcXw=="
    ]
  },
  "tx_response": {
    "height": "16443083",
    "txhash": "1F2B8CFE67816504FB4C5B305A7DCBF8553328F6EFE68A32CA8A268AB7C7001C",
    "codespace": "",
    "code": 0,
    "data": "0A1E0A1C2F636F736D6F732E62616E6B2E763162657461312E4D736753656E64",
    "raw_log": "[{\"events\":[{\"type\":\"coin_received\",\"attributes\":[{\"key\":\"receiver\",\"value\":\"cosmos1j8pp7zvcu9z8vd882m284j29fn2dszh05cqvf9\"},{\"key\":\"amount\",\"value\":\"31553725uatom\"}]},{\"type\":\"coin_spent\",\"attributes\":[{\"key\":\"spender\",\"value\":\"cosmos1htkh2pq7cf8x64cw76mp9n4sq6tljw54tp59a5\"},{\"key\":\"amount\",\"value\":\"31553725uatom\"}]},{\"type\":\"message\",\"attributes\":[{\"key\":\"action\",\"value\":\"/cosmos.bank.v1beta1.MsgSend\"},{\"key\":\"sender\",\"value\":\"cosmos1htkh2pq7cf8x64cw76mp9n4sq6tljw54tp59a5\"},{\"key\":\"module\",\"value\":\"bank\"}]},{\"type\":\"transfer\",\"attributes\":[{\"key\":\"recipient\",\"value\":\"cosmos1j8pp7zvcu9z8vd882m284j29fn2dszh05cqvf9\"},{\"key\":\"sender\",\"value\":\"cosmos1htkh2pq7cf8x64cw76mp9n4sq6tljw54tp59a5\"},{\"key\":\"amount\",\"value\":\"31553725uatom\"}]}]}]",
    "logs": [
      {
        "msg_index": 0,
        "log": "",
        "events": [
          {
            "type": "coin_received",
            "attributes": [
              {
                "key": "receiver",
                "value": "cosmos1j8pp7zvcu9z8vd882m284j29fn2dszh05cqvf9"
              },
              {
                "key": "amount",
                "value": "31553725uatom"
              }
            ]
          },
          {
            "type": "coin_spent",
            "attributes": [
              {
                "key": "spender",
                "value": "cosmos1htkh2pq7cf8x64cw76mp9n4sq6tljw54tp59a5"
              },
              {
                "key": "amount",
                "value": "31553725uatom"
              }
            ]
          },
          {
            "type": "message",
            "attributes": [
              {
                "key": "action",
                "value": "/cosmos.bank.v1beta1.MsgSend"
              },
              {
                "key": "sender",
                "value": "cosmos1htkh2pq7cf8x64cw76mp9n4sq6tljw54tp59a5"
              },
              {
                "key": "module",
                "value": "bank"
              }
            ]
          },
          {
            "type": "transfer",
            "attributes": [
              {
                "key": "recipient",
                "value": "cosmos1j8pp7zvcu9z8vd882m284j29fn2dszh05cqvf9"
              },
              {
                "key": "sender",
                "value": "cosmos1htkh2pq7cf8x64cw76mp9n4sq6tljw54tp59a5"
              },
              {
                "key": "amount",
                "value": "31553725uatom"
              }
            ]
          }
        ]
      }
    ],
    "info": "",
    "gas_wanted": "90884",
    "gas_used": "75994",
    "tx": {
      "@type": "/cosmos.tx.v1beta1.Tx",
      "body": {
        "messages": [
          {
            "@type": "/cosmos.bank.v1beta1.MsgSend",
            "from_address": "cosmos1htkh2pq7cf8x64cw76mp9n4sq6tljw54tp59a5",
            "to_address": "cosmos1j8pp7zvcu9z8vd882m284j29fn2dszh05cqvf9",
            "amount": [
              {
                "denom": "uatom",
                "amount": "31553725"
              }
            ]
          }
        ],
        "memo": "106271980",
        "timeout_height": "0",
        "extension_options": [],
        "non_critical_extension_options": []
      },
      "auth_info": {
        "signer_infos": [
          {
            "public_key": {
              "@type": "/cosmos.crypto.secp256k1.PubKey",
              "key": "AyvPB8W45KPM76WGMAZJXPk6s/Br7nkZLr60ByXiRcM2"
            },
            "mode_info": {
              "single": {
                "mode": "SIGN_MODE_LEGACY_AMINO_JSON"
              }
            },
            "sequence": "0"
          }
        ],
        "fee": {
          "amount": [
            {
              "denom": "uatom",
              "amount": "2273"
            }
          ],
          "gas_limit": "90884",
          "payer": "",
          "granter": ""
        }
      },
      "signatures": [
        "IwCdeEEZsGdLfQu3IhBHbfPAVf8PSrJrFvvtNtNb+mwhwkfWhi3kww8+Oe+wauEfRwrBg/91EEJg37Sc21xcXw=="
      ]
    },
    "timestamp": "2023-08-05T17:21:17Z",
    "events": [
      {
        "type": "coin_spent",
        "attributes": [
          {
            "key": "c3BlbmRlcg==",
            "value": "Y29zbW9zMWh0a2gycHE3Y2Y4eDY0Y3c3Nm1wOW40c3E2dGxqdzU0dHA1OWE1",
            "index": true
          },
          {
            "key": "YW1vdW50",
            "value": "MjI3M3VhdG9t",
            "index": true
          }
        ]
      },
      {
        "type": "coin_received",
        "attributes": [
          {
            "key": "cmVjZWl2ZXI=",
            "value": "Y29zbW9zMTd4cGZ2YWttMmFtZzk2MnlsczZmODR6M2tlbGw4YzVsc2VycXRh",
            "index": true
          },
          {
            "key": "YW1vdW50",
            "value": "MjI3M3VhdG9t",
            "index": true
          }
        ]
      },
      {
        "type": "transfer",
        "attributes": [
          {
            "key": "cmVjaXBpZW50",
            "value": "Y29zbW9zMTd4cGZ2YWttMmFtZzk2MnlsczZmODR6M2tlbGw4YzVsc2VycXRh",
            "index": true
          },
          {
            "key": "c2VuZGVy",
            "value": "Y29zbW9zMWh0a2gycHE3Y2Y4eDY0Y3c3Nm1wOW40c3E2dGxqdzU0dHA1OWE1",
            "index": true
          },
          {
            "key": "YW1vdW50",
            "value": "MjI3M3VhdG9t",
            "index": true
          }
        ]
      },
      {
        "type": "message",
        "attributes": [
          {
            "key": "c2VuZGVy",
            "value": "Y29zbW9zMWh0a2gycHE3Y2Y4eDY0Y3c3Nm1wOW40c3E2dGxqdzU0dHA1OWE1",
            "index": true
          }
        ]
      },
      {
        "type": "tx",
        "attributes": [
          {
            "key": "ZmVl",
            "value": "MjI3M3VhdG9t",
            "index": true
          },
          {
            "key": "ZmVlX3BheWVy",
            "value": "Y29zbW9zMWh0a2gycHE3Y2Y4eDY0Y3c3Nm1wOW40c3E2dGxqdzU0dHA1OWE1",
            "index": true
          }
        ]
      },
      {
        "type": "tx",
        "attributes": [
          {
            "key": "YWNjX3NlcQ==",
            "value": "Y29zbW9zMWh0a2gycHE3Y2Y4eDY0Y3c3Nm1wOW40c3E2dGxqdzU0dHA1OWE1LzA=",
            "index": true
          }
        ]
      },
      {
        "type": "tx",
        "attributes": [
          {
            "key": "c2lnbmF0dXJl",
            "value": "SXdDZGVFRVpzR2RMZlF1M0loQkhiZlBBVmY4UFNySnJGdnZ0TnROYittd2h3a2ZXaGkza3d3OCtPZSt3YXVFZlJ3ckJnLzkxRUVKZzM3U2MyMXhjWHc9PQ==",
            "index": true
          }
        ]
      },
      {
        "type": "message",
        "attributes": [
          {
            "key": "YWN0aW9u",
            "value": "L2Nvc21vcy5iYW5rLnYxYmV0YTEuTXNnU2VuZA==",
            "index": true
          }
        ]
      },
      {
        "type": "coin_spent",
        "attributes": [
          {
            "key": "c3BlbmRlcg==",
            "value": "Y29zbW9zMWh0a2gycHE3Y2Y4eDY0Y3c3Nm1wOW40c3E2dGxqdzU0dHA1OWE1",
            "index": true
          },
          {
            "key": "YW1vdW50",
            "value": "MzE1NTM3MjV1YXRvbQ==",
            "index": true
          }
        ]
      },
      {
        "type": "coin_received",
        "attributes": [
          {
            "key": "cmVjZWl2ZXI=",
            "value": "Y29zbW9zMWo4cHA3enZjdTl6OHZkODgybTI4NGoyOWZuMmRzemgwNWNxdmY5",
            "index": true
          },
          {
            "key": "YW1vdW50",
            "value": "MzE1NTM3MjV1YXRvbQ==",
            "index": true
          }
        ]
      },
      {
        "type": "transfer",
        "attributes": [
          {
            "key": "cmVjaXBpZW50",
            "value": "Y29zbW9zMWo4cHA3enZjdTl6OHZkODgybTI4NGoyOWZuMmRzemgwNWNxdmY5",
            "index": true
          },
          {
            "key": "c2VuZGVy",
            "value": "Y29zbW9zMWh0a2gycHE3Y2Y4eDY0Y3c3Nm1wOW40c3E2dGxqdzU0dHA1OWE1",
            "index": true
          },
          {
            "key": "YW1vdW50",
            "value": "MzE1NTM3MjV1YXRvbQ==",
            "index": true
          }
        ]
      },
      {
        "type": "message",
        "attributes": [
          {
            "key": "c2VuZGVy",
            "value": "Y29zbW9zMWh0a2gycHE3Y2Y4eDY0Y3c3Nm1wOW40c3E2dGxqdzU0dHA1OWE1",
            "index": true
          }
        ]
      },
      {
        "type": "message",
        "attributes": [
          {
            "key": "bW9kdWxl",
            "value": "YmFuaw==",
            "index": true
          }
        ]
      }
    ]
  }
}

Try Yourself

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