Get block that was confirmed by consensus
cURL
curl --request GET \ --url https://toncenter.com/api/v2/getConsensusBlock
200
Example
{ "ok": true, "result": { "@type": "ext.blocks.consensusBlock", "consensus_block": 123, "timestamp": 123 } }
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())
OK
true
Show child attributes