### GET /v0/block_opt Source: https://neardata.xyz Returns the optimistic block by block height or redirects to the finalized block. ```APIDOC ## GET /v0/block_opt ### Description Returns the optimistic block by block height or redirects to the finalized block. ### Method GET ### Endpoint /v0/block_opt/:block_height ### Parameters #### Path Parameters - **block_height** (integer) - Required - The height of the block to retrieve. ### Request Example /v0/block_opt/122000000 ### Response #### Success Response (200) Returns the optimistic block or redirects to the finalized block. ``` -------------------------------- ### GET /v0/block/:block_height/headers Source: https://neardata.xyz Returns only the `.block` key from the big response, which includes the block header with chunk headers. Logic is similar to `GET /v0/block/`. ```APIDOC ## GET /v0/block/:block_height/headers ### Description Returns only the `.block` key from the big response, which includes the block header with chunk headers. Logic is similar to `GET /v0/block/`. ### Method GET ### Endpoint /v0/block/:block_height/headers ### Parameters #### Path Parameters - **block_height** (integer) - Required - The height of the block to retrieve headers for. ### Request Example /v0/block/100000000/headers ### Response #### Success Response (200) Returns the block header with chunk headers. ``` -------------------------------- ### GET /v0/first_block Source: https://neardata.xyz Redirects to the first block after genesis. The block is guaranteed to exist and will be returned immediately. ```APIDOC ## GET /v0/first_block ### Description Redirects to the first block after genesis. The block is guaranteed to exist and will be returned immediately. ### Method GET ### Endpoint /v0/first_block ### Request Example /v0/first_block ### Response #### Success Response (302) Redirects to the first block after genesis. ``` -------------------------------- ### GET /v0/last_block/optimistic Source: https://neardata.xyz Redirects to the latest optimistic block. The block is guaranteed to exist and will be returned immediately. ```APIDOC ## GET /v0/last_block/optimistic ### Description Redirects to the latest optimistic block. The block is guaranteed to exist and will be returned immediately. ### Method GET ### Endpoint /v0/last_block/optimistic ### Request Example /v0/last_block/optimistic ### Response #### Success Response (302) Redirects to the latest optimistic block. ``` -------------------------------- ### GET /v0/block/:block_height/shard/:shard_id Source: https://neardata.xyz Returns a single shard of the block `:block_height` of the shard `:shard_id`. ```APIDOC ## GET /v0/block/:block_height/shard/:shard_id ### Description Returns a single shard of the block `:block_height` of the shard `:shard_id`. ### Method GET ### Endpoint /v0/block/:block_height/shard/:shard_id ### Parameters #### Path Parameters - **block_height** (integer) - Required - The height of the block. - **shard_id** (integer) - Required - The ID of the shard. ### Request Example /v0/block/100000000/shard/0 ### Response #### Success Response (200) Returns a single shard of the specified block and shard. ``` -------------------------------- ### GET /v0/last_block/final Source: https://neardata.xyz Redirects to the latest finalized block. The block is guaranteed to exist and will be returned immediately. ```APIDOC ## GET /v0/last_block/final ### Description Redirects to the latest finalized block. The block is guaranteed to exist and will be returned immediately. ### Method GET ### Endpoint /v0/last_block/final ### Request Example /v0/last_block/final ### Response #### Success Response (302) Redirects to the latest finalized block. ``` -------------------------------- ### GET /v0/block/:block_height/chunk/:shard_id Source: https://neardata.xyz Returns a single chunk of the block `:block_height` of the shard `:shard_id`. ```APIDOC ## GET /v0/block/:block_height/chunk/:shard_id ### Description Returns a single chunk of the block `:block_height` of the shard `:shard_id`. ### Method GET ### Endpoint /v0/block/:block_height/chunk/:shard_id ### Parameters #### Path Parameters - **block_height** (integer) - Required - The height of the block. - **shard_id** (integer) - Required - The ID of the shard. ### Request Example /v0/block/100000000/chunk/0 ### Response #### Success Response (200) Returns a single chunk of the specified block and shard. ``` -------------------------------- ### GET /v0/block Source: https://neardata.xyz Retrieves the finalized block by block height. Returns null if the block doesn't exist, and waits for the block if it is close to the current finalized block. ```APIDOC ## GET /v0/block ### Description Returns the finalized block by block height. If the block doesn't exist it returns `null`. If the block is not produced yet, but close to the current finalized block, the server will wait for the block to be produced and return it. ### Method GET ### Endpoint /v0/block/:block_height ### Parameters #### Path Parameters - **block_height** (integer) - Required - The height of the block to retrieve. ### Request Example /v0/block/100000000 ### Response #### Success Response (200) Returns the finalized block as a single JSON object. Includes the `tx_hash` for every receipt in the `receipt_execution_outcomes`. #### Response Example { "block": {}, "shards": [] } ``` === COMPLETE CONTENT === This response contains all available snippets from this library. No additional content exists. Do not make further requests.