GETGet masterchain info

TON Mainnethttps://ton-mainnet.nodit.io/api/v3/masterchainInfo
CU10

Return the first and last indexed blocks.

Responses
after_mergeboolean

Returns true if this block was created immediately after a shard merge; otherwise false.

after_splitboolean

Returns true if this block was created immediately after a shard split; otherwise false.

before_splitboolean

Returns true if this shard will split after this block; otherwise false.

created_bystring

256-bit public key of the validator that created this block, base64 encoded.

end_ltstring

Logical time (lt) at the end of this block, as a decimal string. All transactions in this block have lt between start_lt and end_lt.

Example: 0

file_hashstring

Hash of the serialized block file, base64 encoded. Together with root_hash, uniquely identifies a block.

flagsinteger

Bit flags from the block header. Bit 0 indicates that the header includes the software version (gen_software) of the validator that generated the block.

gen_catchain_seqnointeger

Catchain sequence number of the validator session that generated this block.

gen_utimestring

Unix timestamp in seconds when this block was generated, as a decimal string.

Example: 0

global_idinteger

Global network ID (-239 for mainnet, -3 for testnet).

key_blockboolean

Returns true if this is a key block containing validator set changes or config updates; otherwise false.

master_ref_seqnointeger

Sequence number (seqno) of the masterchain block that this shard block references. 0 for masterchain blocks.

masterchain_block_refobject

Identifier (workchain, shard, seqno) of the masterchain block in which this block was committed. For a masterchain block, it refers to the block itself.

seqnointeger

Block sequence number within its workchain and shard.

shardstring

Shard identifier as a hexadecimal string, for example 8000000000000000.

Example: 0

workchaininteger

Workchain ID: -1 for the masterchain, 0 for the basechain.

min_ref_mc_seqnointeger

Minimum masterchain block seqno referenced by this block.

prev_blocksobject[]

Array of previous block identifiers (workchain, shard, seqno). Usually contains one entry, but two after a shard merge.

seqnointeger

Block sequence number within its workchain and shard.

shardstring

Shard identifier as a hexadecimal string, for example 8000000000000000.

Example: 0

workchaininteger

Workchain ID: -1 for the masterchain, 0 for the basechain.

prev_key_block_seqnointeger

Sequence number of the previous key block.

rand_seedstring

256-bit random seed of this block, base64 encoded.

root_hashstring

Root hash of the block, base64 encoded. Together with file_hash, uniquely identifies a block.

seqnointeger

Block sequence number within its workchain and shard.

shardstring

Shard identifier as a 64-bit value in hexadecimal. The masterchain uses 8000000000000000.

Example: 0

start_ltstring

Logical time (lt) at the start of this block, as a decimal string.

Example: 0

tx_countinteger

Number of transactions included in this block.

validator_list_hash_shortinteger

Short hash of the validator set active during this block.

versioninteger

Block format version number.

vert_seqnointeger

Vertical sequence number of the block, which is the number of vertical (hard fork) blocks that precede it.

vert_seqno_incrboolean

Returns true if this block increments the vertical sequence number, meaning it is a vertical (hard fork) block; otherwise false.

want_mergeboolean

Returns true if validators have signaled a preference to merge this shard; otherwise false.

want_splitboolean

Returns true if validators have signaled a preference to split this shard; otherwise false.

workchaininteger

Workchain ID: -1 for the masterchain, 0 for the basechain.

after_mergeboolean

Returns true if this block was created immediately after a shard merge; otherwise false.

after_splitboolean

Returns true if this block was created immediately after a shard split; otherwise false.

before_splitboolean

Returns true if this shard will split after this block; otherwise false.

created_bystring

256-bit public key of the validator that created this block, base64 encoded.

end_ltstring

Logical time (lt) at the end of this block, as a decimal string. All transactions in this block have lt between start_lt and end_lt.

Example: 0

file_hashstring

Hash of the serialized block file, base64 encoded. Together with root_hash, uniquely identifies a block.

flagsinteger

Bit flags from the block header. Bit 0 indicates that the header includes the software version (gen_software) of the validator that generated the block.

gen_catchain_seqnointeger

Catchain sequence number of the validator session that generated this block.

gen_utimestring

Unix timestamp in seconds when this block was generated, as a decimal string.

Example: 0

global_idinteger

Global network ID (-239 for mainnet, -3 for testnet).

key_blockboolean

Returns true if this is a key block containing validator set changes or config updates; otherwise false.

master_ref_seqnointeger

Sequence number (seqno) of the masterchain block that this shard block references. 0 for masterchain blocks.

masterchain_block_refobject

Identifier (workchain, shard, seqno) of the masterchain block in which this block was committed. For a masterchain block, it refers to the block itself.

seqnointeger

Block sequence number within its workchain and shard.

shardstring

Shard identifier as a hexadecimal string, for example 8000000000000000.

Example: 0

workchaininteger

Workchain ID: -1 for the masterchain, 0 for the basechain.

