POST /block/latest

Changed on

Get the latest block. Useful for checking synchronization process and pagination

Request

  • Base URL
    / (relative, and the document was published on a file host, not at the API’s origin)
  • URL
    /block/latest
  • Auth
    none required

Request body

offsetnumber double required

Note: an offset of -1 is treated the same as an offset of +1

It's usually best to avoid pagination on the latest block as in Cardano, small rollbacks of 1~2 block are very frequent and expected (read Ouroboros for why) That means that using this block for pagination will often lead to your pagination being invalidated by a rollback To avoid this, you can pass an offset from the tip for more stable pagination

Response

Example response

{
  "block": {
    "slot": 4924800,
    "epoch": 209,
    "height": 4512067,
    "hash": "cf8c63a909d91776e27f7d05457e823a9dba606a7ab499ac435e7904ee70d7c8",
    "era": 1
  }
}

Changes

    • info

      the / response's property pattern [0-9a-fA-F]{64} was added for the status

    • info

      added the non-success response with the status

    • info

      removed the non-success response with the status