Skip to main content

getLatestLedger RPC Method

Returns the current latest known ledger of the node.

Updated on
Feb 21, 2024

getLatestLedger RPC Method

Parameters

This method does not accept any parameters

Returns

result
object
The result object which contains the following fields:
id
string
The hash of the latest ledger encoded in hexadecimal format
protocolVersion
integer
The protocol version associated with the latest ledger
sequence
integer
The sequence number of the latest ledger
Request
1
curl --location 'https://docs-demo.stellar-mainnet.quiknode.pro/' \
2
--header 'Content-Type: application/json' \
3
--data '{
4
"jsonrpc": "2.0",
5
"id": 8675309,
6
"method": "getLatestLedger"
7
}'
Don't have an account yet?
Create your QuickNode endpoint in seconds and start building
Get started for free