# FAQ #1 - How to get the height of the current block?

**URL:** <https://forum.flow.com/t/faq-1-how-to-get-the-height-of-the-current-block/448>\
**Category:** 🏄🏻‍♀️ Cadence\
**Created:** [July 19, 2020, 10:59am UTC](https://forum.flow.com/t/faq-1-how-to-get-the-height-of-the-current-block/448 "2020-07-19T10:59:29Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![MaxStarka](https://sea2.discourse-cdn.com/flex022/user_avatar/forum.flow.com/maxstarka/32/56_2.png) [@MaxStarka](https://forum.flow.com/u/MaxStarka)\
**Post date:** [July 19, 2020, 10:59am UTC](https://forum.flow.com/t/faq-1-how-to-get-the-height-of-the-current-block/448/1 "2020-07-19T10:59:29Z")

</div>

In order to get current block height you need to call method `getCurrentBlock()` it will return you a struct with following signature:

```
struct Block {
    let id: [UInt8; 32]
    let height: UInt64
    let timestamp: UFix64
}

```

Current version of Playground have this method implemented, though it returns you a struct with two fields `number` (which should represent block height) and `hash`. We would advice to mock this method for now and then replace it with actual call of native method. Sorry for inconvenience 🙇‍♂️

---

<div class="post-metadata">

**Author:** ![zephyr](https://avatars.discourse-cdn.com/v4/letter/z/13edae/32.png) [@zephyr](https://forum.flow.com/u/zephyr)\
**Post date:** [February 1, 2023, 9:42pm UTC](https://forum.flow.com/t/faq-1-how-to-get-the-height-of-the-current-block/448/2 "2023-02-01T21:42:02Z")

</div>

I’d really like to be able do do this using a REST endpoint. Does that exist?

---

<div class="post-metadata">

**Author:** ![MaxStarka](https://sea2.discourse-cdn.com/flex022/user_avatar/forum.flow.com/maxstarka/32/56_2.png) [@MaxStarka](https://forum.flow.com/u/MaxStarka)\
**Post date:** [February 1, 2023, 9:48pm UTC](https://forum.flow.com/t/faq-1-how-to-get-the-height-of-the-current-block/448/3 "2023-02-01T21:48:34Z")

</div>

Sure thing! 🙂

[https://rest-testnet.onflow.org/v1/blocks?height=final](https://rest-testnet.onflow.org/v1/blocks?height=final)

You can get other HTTP endpoints on Developer Portal:

> **[Access API | Flow Developer Portal](https://developers.flow.com/http-api#tag/Blocks)**
>
> Open API Reference Docs for the API
