Skip to content

Get a ledger_index by its closing time.

GET
/ledgers/ledger_index

Retrieve the last closed ledger by a given time.

date
string format: date-time
  • Search for the last closed ledger by the specified date time.

  • Format: ‘1970-01-01T00:00:00Z’

  • Default is the current time. (last closed ledger)

Success response

  • ledger_index = The last closed ledger_index by the given time, or null if the ledger_index could not be found.

  • closed = The time this ledger was closed.

object
ledger_index
required

The last closed ledger_index by the given time, or null if the ledger_index could not be found.

number
closed
required

The time this ledger was closed.

string

Query input malformed

ValidationError
object
message
required
string
code
string
path
string
x-ratelimit-limit
integer

Maximum number of requests in the rate limit window.

x-ratelimit-remaining
integer

Number of remaining request in current rate limit window.

x-ratelimit-reset
integer

The seconds until the current rate limit window resets.

Too Many Requests

x-ratelimit-limit
integer

Maximum number of requests in the rate limit window.

x-ratelimit-remaining
integer

Number of remaining request in current rate limit window.

x-ratelimit-reset
integer

The seconds until the current rate limit window resets.