---
title: "Latest Block"
method: GET
path: "/head"
---

# Latest Block

`GET /head`

## Request

- Base URL: `https://portal.sqd.dev/datasets/bitcoin-mainnet`
- URL: `https://portal.sqd.dev/datasets/bitcoin-mainnet/head`
- Auth: none required
- TypeScript: <https://skmtc.dev/sqd/apis/sqd-portal-api-bitcoin-dataset-endpoints/docs/head/get.ts> (a function with typed inputs; its response is checked against the schema)

Returns the block number and hash of the highest block available in the dataset, or null if no blocks are available. Takes real-time data into account. Useful mostly for diagnostics, as clients using /stream can get this info from the X-Sqd-Finalized-Head-Number and X-Sqd-Finalized-Head-Hash response headers.

## Response `200`

Highest block information

- BlockHead, nullable
  - `number` integer: Block number of the highest available block.
  - `hash` string: ID (hash) of the highest available block.

---

[API](https://skmtc.dev/sqd/apis/sqd-portal-api-bitcoin-dataset-endpoints.md) - [All operations](https://skmtc.dev/sqd/apis/sqd-portal-api-bitcoin-dataset-endpoints/llms.txt) - [OpenAPI document](https://skmtc.dev/sqd/apis/sqd-portal-api-bitcoin-dataset-endpoints/revisions/cf9d60e495b1?raw)
