๐ Get latest Tron block
Code samples
GET /api/v1/trx/block/last
curl 'https://settla.net/api/v1/trx/block/last' \
-H 'X-API-Key: $SETTLA_API_KEY' \
-H 'Accept: application/json'
Returns the head block (/wallet/getnowblock on the node), reduced to height, timestamp and the transaction list โ blockID and the rest of the header are not included. Use GET /api/v1/trx/block/{blockNumber} if you need the full header. Response size: a mainnet block carries 400โ500 transactions, so this answer is typically 0.5 MB of JSON.
Example responses
200 Response
{
"number": 77951958,
"timestamp": 1764517689000,
"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 | Latest TRX block | Inline |
| 500 | Internal Server Error | Could not connect to TRX node | Inline |
๐ Response Schema
Status Code 200
| Name | Type | Required | Restrictions | Description |
|---|---|---|---|---|
| ยป number | integer | false | none | none |
| ยป timestamp | integer(int64) | false | none | Block time in milliseconds since the Unix epoch. |
| ยป transactions | [object] | false | none | Every transaction in the block, exactly as the node returns it. Abridged to one entry in the example below. |
| ยปยป 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. |