Saltar al contenido principal

getLatestLedger

For finding out the current latest known ledger of this node. This is a subset of the ledger info from Horizon.

Params

(0)

Result

(getLatestLedgerResult)
id
string

Hash identifier of the latest ledger (as a hex-encoded string) known to Stellar RPC at the time it handled the request.

>= 64 characters<= 64 characters
Match pattern:
^[a-f\d]{64}$
protocolVersion
number

Stellar Core protocol version associated with the latest ledger.

sequence
number

The sequence number of the latest ledger known to Stellar RPC at the time it handled the request.

Example

Example request to the getLatestLedger method.

Request

curl -X POST \
-H 'Content-Type: application/json' \
-d '{
"jsonrpc": "2.0",
"id": 8675309,
"method": "getLatestLedger"
}' \
https://soroban-testnet.stellar.org | jq

Result

{
"jsonrpc": "2.0",
"id": 8675309,
"result": {
"id": "c73c5eac58a441d4eb733c35253ae85f783e018f7be5ef974258fed067aabb36",
"protocolVersion": 20,
"sequence": 2539605
}
}