๐จโ๐ป Get block by hash
Code samples
GET /api/v1/trx/block/hash/{blockHash}
curl 'https://settla.net/api/v1/trx/block/hash/0000000004a573d60372b39d1a6e9c4d04e4a643a87f48d5cd25a184a3da2b0c' \
-H 'X-API-Key: $SETTLA_API_KEY' \
-H 'Accept: application/json'
Returns a full block by its blockID, verbatim from the node. The identifier is Tron's block ID: 64 hex characters whose first 8 encode the height, e.g. 0000000004a573d6โฆ is block 77 951 958. An unknown hash answers 200 with an empty array [].
๐ ๏ธ Parameters
| Name | In | Type | Required | Description |
|---|---|---|---|---|
| blockHash | path | string | true | Block ID as returned in the blockID field. |
Example responses
200 Response
{
"blockID": "0000000004a573d60372b39d1a6e9c4d04e4a643a87f48d5cd25a184a3da2b0c",
"block_header": {
"raw_data": {
"timestamp": 1764517689000,
"txTrieRoot": "1cc142c46f2a42f880a583bdd9e42137723951d4e7fe89c329e2593f888f019a",
"parentHash": "0000000004a573d535c0092fe7ace8e7dcc30687ee3f2a049bee042e06c5f756",
"number": 77951958,
"witness_address": "4162398d516b555ac64af24416e05c199c01823048",
"version": 32
},
"witness_signature": "0226e5514108705705f5ed0a406a7d04785a9a86f757214934824b844d6ca82e46d8d501e71fd9c59d772bf72fc5e41b39176e8b20d17b81df41a008cb8607b501"
},
"transactions": [
{
"txID": "8b5e5f9a99d65c0b3aac7f3cbc2ee3029a0d4225054fd99830236d96d853c503",
"raw_data": {
"ref_block_bytes": "73c3",
"ref_block_hash": "0214af5c5729128e",
"expiration": 1764517986000,
"contract": [
{
"type": "TriggerSmartContract",
"parameter": {
"type_url": "type.googleapis.com/protocol.TriggerSmartContract",
"value": {
"owner_address": "4130760c7e10b1d3509d8d64a7e9eb9ab94bc83495",
"contract_address": "41a614f803b6fd780986a42c78ec9c7f77e6ded13c",
"data": "a9059cbb00000000000000000000000082dd6b9966724ae2fdc79b416c7588da67ff1b3500000000000000000000000000000000000000000000000000000000001e8480"
}
}
}
],
"timestamp": 1764517687800,
"fee_limit": 50000000
},
"signature": [
"4817931a156fa2e95fabac528daf33e1d09b34fb3ee2925beec879e40ce15c16a6ca9d2001524f29757fd9b57ada9432fac300aa21d8dfffa238c2a19232bb6c01"
],
"ret": [
{
"contractRet": "SUCCESS"
}
],
"raw_data_hex": "0a0273c322080214af5c5729128e40d0fddeabad335aae01081f12a9010a31747970652e676f6f676c65617069732e636f6d2f70726f746f636f6c2e54726967676572536d617274436f6e747261637412740a154130760c7e10b1d3509d8d64a7e9eb9ab94bc83495121541a614f803b6fd780986a42c78ec9c7f77e6ded13c2244a9059cbb00000000000000000000000082dd6b9966724ae2fdc79b416c7588da67ff1b3500000000000000000000000000000000000000000000000000000000001e848070f8e3ccabad33900180e1eb17"
}
]
}
500 Response
{
"error": "Could not connect to TRX node."
}
๐ Responses
| Status | Meaning | Description | Schema |
|---|---|---|---|
| 200 | OK | TRX block details | Inline |
| 500 | Internal Server Error | Could not connect to TRX node | Inline |
๐ Response Schema
Status Code 200
| Name | Type | Required | Restrictions | Description |
|---|---|---|---|---|
| ยป blockID | string | false | none | none |
| ยป block_header | object | false | none | none |
| ยปยป raw_data | object | false | none | none |
| ยปยปยป number | integer | false | none | none |
| ยปยปยป txTrieRoot | string | false | none | none |
| ยปยปยป witness_address | string | false | none | Block producer, in hex (41โฆ) form. |
| ยปยปยป parentHash | string | false | none | none |
| ยปยปยป version | integer | false | none | none |
| ยปยปยป timestamp | integer(int64) | false | none | none |
| ยปยป witness_signature | string | false | none | none |
| ยป transactions | [object] | false | none | none |
| ยปยป txID | string | false | none | none |
| ยปยป raw_data | object | false | none | none |
| ยปยป raw_data_hex | string | false | none | The signable payload. txID is the SHA-256 of these bytes. |
| ยปยป signature | [string] | false | none | none |
| ยปยป ret | [object] | false | none | none |
| ยปยปยป contractRet | string | false | none | none |
Status Code 500
| Name | Type | Required | Restrictions | Description |
|---|---|---|---|---|
| ยป error | string | false | none | none |
| ยป details | object | false | none | Present only on a few validation errors. |