---
title: "Get the nearest fork heights relative to a block."
method: GET
path: "/api/v1/block/{hash}/nearestforks"
tags: ["block"]
---

# Get the nearest fork heights relative to a block.

`GET /api/v1/block/{hash}/nearestforks`

Finds the closest blocks with multiple children in each direction.

## Path parameters

- `hash` string, required

## Response `200`

Nearest fork heights

- NearestForksResponse
  - `current_height` integer
  - `next_fork` NearestForkInfo
    - `height` integer
    - `parent_hash` string
  - `prev_fork` NearestForkInfo
    - `height` integer
    - `parent_hash` string

## Other responses

- `400` — Error response
- `404` — Error response

---

[API](https://skmtc.net/bsv-blockchain/apis/teranode-asset-service-api.md) · [All operations](https://skmtc.net/bsv-blockchain/apis/teranode-asset-service-api/llms.txt) · [OpenAPI document](https://skmtc-service-staging.skmtc.workers.dev/v1/apis/bsv-blockchain/teranode-asset-service-api/versions/5bc9be41e029/schema)
