getrawtransaction

Get the transaction information of a given transaction hash.

Parameters

txid (string) transaction hash

verbose (bool) verbose of result

Returns

txid (string) transaction id

hash (string) transaction id

size (integer) transaction size

vsize (integer) the virtual transaction size, equals to size

version (integer) the transaction format version number

locktime (integer) the transaction’s locktime

sequence (integer) the transaction’s sequence number

vin (array) input utxo vector of this transaction

n (integer) index of utxo outputs

vout (array) output utxo vector of this transaction

assetid (string) asset id

outputlock (string) outputlock of this transaction

Example

///request
curl -u user:password -H "Content-Type: application/json" -d '{"id":1, "jsonrpc":"2.0", "method": "getrawtransaction","params": ["17e4591cd231c5d8ab7e3eb1e9e1dcc679562c4ebd952c0f35dbfdbde32babe9","verbose":true]}' http://<your-app-id>.ankr.com
//response
{
"id": null,
"error": null,
"jsonrpc": "2.0",
"result": {
"txid": "6864bbf52a3e140d40f1d707bae31d006265efc54dcb58e34037645060ce3e16",
"hash": "6864bbf52a3e140d40f1d707bae31d006265efc54dcb58e34037645060ce3e16",
"size": 192,
"vsize": 192,
"version": 0,
"locktime": 1000,
"vin": [
{
"txid": "0000000000000000000000000000000000000000000000000000000000000000",
"vout": 65535,
"sequence": 4294967295
}
],
"vout": [
{
"value": "0.01255707",
"n": 0,
"address": "8VYXVxKKSAxkmRrfmGpQR2Kc66XhG6m3ta",
"assetid": "b037db964a231458d2d6ffd5ea18944c4f90e63d547c5d3b9874df66a4ead0a3",
"outputlock": 0
},
{
"value": "0.02929985",
"n": 1,
"address": "ENTogr92671PKrMmtWo3RLiYXfBTXUe13Z",
"assetid": "b037db964a231458d2d6ffd5ea18944c4f90e63d547c5d3b9874df66a4ead0a3",
"outputlock": 0
}
],
"blockhash": "0000000000000000000000000000000000000000000000000000000000000000",
"confirmations": 4158,
"time": 1524737766,
"blocktime": 1524737766,
"type": 0,
"payloadversion": 4,
"payload": {
"CoinbaseData": "ELA"
},
"attributes": [
{
"usage": 0,
"data": "b52165c186769037"
}
],
"programs": []
}
}