Skip to content

Latest commit

 

History

History
21 lines (14 loc) · 1.15 KB

File metadata and controls

21 lines (14 loc) · 1.15 KB
hide_title true
description Returns list of ledgers

import { RpcMethod } from "@site/src/components/RpcMethod"; import rpcSpec from "@site/static/stellar-rpc.openrpc.json";

<RpcMethod method={rpcSpec.methods.filter((meth) => meth.name === "getLedgers")[0]} />

Using the Lab

You can retrieve a list of past ledgers using the getLedgers method in the Stellar Laboratory. This endpoint returns detailed ledger data starting from a specified point, with support for pagination—as long as the requested range falls within the history retention of the RPC provider.

The method also supports an optional XDR format parameter, which allows developers to choose between unpacked JSON or base64-encoded XDR strings for the response format.

👉 View getLedgers on the Lab

Lab: getLedgers