---
title: "HeaderDepth returns the depth of the header in main chain or error if the block is not found or it exists on fork"
method: GET
path: "/babylon/btclightclient/v1/depth/{hash}"
tags: ["Query"]
---

# HeaderDepth returns the depth of the header in main chain or error if the block is not found or it exists on fork

`GET /babylon/btclightclient/v1/depth/{hash}`

## Request

- The document declares no server URL.
- Auth: none declared

## Path parameters

- `hash` string, required

## Response `200`

A successful response.

- object
  - `depth` integer

## Other responses

- `default`: An unexpected error response.

## Changes

- **2023-07-25** `6b97e8198167`: 1 info
  - endpoint added
- **2023-02-14** `56ada4e129e1`: 1 breaking
  - api path removed without deprecation

[Operation history](https://skmtc.dev/babylonlabs-io/apis/babylon-grpc-gateway-docs/changes/babylon/btclightclient/v1/depth/:hash/get.md)

---

[API](https://skmtc.dev/babylonlabs-io/apis/babylon-grpc-gateway-docs.md) - [All operations](https://skmtc.dev/babylonlabs-io/apis/babylon-grpc-gateway-docs/llms.txt) - [OpenAPI document](https://skmtc.dev/babylonlabs-io/apis/babylon-grpc-gateway-docs/revisions/93a09c641887?raw)
