Transaction or list of transactions/blocks
GET/transaction
Returns a transaction by hash or a list of transactions/blocks depending on the parameters sent. If "id" is sent as parameter, we return only one transaction, else we return a list. In the list return we have a key "has_more" that indicatesif there are more transactions/blocks to be fetched
Request
Query Parameters
id string
Hash in hex of the transaction/block
type string
Type of list to return (block or tx)
count int
Quantity of elements to return
page string
If the user clicked "previous" or "next" button
hash string
Hash reference for the pagination
Responses
- 200
Success
- application/json
- Schema
- success
- error
- success_list
Schema
any
One success
{
"tx": {
"hash": "00002b3be4e3876e67b5e090d76dcd71cde1a30ca1e54e38d65717ba131cd22f",
"nonce": "17076",
"timestamp": 1539271482,
"version": 1,
"weight": 14,
"parents": [],
"inputs": [
{
"value": 42500000044,
"script": "dqkURJPA8tDMJHU8tqv3SiO18ZCLEPaIrA==",
"decoded": {
"type": "P2PKH",
"address": "17Fbx9ouRUD1sd32bp4ptGkmgNzg7p2Krj",
"timelock": null
},
"token": "00",
"tx": "000002d28696f94f89d639022ae81a1d870d55d189c27b7161d9cb214ad1c90c",
"index": 0
}
],
"outputs": [],
"tokens": []
},
"meta": {
"hash": "00002b3be4e3876e67b5e090d76dcd71cde1a30ca1e54e38d65717ba131cd22f",
"spent_outputs": [
[
"0",
[
"00002b3be4e3876e67b5e090d76dcd71cde1a30ca1e54e38d65717ba131cd22e"
]
],
[
"1",
[
"00002b3ce4e3876e67b5e090d76dcd71cde1a30ca1e54e38d65717ba131cd22e"
]
]
],
"received_by": [],
"children": [
"00002b3ee4e3876e67b5e090d76dcd71cde1a30ca1e54e38d65717ba131cd22d"
],
"conflict_with": [],
"voided_by": [],
"twins": [],
"accumulated_weight": 10,
"score": 12,
"first_block": null
},
"spent_outputs": {
"0": "00002b3ce4e3876e67b5e090d76dcd71cde1a30ca1e54e38d65717ba131cd22e"
},
"success": true
}
Transaction not found
{
"success": false,
"message": "Transaction not found"
}
List success
{
"transactions": [
{
"tx_id": "00000257054251161adff5899a451ae974ac62ca44a7a31179eec5750b0ea406",
"timestamp": 1547163030,
"version": 1,
"weight": 18.861583646228,
"parents": [
"00000b8792cb13e8adb51cc7d866541fc29b532e8dec95ae4661cf3da4d42cb4",
"00001417652b9d7bd53eb14267834eab08f27e5cbfaca45a24370e79e0348bb9"
],
"inputs": [
{
"tx_id": "0000088c5a4dfcef7fd3c04a5b1eccfd2de032b23749deff871b0a090000f5f6",
"index": 1,
"data": "RzBFAiEAvv17vp8XyHYq36PFlOGd7V2vzIkf+XIuqfyUnc2fZugCIDnwM7PdkA/qwt2QXLB3WnegtdOqV8gv+H63voWVbsScIQPqg7y2RanTdnQcDvFneIzjrUzJoPzkmoNStoN8XtLTUA=="
},
{
"tx_id": "0000003398322f99355f37439e32881c83ff08b83e744e799b1d6a67f73bee45",
"index": 0,
"data": "RzBFAiEAqPvD18Uzd6NsMVkGMaI9RsxWqLow22W1KBHUUW/35UECIEUU9pxJEHBvXyEwYAB2/bCiWxNd4iLvyvQXGKaSaDV2IQPDL3iZvsDS8jdFDmlcvc2Em/ZNYYDOBWd3oZWxpuA5DQ=="
}
],
"outputs": [
{
"value": 1909,
"script": "dqkUllFFDJByV5TjVUly3Zc3bB4mMH2IrA=="
},
{
"value": 55,
"script": "dqkUjjPg+zwG6JDe901I0ybQxcAPrAuIrA=="
}
],
"tokens": [],
"height": 12345,
"first_block": null
},
{
"tx_id": "00000b8792cb13e8adb51cc7d866541fc29b532e8dec95ae4661cf3da4d42cb4",
"timestamp": 1547163025,
"version": 1,
"weight": 17.995048894541107,
"parents": [
"00001417652b9d7bd53eb14267834eab08f27e5cbfaca45a24370e79e0348bb9",
"0000088c5a4dfcef7fd3c04a5b1eccfd2de032b23749deff871b0a090000f5f6"
],
"inputs": [
{
"tx_id": "0000088c5a4dfcef7fd3c04a5b1eccfd2de032b23749deff871b0a090000f5f6",
"index": 0,
"data": "SDBGAiEA/rtsn1oQ68uGeTj/7IVtqijxoUxzr9S/u3UGAC7wQvUCIQDaYkL1R8LICfSCpYIn4xx6A+lxU0Fw3oKR1hK91fRnSiEDCoA74tfBQa4IR7iXtlz+jH9UV7+YthKX4yQNaMSMfb0="
}
],
"outputs": [
{
"value": 1894,
"script": "dqkUduvtU77hZm++Pwavtl9OrOSA+XiIrA=="
},
{
"value": 84,
"script": "dqkUjjPg+zwG6JDe901I0ybQxcAPrAuIrA=="
}
],
"tokens": [],
"first_block": "000005af290a55b079014a0be3246479e84eeb635f02010dbf3e5f3414a85bbb"
}
],
"has_more": true
}
Loading...