Skip to main content
Loading method details…

SDK Guide

The example above is querying details of a transaction using RPC methods directly. If you are using the Stellar SDK to build applications, you can use the native functions to get the same information.

# pip install --upgrade stellar-sdk
from stellar_sdk import SorobanServer, soroban_rpc


def get_transaction(hash: str) -> soroban_rpc.GetTransactionResponse:
server = SorobanServer(server_url='https://soroban-testnet.stellar.org', client=None)
tx = server.get_transaction(hash)
return tx

tx = get_transaction("6bc97bddc21811c626839baf4ab574f4f9f7ddbebb44d286ae504396d4e752da")

print("result", tx.status)

Using the Lab

You can use the getTransaction method in the Stellar Laboratory to retrieve details about a specific transaction. This is especially useful for checking the status of a transaction to determine whether it has been successfully recorded on the blockchain.

The default transaction history retention window in stellar-rpc is 24 hours, but this can be adjusted (up to 7 days) for private Soroban RPC instances using the transaction-retention-window configuration setting. For transaction debugging beyond that window, consider indexing the data yourself, using a third-party indexer, or querying Hubble—Stellar’s public BigQuery dataset.

👉 View getTransaction on the Lab

Lab: Get Transaction RPC

(random image transaction hash)