GetTx

getTx InjectiveExchangeRPC

GetTx gets transaction details by hash.

GEThttps://inj-indexer.nownodes.io/api/exchange/gateway/v1/getTx/{hash}
Path parameters
hash*string

Transaction hash in hex without 0x prefix (Cosmos-like).

Example: "67DE3837A1BEED10393592E843167A0EE620258C431E1C946C21E5E3A3A106BB"
Pattern: ^(([0-9a-fA-F][0-9a-fA-F])+)?$
Response

OK response.

Body
code*integer

Response code

Example: 0
codespace*string

Namespace for the resp code

Example: ""
data*string (binary)

Result bytes, if any

Example: "Q2pZS05DOXBibXBsWTNScGRtVXVaWGhqYUdGdVoyVXVkakZpWlhSaE1TNU5jMmREY21WaGRHVlRjRzkwVFdGeWEyVjBUM0prWlhJPQ=="
heightinteger (int64)

The block height

Example: 6760196
indexinteger

Tx index in the block

Example: 0
rawLog*string

The output of the application's logger (raw string). May be non-deterministic.

Example: "[{\\\"events\\\":[{\\\"type\\\":\\\"message\\\",\\\"attributes\\\":[{\\\"key\\\":\\\"action\\\",\\\"value\\\":\\\"/injective.exchange.v1beta1.MsgCreateSpotMarketOrder\\\"}]}]}]"
timestampstring

Time of the previous block.

Example: ""
txHash*string

Hex-encoded Tendermint transaction hash

Example: "67DE3837A1BEED10393592E843167A0EE620258C431E1C946C21E5E3A3A106BB"
Request
const response = await fetch('https://inj-indexer.nownodes.io/api/exchange/gateway/v1/getTx/{hash}', {
    method: 'GET',
    headers: {},
});
const data = await response.json();
Response
{
  "code": 0,
  "codespace": "",
  "data": "Q2pZS05DOXBibXBsWTNScGRtVXVaWGhqYUdGdVoyVXVkakZpWlhSaE1TNU5jMmREY21WaGRHVlRjRzkwVFdGeWEyVjBUM0prWlhJPQ==",
  "height": 6760196,
  "index": 0,
  "rawLog": "[{\\\"events\\\":[{\\\"type\\\":\\\"message\\\",\\\"attributes\\\":[{\\\"key\\\":\\\"action\\\",\\\"value\\\":\\\"/injective.exchange.v1beta1.MsgCreateSpotMarketOrder\\\"}]}]}]",
  "timestamp": "",
  "txHash": "67DE3837A1BEED10393592E843167A0EE620258C431E1C946C21E5E3A3A106BB"
}