๐ Get latest N blocks
Code samples
GET /api/v1/trx/block/latest/{num}
Returns the latest N blocks from the Tron blockchain.
๐ ๏ธ Parameters
| Name | In | Type | Required | Description |
|---|---|---|---|---|
| num | path | integer | true | Number of latest blocks to retrieve. |
Example responses
200 Response
{
"block": [
{
"blockID": "string",
"block_header": {
"raw_data": {
"number": 0,
"txTrieRoot": "string",
"witness_address": "string",
"parentHash": "string",
"version": 0,
"timestamp": 0
},
"witness_signature": "string"
},
"transactions": [
{
"txID": "string",
"raw_data": {},
"raw_data_hex": "string",
"signature": [
"string"
],
"ret": [
{}
]
}
]
}
]
}
๐ Responses
| Status | Meaning | Description | Schema |
|---|---|---|---|
| 200 | OK | Array of latest blocks | Inline |
| 500 | Internal Server Error | Could not connect to TRX node | None |
๐ Response Schema
Status Code 200
| Name | Type | Required | Restrictions | Description |
|---|---|---|---|---|
| ยป block | [object] | false | none | none |
| ยปยป 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 | none |
| ยปยปยปยป 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 | none |
| ยปยปยป signature | [string] | false | none | none |
| ยปยปยป ret | [object] | false | none | none |