Skip to main content
The getTransactions method return a detailed list of transactions starting from the user specified starting point that you can paginate as long as the pages fall within the history retention of their corresponding RPC provider.

Params (3)

Please note that parameter structure within the request must contain named parameters as a by-name object, and not as positional arguments in a by-position array
number
Ledger sequence number to start fetching responses from (inclusive). This method will return an error if startLedger is less than the oldest ledger stored in this node, or greater than the latest ledger seen by this node. If a cursor is included in the request, startLedger must be omitted.Sequence number of the ledger.
object
Pagination in stellar-rpc is similar to pagination in Horizon. See Pagination.
string
Lets the user choose the format in which the response should be returned - either as unpacked JSON or as base64-encoded XDR strings. Note that you should not rely on any schema for the JSON, as it will change when the underlying XDR changes.Specifies whether XDR should be encoded as Base64 (default or ‘base64’) or JSON (‘json’).

Result

(getTransactionsResult)
object[]
number
The sequence number of the latest ledger known to Stellar RPC at the time it handled the request.
number
The unix timestamp of the close time of the latest ledger known to Stellar RPC at the time it handled the request.
number
The sequence number of the oldest ledger ingested by Stellar RPC at the time it handled the request.
number
The unix timestamp of the close time of the oldest ledger ingested by Stellar RPC at the time it handled the request.
string
A token which can be included in a subsequent request to obtain the next page of results.

Examples

Query a list of transactions starting from the given startLedger.Request
Result

Using the Lab

The getTransactions method returns a paginated list of transactions starting from a user-defined point. You can continue paginating through results as long as the requested range falls within the history retention window of the corresponding RPC provider. Use this method in the Stellar Laboratory to explore recent activity within a given time frame or ledger range. 👉 View Transactions on the Lab Lab: gettransactions