Public

List ledger entries

The hash-chained record of fills.

GET/v1/ledger

Public. Ledger entries, newest first. Each entry records one fill and links to the entry before it.

Query

limitinteger

Entries to return. Default 50, maximum 1000.

afterinteger

Return entries with a height above this one, oldest first. Use it to walk the chain: start at after=0 and pass the last height you saw.

Response

entriesLedgerEntry[]

See LedgerEntry.

Hash rule

  • payload_hash = sha256hex(canonicalJson(payload)), where payload is the fill with exactly these fields: id, order_id, agent, provider_id, provider_name, max_price, price, saved, created_at. ledger_height and ledger_hash are not part of it.
  • canonicalJson sorts object keys at every level, adds no whitespace, serializes each value with JSON.stringify and drops keys whose value is undefined.
  • hash = sha256hex(prev_hash + payload_hash): the two lowercase hex strings joined as text, hashed, output as lowercase hex.
  • The first entry (genesis) uses 64 zeros as prev_hash.

See Settlement for a script that checks all of it.

The example hashes are real: each payload_hash is computed from an example fill with these rules (entry 42 from the fill shown on Objects), each hash equals sha256hex(prev_hash + payload_hash), and entry 42's prev_hash is entry 41's hash.
Request
curl "https://dapp.filobook.run/v1/ledger?limit=2"
Response · 200
{
  "entries": [
    {
      "height": 42,
      "kind": "fill",
      "ref": "fill_c04e77a1d93b5f26",
      "payload_hash": "38b935b530654e561ffb3cdcb1c7b89be937ed68bdc75fbd33cbda621197bff2",
      "prev_hash": "5e9c9e9906292a26f764a2ec8fc1e004caf91336dd802cb2d70842637286287a",
      "hash": "87bff5e441541bb1ba366339b638a5c4945d973a7deede8cfa6c936925c499b3",
      "created_at": "2026-11-13T09:21:00.000Z"
    },
    {
      "height": 41,
      "kind": "fill",
      "ref": "fill_6b20d9f3a80c1e57",
      "payload_hash": "87a0a41e2bb28bfcdac820c6582bc012baf20e022321b1c8b851f16a0427a456",
      "prev_hash": "367756852b4a8067a03f11fbe6c9b9b068d1291bea2528d555774709d9459be6",
      "hash": "5e9c9e9906292a26f764a2ec8fc1e004caf91336dd802cb2d70842637286287a",
      "created_at": "2026-11-13T09:12:31.000Z"
    }
  ]
}
Was this page helpful?