Ledger Methods
Get ledger information
wss://honeycluster.io
rpc method: ledger

Retrieves information about a specific ledger version, optionally including transactions and state data.

Try it now
Response · ledger WS Response
{
  "result": {
    "ledger": {
      "accepted": true,
      "account_hash": "4BC50C9B0D8515D3EAAE1E74B29A95804346C491EE1A95BF25E4AAB854A6A652",
      "close_flags": 0,
      "close_time": 750171900,
      "close_time_human": "2023-Oct-15 12:05:00.000000000 UTC",
      "close_time_resolution": 10,
      "closed": true,
      "hash": "4BC50C9B0D8515D3EAAE1E74B29A95804346C491EE1A95BF25E4AAB854A6A652",
      "ledger_hash": "4BC50C9B0D8515D3EAAE1E74B29A95804346C491EE1A95BF25E4AAB854A6A652",
      "ledger_index": "89012345",
      "parent_close_time": 750171897,
      "parent_hash": "4BC50C9B0D8515D3EAAE1E74B29A95804346C491EE1A95BF25E4AAB854A6A652",
      "total_coins": "99999490178059920",
      "transaction_hash": "4BC50C9B0D8515D3EAAE1E74B29A95804346C491EE1A95BF25E4AAB854A6A652"
    },
    "ledger_index": 89012345,
    "validated": true
  },
  "status": "success",
  "type": "response",
  "id": 1
}
Request Message
ledger WS Request
application/json
Get ledger information
FieldTypeDescription
command
required
string
WebSocket command name
id
object
Client-supplied identifier to correlate requests with responses.
ledger_index
object
A ledger index (sequence number) or shortcut string identifying which ledger to use.
ledger_hash
string
256-bit hex hash identifying a specific ledger version.
full
boolean
If true, return full information on the entire ledger. Admin only.
accounts
boolean
If true, include all accounts state data. Admin only.
transactions
boolean
If true, include information about transactions in the ledger.
expand
boolean
If true, return full JSON for transactions/accounts instead of just hashes.
owner_funds
boolean
If true, include owner_funds field in offer-type transactions.
binary
boolean
If true, return data in binary (hex) format instead of JSON.
queue
boolean
If true, include queued transaction information. Only valid for current ledger.
type
string
Filter ledger entries by type (e.g. "offer", "state").
api_version
object
API version for the response format. Version 2 is the default for rippled 2.0+.
Example
Json
{
  "command": "ledger",
  "id": 1,
  "ledger_index": "validated",
  "transactions": true,
  "expand": false
}
Response Message
ledger WS Response
application/json
WebSocket response for ledger
FieldTypeDescription
result
object
status
enum<string>
Available
successerror
type
string
id
stringnumber
Echo of the client-provided correlation ID
Example
Json
{
  "result": {
    "ledger": {
      "accepted": true,
      "account_hash": "4BC50C9B0D8515D3EAAE1E74B29A95804346C491EE1A95BF25E4AAB854A6A652",
      "close_flags": 0,
      "close_time": 750171900,
      "close_time_human": "2023-Oct-15 12:05:00.000000000 UTC",
      "close_time_resolution": 10,
      "closed": true,
      "hash": "4BC50C9B0D8515D3EAAE1E74B29A95804346C491EE1A95BF25E4AAB854A6A652",
      "ledger_hash": "4BC50C9B0D8515D3EAAE1E74B29A95804346C491EE1A95BF25E4AAB854A6A652",
      "ledger_index": "89012345",
      "parent_close_time": 750171897,
      "parent_hash": "4BC50C9B0D8515D3EAAE1E74B29A95804346C491EE1A95BF25E4AAB854A6A652",
      "total_coins": "99999490178059920",
      "transaction_hash": "4BC50C9B0D8515D3EAAE1E74B29A95804346C491EE1A95BF25E4AAB854A6A652"
    },
    "ledger_index": 89012345,
    "validated": true
  },
  "status": "success",
  "type": "response",
  "id": 1
}