Last updated

ledger_current

[Source]

The ledger_current method returns the unique identifiers of the current in-progress ledger. This command is mostly useful for testing, because the ledger returned is still in flux.

Request Format

An example of the request format:

  1. WebSocket
  2. JSON-RPC
  3. Commandline
{
   "id": 2,
   "command": "ledger_current"
}

Try it! >

The request contains no parameters.

Response Format

An example of a successful response:

  1. WebSocket
  2. JSON-RPC
  3. Commandline
{
  "id": 2,
  "status": "success",
  "type": "response",
  "result": {
    "ledger_current_index": 6643240
  }
}

The response follows the standard format, with a successful result containing the following field:

FieldTypeDescription
ledger_current_indexUnsigned Integer - Ledger IndexThe ledger index of this ledger version.

A ledger_hash field is not provided, because the hash of the current ledger is constantly changing along with its contents.

Possible Errors