Skip to main content

Consistency

For endpoints which serve data which can change from ledger to ledger (for example an account balance), Horizon includes a Latest-Ledger HTTP header in its response. The value of the Latest-Ledger HTTP header is the sequence number of the latest ledger known to Horizon at the time the request was processed. Horizon will guarantee that all the data included in the response is consistent with that ledger. This mechanism prevents race conditions where a request is processed at the boundary of two ledgers and ensures that the response is consistent with the ledger included in the Latest-Ledger HTTP header.