api/v2/tx - Litecoin

This endpoint returns a normalized transaction by its id, with inputs, outputs, addresses, values, and confirmation data in the indexer's unified schema. Coin-specific fields that do not fit the shared shape are available from api/v2/tx-specific.

Parameters

ParameterTypeLocationRequiredDescription
txidstringpathYesThe transaction id
spendingbooleanqueryNoInclude spending transaction data for outputs when available

Request

bashcurl --location --request GET 'https://shared.eu-central-1.getblock.io/<ACCESS-TOKEN>/api/v2/tx/51a31c4236a99bfd17cda606f079c9c4814851119e7593ab7c739bd5972b1969'

example.js

javascriptconst response = await fetch(
    'https://shared.eu-central-1.getblock.io/<ACCESS-TOKEN>/api/v2/tx/51a31c4236a99bfd17cda606f079c9c4814851119e7593ab7c739bd5972b1969'
);
console.log(await response.json());

example.py

pythonimport requests

response = requests.get('https://shared.eu-central-1.getblock.io/<ACCESS-TOKEN>/api/v2/tx/51a31c4236a99bfd17cda606f079c9c4814851119e7593ab7c739bd5972b1969')

print(response.json())

Response

json{
    "txid": "51a31c4236a99bfd17cda606f079c9c4814851119e7593ab7c739bd5972b1969",
    "version": 2,
    "vin": [
        {
            "txid": "4c3d9548bb03a42551c10f2472e99cd86776ed00fd3bfb530c4466b93e7ddac7",
            "vout": 2121,
            "sequence": 4294967295,
            "n": 0,
            "addresses": [
                "LUnYgfpJMLM2h27wDcJypQHQhRXXrZrfvE"
            ],
            "isAddress": true,
            "value": "720950"
        }
    ],
    "vout": [
        {
            "value": "8324080358",
            "n": 0,
            "hex": "76a914182c25bf95cacc04fd35d1ea8ea49539251bd55288ac",
            "addresses": [
                "LMRmNEdhi5F43vtW5qPdv1q9s7xsMp4XK5"
            ],
            "isAddress": true
        }
    ],
    "blockHash": "0fc24234c2379a5262023a4b4a653ff3a11df6bb1c12851aff820d27ea02b0b6",
    "blockHeight": 3179800,
    "confirmations": 17,
    "blockTime": 1789699786,
    "size": 73090,
    "vsize": 73090,
    "value": "103517609950",
    "valueIn": "103517609950",
    "fees": "0"
}

Response Parameters

FieldTypeDescription
txidstringThe transaction id
vinarrayInputs, with the address and value of each spent output
voutarrayOutputs, with value, script, and destination addresses
blockHashstringHash of the containing block. Absent while unconfirmed
blockHeightintegerBlock height, or -1 while unconfirmed
confirmationsintegerNumber of confirmations. 0 while unconfirmed
blockTimeintegerBlock timestamp, or first-seen time for a mempool transaction
sizeintegerSerialized size in bytes
vsizeintegerVirtual size in vbytes, which differs from size for SegWit transactions
valuestringTotal output value in litoshis
valueInstringTotal input value in litoshis
feesstringFee paid in litoshis
rbfbooleanTrue when the transaction signals replace-by-fee

Empty fields are omitted rather than returned as null, so lockTime and rbf are absent unless set. For a mempool transaction, blockTime is when this indexer first saw the transaction, not a consensus timestamp.

Use Cases

  • Transaction Views: Render a normalized transaction in a wallet or explorer
  • Payment Confirmation: Read confirmations to confirm a received payment
  • Fee Inspection: Compare fees paid against the transaction's virtual size
  • Address Mapping: Read input and output addresses without decoding raw hex

Error Handling

HTTP StatusMessageDescription
400Bad requestThe transaction id is not a valid 64-character hex string
403ForbiddenMissing or invalid ACCESS-TOKEN
404Not foundNo transaction with the requested id is indexed
500Internal errorThe indexer failed to read the transaction