Overview
getTransactionsForAddress combines transaction signature lookup and full transaction retrieval into one efficient call. Instead of making separate requests to getSignaturesForAddress and then getTransaction for each signature, you get everything in a single request.
This method supports:
- Bidirectional sorting (oldest-first or newest-first)
- Time and slot-based filtering via range operators
- Transaction status filtering (succeeded/failed)
- Token account filtering (
none,balanceChanged,all) - Cursor-based pagination via
paginationToken - Four detail levels:
signatures,none,accounts,full
Why Use This Method
The N+1 Problem
With standard Solana RPC methods, fetching transaction history requires multiple calls:- Call
getSignaturesForAddressto get a list of transaction signatures - Call
getTransactionfor each signature to get full transaction data
getTransactionsForAddress solves this by returning full transaction data in a single call—up to 100 complete transactions or 1,000 signatures per request.
Additional Capabilities
Beyond efficiency, this method provides features not available in standard RPC:- Bidirectional sorting: Query oldest-first (
asc) to trace an address from its first transaction - Time-based filtering: Retrieve transactions within a specific date range using
filters.blockTimewith range operators - Slot-based filtering: Query transactions from specific block ranges using
filters.slotwith range operators - Status filtering: Get only successful or only failed transactions
- Token account inclusion: Capture transactions from associated token accounts
Token Account Support
StandardgetSignaturesForAddress only returns transactions that directly reference the queried address. This misses an important category: token transfers.
When tokens are sent to a wallet, the transaction references the wallet’s Associated Token Account (ATA), not the wallet address itself. This means standard methods give you an incomplete picture.
getTransactionsForAddress with tokenAccounts: "all" automatically includes transactions from all token accounts owned by the address, giving you complete transaction history.
tokenAccounts: "none" (the default) if you only want transactions that directly reference the address.
Parameters
The Solana address to query (base-58 encoded public key, 32 bytes)
Response
The responseresult is an object containing a data array and an optional paginationToken:
paginationToken is only present when more results are available. Pass it in the next request to fetch the next page.
With transactionDetails: "signatures" or "none"
With transactionDetails: "accounts"
Same fields as signatures mode, plus:
Array of base-58 public keys involved in the transaction, including addresses loaded from lookup tables.
With transactionDetails: "full"
Code Examples
Basic Request
Get the most recent signatures for an address (default mode):Get Full Transactions
Retrieve up to 100 full transactions:Get Signatures Only
Retrieve up to 1000 signatures without full transaction data:Oldest-First with Time Filter
Get transactions from a specific time range, sorted oldest first:Successful Transactions Only
Filter to only return transactions that succeeded:Paginated Request
Use cursor-based pagination to fetch more results:TypeScript Example
Use Cases
Token Launch Analysis
Find the earliest transactions for a token mint to identify first minters and early holders. UsesortOrder: "asc" to start from the beginning:
Wallet Funding History
Trace where a wallet’s funds originated by querying its complete transaction history:Failed Transaction Analysis
Debug transaction failures by filtering to only failed transactions:Build a Wallet Transaction Feed
Create a paginated transaction history for a wallet UI:Trading Pattern Analysis
Filter successful trades within a specific time window:Compliance Audit
Build a complete transaction history for regulatory compliance:Pagination
For addresses with many transactions, use thepaginationToken from the response to fetch the next page. The token is a string in the format "slot:txIndex" that tells the server where to continue from.
Fetching Newer Transactions (Default)
WithsortOrder: "desc" (default), transactions are returned newest-first. The paginationToken continues to older transactions:
Fetching Older Transactions First
WithsortOrder: "asc", transactions are returned oldest-first. The paginationToken continues to newer transactions:
Complete Pagination Example
Fetch all signatures for an address:Best Practices
-
Use
signaturesmode for counting: When you only need to count or list transactions, usetransactionDetails: "signatures"(the default) for better performance and higher limits (up to 1000). -
Filter early: Apply
blockTime,slot, orstatusfilters to reduce the amount of data scanned and improve response times. -
Implement pagination: For addresses with many transactions, always paginate using the
paginationTokenfrom the response. - Cache results: Transaction data is immutable once finalized. Cache historical results to avoid redundant requests.
- Handle rate limits: Implement exponential backoff when making many sequential requests.