Skip to main content

getLedgerEntries RPC Method

Returns current ledger entry values, including contract data and code.

Updated on
Feb 21, 2024

getLedgerEntries RPC Method

Parameters

keys
array
REQUIRED
An array containing the keys of the ledger entries you want to retrieve (All keys are serialized in base64)

Returns

result
object
The result object which contains the following fields:
entries
array
An array containing the specified ledger entries:
key
string
The key of the ledger entry serialized in a base64
xdr
string
The current value of the given ledger entry serialized in a base64
lastModifiedLedgerSeq
string
The ledger number of the last time this entry was updated
latestLedger
string
The most recent ledger observed by the node at the time of generating this response
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": "getLedgerEntries",
7
"params": {
8
"keys": [
9
"YOUR_KEYS_OF_LEDGER_ENTRIES"
10
]
11
}
12
}'
Don't have an account yet?
Create your QuickNode endpoint in seconds and start building
Get started for free