Documentation

latest_block

Returns the best block this storage node has successfully received and stored. There is no JSON body; supply x-cache-id only.

Endpoint

POST https://storage.lineage.to/latest_block

Headers

HeaderTypeDescription
x-cache-idstringIdempotency / cache key. Must match the documented pattern (32 lowercase hex characters, e.g. ^[a-z0-9]{32}$). The response id matches this value.

Request body

None (empty body).

Example

curl -sS -X POST "https://storage.lineage.to/latest_block" \
  -H "Content-Type: application/json" \
  -H "x-cache-id: 0123456789abcdef0123456789abcdef" \
  -d ''

Responses

200 on success. content holds the block object (header fields, transaction hashes, and related material as defined by the release). Field names and nesting are version-specific.

Envelope fields (typical)

  • id — idempotency id (matches x-cache-id).
  • status — one of Success, Error, or Pending.
  • reason — human-readable detail; especially useful for errors.
  • route — logical route name for the call.
  • content — payload; shape depends on the operation.

Example success payload

{
  "id": "0123456789abcdef0123456789abcdef",
  "status": "Success",
  "reason": "Latest block",
  "route": "latest_block",
  "content": {
    "height": 12345,
    "block_hash": "<32-byte-hex header hash>",
    "prev_block": "<hex or null for genesis parent>",
    "merkle": "<root hex>",
    "tx_ids": [ "<tx-id-1>", "<tx-id-2>" ],
    "header": {}
  }
}

Example error envelope (typical 400)

{
  "id": null,
  "status": "Error",
  "reason": "Bad Request",
  "route": null,
  "content": null
}