> For the complete documentation index, see [llms.txt](https://max-daunarovich.gitbook.io/flow-network/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://max-daunarovich.gitbook.io/flow-network/introduction/block-information.md).

# Block Information

To get information about a block, the functions `getCurrentBlock` and `getBlock` can be used:

```
  fun getCurrentBlock(): Block
```

Returns the current block, i.e. the block which contains the currently executed transaction.

```
  fun getBlock(at height: UInt64): Block?
```

Returns the block at the given height. If the given block does not exist the function returns `nil`.

The `Block` type contains the identifier, height, and timestamp:

```
pub struct Block {
    /// The ID of the block.
    ///
    /// It is essentially the hash of the block.
    ///
    pub let id: [UInt8; 32]

    /// The height of the block.
    ///
    /// If the blockchain is viewed as a tree with the genesis block at the root,
    // the height of a node is the number of edges between the node and the genesis block
    ///
    pub let height: UInt64

    /// The view of the block.
    ///
    /// It is a detail of the consensus algorithm. It is a monotonically increasing integer
    /// and counts rounds in the consensus algorithm. Since not all rounds result in a finalized block,
    /// the view number is strictly greater than or equal to the block height
    ///
    pub let view: UInt64

    /// The timestamp of the block.
    ///
    /// It is the local clock time of the block proposer when it generates the block
    ///
    pub let timestamp: UFix64
}
```


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

## Querying This Documentation
If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter, and the optional `goal` query parameter:

```
GET https://max-daunarovich.gitbook.io/flow-network/introduction/block-information.md?ask=<question>&goal=<endgoal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is optional and describes the broader end goal you are ultimately trying to accomplish on behalf of the user. GitBook uses it to tailor the answer towards what is most useful for that goal.

The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