min_ref_mc_seqnointeger

Minimum masterchain block seqno referenced by this block.

prev_blocksobject[]

Array of previous block identifiers (workchain, shard, seqno). Usually contains one entry, but two after a shard merge.

seqnointeger

Block sequence number within its workchain and shard.

shardstring

Shard identifier as a hexadecimal string, for example 8000000000000000.

Example: 0

workchaininteger

Workchain ID: -1 for the masterchain, 0 for the basechain.

prev_key_block_seqnointeger

Sequence number of the previous key block.

rand_seedstring

256-bit random seed of this block, base64 encoded.

root_hashstring

Root hash of the block, base64 encoded. Together with file_hash, uniquely identifies a block.

seqnointeger

Block sequence number within its workchain and shard.

shardstring

Shard identifier as a 64-bit value in hexadecimal. The masterchain uses 8000000000000000.

Example: 0

start_ltstring

Logical time (lt) at the start of this block, as a decimal string.

Example: 0

tx_countinteger

Number of transactions included in this block.

validator_list_hash_shortinteger

Short hash of the validator set active during this block.

versioninteger

Block format version number.

vert_seqnointeger

Vertical sequence number of the block, which is the number of vertical (hard fork) blocks that precede it.

vert_seqno_incrboolean

Returns true if this block increments the vertical sequence number, meaning it is a vertical (hard fork) block; otherwise false.

want_mergeboolean

Returns true if validators have signaled a preference to merge this shard; otherwise false.

want_splitboolean

Returns true if validators have signaled a preference to split this shard; otherwise false.

workchaininteger

Workchain ID: -1 for the masterchain, 0 for the basechain.

X-API-KEY
Request
cURL
curl -X GET "https://ton-mainnet.nodit.io/api/v3/masterchainInfo" \
  -H "X-API-KEY: {YOUR_API_KEY}"
Response
Example · 200
{
  "last": {
    "workchain": -1,
    "shard": "8000000000000000",
    "seqno": 107892950,
    "root_hash": "xK75Suk+oCmf2xCrjiJ8uHKdCWdHKCboaWLlZYNeKeI=",
    "file_hash": "rwdK7s1vo64MVZvRNwivt6V2u+Gqke3EZs+NBhg7jX4=",
    "global_id": -239,
    "version": 0,
    "after_merge": false,
    "before_split": false,
    "after_split": false,
    "want_merge": true,
    "want_split": false,
    "key_block": false,
    "vert_seqno_incr": false,
    "flags": 1,
    "gen_utime": "1795684407",
    "start_lt": "119175502000000",
    "end_lt": "119175502000004",
    "validator_list_hash_short": 1934141625,
    "gen_catchain_seqno": 886372,
    "min_ref_mc_seqno": 107892947,
    "prev_key_block_seqno": 107801649,
    "vert_seqno": 1,
    "master_ref_seqno": 0,
    "rand_seed": "axOxg4EYtNTbtbiyjTRJOqxgg1mp360NXPEUf+kuVN8=",
    "created_by": "gcXVhhREynHONLmLl5vIs3eOjxJrBs7NDZFSzL/J5Ps=",
    "tx_count": 3,
    "masterchain_block_ref": {
      "workchain": -1,
      "shard": "8000000000000000",
      "seqno": 107892950
    },
    "prev_blocks": [
      {
        "workchain": -1,
        "shard": "8000000000000000",
        "seqno": 107892949
      }
    ]
  },
  "first": {
    "workchain": -1,
    "shard": "8000000000000000",
    "seqno": 1,
    "root_hash": "8GYhhrigd8CwZGrRT59iulLDcgiTYuvOAzFJxugc0Ts=",
    "file_hash": "V+XzykEwun4yePZhAEPZk77RbMfMOgS/S4GiJkSKY6s=",
    "global_id": -239,
    "version": 0,
    "after_merge": false,
    "before_split": false,
    "after_split": false,
    "want_merge": false,
    "want_split": false,
    "key_block": false,
    "vert_seqno_incr": false,
    "flags": 0,
    "gen_utime": "1573822385",
    "start_lt": "1000000",
    "end_lt": "1000012",
    "validator_list_hash_short": -1447544682,
    "gen_catchain_seqno": 0,
    "min_ref_mc_seqno": 1,
    "prev_key_block_seqno": 0,
    "vert_seqno": 0,
    "master_ref_seqno": 0,
    "rand_seed": "e1ZHQiC/ZPGzzR9IHm3u7FZ2ZwzzdUXMYRJf7DCQdQg=",
    "created_by": "6MC3PyuC80JUx8L+cNE4TnXEZ1i3TeCKxYFV5ZP9eKw=",
    "tx_count": 9,
    "masterchain_block_ref": {
      "workchain": -1,
      "shard": "8000000000000000",
      "seqno": 1
    },
    "prev_blocks": [
      {
        "workchain": -1,
        "shard": "8000000000000000",
        "seqno": 0
      }
    ]
  }
}