blockchain

Get blocks

Returns blocks by specified filters.

get/api/v3/blocks

Request

  • Base URL: https://toncenter.com (the document declares no server; this is the origin it was published from)
  • URL: https://toncenter.com/api/v3/blocks
  • Auth: one of:
    • API key in header X-Api-Key
    • API key in query parameter api_key

Query parameters

workchaininteger

Block workchain.

shardstring

Block shard id. Must be sent with workchain. Example: 8000000000000000.

seqnointeger

Block block seqno. Must be sent with workchain and shard.

root_hashstring

Block root hash.

file_hashstring

Block file hash.

mc_seqnointeger

Masterchain block seqno

start_utimeinteger

Query blocks with generation UTC timestamp after given timestamp.

end_utimeinteger

Query blocks with generation UTC timestamp before given timestamp.

start_ltinteger

Query blocks with lt >= start_lt.

end_ltinteger

Query blocks with lt <= end_lt.

limitinteger

Limit number of queried rows. Use with offset to batch read.

offsetinteger

Skip first N rows. Use with limit to batch read.

sort'asc' | 'desc'

Sort results by UTC timestamp.

Response

OK

Example response

{
  "blocks": [
    {
      "end_lt": "0",
      "gen_utime": "0",
      "masterchain_block_ref": {
        "shard": "0"
      },
      "prev_blocks": [
        {
          "shard": "0"
        }
      ],
      "shard": "0",
      "start_lt": "0"
    }
  ]
}

Changes

No recorded changes to this operation across all 1 revision of this API.