json

Returns the JSON representation of a given transaction.

Endpoint

/v1/CHAIN/NETWORK/tx/:txId/json

Example

Request

curl -X GET http://localhost:1031/v1/LTC/regtest/tx/e53c1440f547b51343d46a2acaafe127e915c7ed08a7ef2ed0ffc248360c0cca/json

Response

Success (200)

{
  "txId": "e53c1440f547b51343d46a2acaafe127e915c7ed08a7ef2ed0ffc248360c0cca",
  "txHex": "0100000001202aabc...",
  "vsize": 443,
  "version": 1,
  "locktime": 0,
  "ins": [
    {
      "txId": "7c2f4dacaeac0a69c451bdd19f6c31d54def13b76ec8687160468d0ac8ab2a20",
      "vout": 0,
      "script": "47304402203...",
      "sequence": 4294967295
    }
  ],
  "outs": [
    {
      "address": "mryiaVyu9cDrdYCGzt8TimdxXPS1vmJS1a",
      "script": "512102ff3...",
      "value": 5820
    },
    {
      "address": "mryiaVyu9cDrdYCGzt8TimdxXPS1vmJS1a",
      "script": "76a9147db...",
      "value": 99971398
    }
  ]
}

Note on caching: Successful responses are returned with
Cache-Control: public, max-age=31536000, meaning they can be cached for up to 1 year.

Missing parameter (400)

{ "error": "Missing input txId." }

Not found (404)

{ "error": "Not found" }

Server error (500)

{ "error": "Internal server error message" }