Skip to main content
GET
/
api
/
v2
/
getConsensusBlock
Get Consensus Block
curl --request GET \
  --url https://toncenter.com/api/v2/getConsensusBlock
{
  "ok": true,
  "result": {
    "@type": "ext.blocks.consensusBlock",
    "consensus_block": 123,
    "timestamp": 123
  }
}

SDK Usage

import asyncio

from toncenter.rest import ToncenterRestClient
from toncenter.types import Network


async def main() -> None:
    async with ToncenterRestClient(network=Network.MAINNET) as client:
        result = await client.v2.blocks.get_consensus_block()
        print(result.model_dump_json(indent=4))


if __name__ == "__main__":
    asyncio.run(main())

Response

OK

ok
boolean
required
Example:

true

result
ConsensusBlock · object
required