getTransactions
POST
https://triport.io/rpc/stellarReturns a list of transactions with their details through Stellar Soroban JSON-RPC.
Stellar mainnetstellar:rpcstellar_read_rpc_heavy — 15 / 20 / 100 / 250 RPS (free / basic / pro / business) (default, unmeasured)
Returns a cursor-paginated list of retained transactions, including status and XDR envelope/result data when records are present.
Use it for transaction-level ingestion. Use getEvents when only emitted contract events are needed, or Horizon for HAL resources.
Both measured Soroban nodes retained 120,960 ledgers. The page limit is 200.
Parameters
JSON-RPC params is a by-name object. Only the fields below are defined by the OpenRPC catalog.
startLedgernumberoptionalLedger 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.paginationobjectoptionalPagination in stellar-rpc is similar to pagination in Horizon. See Pagination.
xdrFormatstringoptionalLets 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.
Parameter sub-fieldsobjectpagination.cursorstringAn opaque string which acts as a paging token. To obtain the next page of results occurring after a given response set this value to the
cursor field of the response.pagination.limitnumberThe maximum number of records returned. The limit for getTransactions can range from 1 to 200 - an upper limit that is hardcoded in Stellar-RPC for performance reasons. If this argument isn't designated, it defaults to 50.
Response
The response is copied unchanged from the accepted fixture.
resultobjectMethod result object.
result.cursorstringA token which can be included in a subsequent request to obtain the next page of results.
result.latestLedgernumberThe sequence number of the latest ledger known to Stellar RPC at the time it handled the request.
result.latestLedgerCloseTimestampnumberThe unix timestamp of the close time of the latest ledger known to Stellar RPC at the time it handled the request.
result.oldestLedgernumberThe sequence number of the oldest ledger ingested by Stellar RPC at the time it handled the request.
result.oldestLedgerCloseTimestampnumberThe unix timestamp of the close time of the oldest ledger ingested by Stellar RPC at the time it handled the request.
result.transactionsarray of objectDefined by the OpenRPC schema.
result.transactions[].applicationOrdernumberThe 1-based index of the transaction among all transactions included in the ledger.
result.transactions[].createdAtnumberThe unix timestamp of when the transaction was included in the ledger.
result.transactions[].diagnosticEventsXdrarray of string(optional) A base64 encoded slice of xdr.DiagnosticEvent. This is only present if the
ENABLE_SOROBAN_DIAGNOSTIC_EVENTS has been enabled on the RPC server.result.transactions[].envelopeXdrstringThe TransactionEnvelope structure for this transaction (base64-encoded string).
result.transactions[].eventsobjectContains all events emitted during transaction execution. Note: Available only on RPC v23.x (currently testnet only).
result.transactions[].events.contractEventsXdrarray of array of stringA nested array of base64-encoded xdr.ContractEvent. Each inner array represents the contract events emitted by a single operation within the transaction.
result.transactions[].events.transactionEventsXdrarray of stringAn array of base64-encoded xdr.TransactionEvent. These include events such as fees being charged or refunded.
result.transactions[].feeBumpbooleanIndicates whether the transaction was fee bumped.
result.transactions[].ledgernumberThe sequence number of the ledger which included the transaction.
result.transactions[].resultMetaXdrstringThe TransactionResultMeta structure for this transaction (base64-encoded string).
result.transactions[].resultXdrstringThe TransactionResult structure for this transaction (base64-encoded string).
result.transactions[].statusstringIndicates whether the transaction was successful or not.
result.transactions[].txHashstringThe hex-encoded hash of the transaction.
Errors
Errors use the standard JSON-RPC envelope. See Stellar errors and the shared error reference.
| Code | Meaning | When it happens |
|---|---|---|
-32602 | Invalid params | pagination.limit exceeds 200; positional-array style params are rejected. A start ledger below the node window returns beyond_retention and oldest N. |
-32601 | Method not found | The method is absent from the published Stellar OpenRPC catalog. |
401 | Unauthorized | The API key is missing or invalid. |
429 | Rate limited | The stellar_read_rpc_heavy RPS budget is exceeded. |
Examples
JavaScript (fetch)
const request = {
"jsonrpc": "2.0",
"id": 1,
"method": "getTransactions",
"params": {
"startLedger": "${stellar.ledger}",
"pagination": {
"limit": 2
}
}
};
const response = await fetch("https://triport.io/rpc/stellar", {
method: "POST",
headers: {
"x-token": process.env.TRIPORT_API_KEY,
"Content-Type": "application/json",
},
body: JSON.stringify(request),
});
const payload = await response.json();
if (!response.ok || payload.error) throw new Error(JSON.stringify(payload.error));
console.log(payload.result);Notes
- The measured retention is 120,960 ledgers.
pagination.limitis at most 200; XDR remains string encoded.- Related:
getEvents,getLedgers, and Horizon transactions. - This is a read-only surface. No write or transaction-submission method is published.