Get up-to-date masterchain state
cURL
curl --request GET \ --url https://toncenter.com/api/v2/getMasterchainInfo
200
Example
{ "ok": true, "result": { "@type": "blocks.masterchainInfo", "last": { "@type": "ton.blockIdExt", "workchain": 123, "shard": "<string>", "seqno": 123, "root_hash": "<string>", "file_hash": "<string>" }, "state_root_hash": "<string>", "init": { "@type": "ton.blockIdExt", "workchain": 123, "shard": "<string>", "seqno": 123, "root_hash": "<string>", "file_hash": "<string>" } } }
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_masterchain_info() print(result.model_dump_json(indent=4)) if __name__ == "__main__": asyncio.run(main())
OK
true
Information about the latest masterchain block.
Show child attributes