XRPL Date to Index API

Convert any datetime to the corresponding XRPL Ledger Index. Free, fast, and reliable.

Checking...
Endpoint
-
Rate Limit
-
Response Time
-

Try It Now

Enter a datetime to get the corresponding ledger index

Ledger Index
-
Ledger Count: -
Close Time: -
Input (UTC): -
Normalized: -

Ledger Count History

Visualize the number of ledgers created over time

API Endpoints

Simple REST API to convert dates to XRPL ledger indexes

GET/v1/index

Get the ledger index for a specific datetime. Returns the ledger that was active at the start of that hour.

Parameters
datetimeISO8601 format (e.g., 2024-01-15T12:00:00Z)
Response
ledger_indexThe ledger index at the start of that hour
ledger_countNumber of ledgers created in that hour (null if next hour unavailable)
close_timeActual close time of the ledger (ISO8601)
normalized_hourThe hour the datetime was normalized to
curl https://xrpl-date-to-index-api.shirome.net/v1/index?datetime=2025-01-15T12:00:00Z
{
  "ledger_index": 93474603,
  "ledger_count": 926,
  "close_time": "2025-01-15T12:00:00Z",
  "normalized_hour": "2025-01-15T12:00:00Z",
  "resolution": "hourly"
}
GET/v1/index/batch

Get ledger indexes for a date range. Supports hourly or daily resolution.

Parameters
fromStart date (YYYY-MM-DD or ISO8601)
toEnd date (YYYY-MM-DD or ISO8601)
resolutionhourly (default) or daily
Response
metaRequest metadata (resolution, from, to, count)
items[]Array of ledger data for each time period
curl https://xrpl-date-to-index-api.shirome.net/v1/index/batch?from=2025-01-01&to=2025-01-03&resolution=daily
{
  "meta": {
    "resolution": "daily",
    "from": "2025-01-01T00:00:00Z",
    "to": "2025-01-03T23:00:00Z",
    "count": 3
  },
  "items": [
    {
      "datetime": "2025-01-01T00:00:00Z",
      "ledger_index": 93153309,
      "ledger_count": 22082,
      "close_time": "2025-01-01T00:00:00Z"
    },
    ...
  ]
}