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
Transaction status filtering (succeeded/failed)
Token account filtering
Cursor-based pagination
Why Use This Method
The N+1 Problem
With standard Solana RPC methods, fetching transaction history requires multiple calls:
Call getSignaturesForAddress to get a list of transaction signatures
Call getTransaction for each signature to get full transaction data
For a wallet with 100 transactions, that’s 101 API calls. For 1,000 transactions, it’s 1,001 calls. This creates latency, complexity, and higher costs.
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
Slot-based filtering : Query transactions from specific block ranges
Status filtering : Get only successful or only failed transactions
Token account inclusion : Capture transactions from associated token accounts
Token Account Support
Standard getSignaturesForAddress 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.
curl https://fra.rpc.orbitflare.com?api_key=YOUR-API-KEY -X POST -H "Content-Type: application/json" -d '{
"jsonrpc": "2.0",
"id": 1,
"method": "getTransactionsForAddress",
"params": [
"WALLET_ADDRESS",
{
"filters": {
"tokenAccounts": "all"
}
}
]
}'
Set tokenAccounts: "none" if you only want transactions that directly reference the address.
Parameters
The Solana address to query (base-58 encoded public key)
The commitment level for the query:
"finalized" - Query finalized blocks only (default)
"confirmed" - Query confirmed blocks
Note: "processed" is not supported for this method. Level of detail to return:
"signatures" - Return only signatures (up to 1000 results)
"full" - Return full transaction data (up to 100 results)
Default: "full" Maximum number of results to return.
For transactionDetails: "full": max 100
For transactionDetails: "signatures": max 1000
Default: 100 Sort direction:
"desc" - Newest transactions first (default)
"asc" - Oldest transactions first
Pagination cursor. Return results before this signature.
Pagination cursor. Return results after this signature.
Filter by token account association:
"all" - Include transactions from all token accounts
"none" - Exclude token account transactions
Default: "all" Unix timestamp. Return transactions before this time.
Unix timestamp. Return transactions after this time.
Return transactions before this slot.
Return transactions after this slot.
Filter by transaction status:
"success" - Only successful transactions
"failed" - Only failed transactions
Response
The response format depends on the transactionDetails parameter.
With transactionDetails: "full"
Array of full transaction objects, each containing: Transaction signature (base-58 encoded)
Slot in which the transaction was processed
Unix timestamp of the block
Position of the transaction within the block. This field is unique to getTransactionsForAddress and not available in standard RPC methods.
Full transaction data including message, signatures, and metadata
Transaction metadata including fee, balances, and logs
With transactionDetails: "signatures"
Array of signature objects, each containing: Transaction signature (base-58 encoded)
Slot in which the transaction was processed
Unix timestamp of the block
Position of the transaction within the block.
Error object if transaction failed, null otherwise
Code Examples
Basic Request
Get the most recent transactions for an address:
curl https://fra.rpc.orbitflare.com?api_key=YOUR-API-KEY -X POST -H "Content-Type: application/json" -d '{
"jsonrpc": "2.0",
"id": 1,
"method": "getTransactionsForAddress",
"params": [
"ADDRESS_HERE"
]
}'
Get Signatures Only
Retrieve up to 1000 signatures without full transaction data:
curl https://fra.rpc.orbitflare.com?api_key=YOUR-API-KEY -X POST -H "Content-Type: application/json" -d '{
"jsonrpc": "2.0",
"id": 1,
"method": "getTransactionsForAddress",
"params": [
"ADDRESS_HERE",
{
"transactionDetails": "signatures",
"limit": 1000
}
]
}'
Oldest-First with Time Filter
Get transactions from a specific time range, sorted oldest first:
curl https://fra.rpc.orbitflare.com?api_key=YOUR-API-KEY -X POST -H "Content-Type: application/json" -d '{
"jsonrpc": "2.0",
"id": 1,
"method": "getTransactionsForAddress",
"params": [
"ADDRESS_HERE",
{
"sortOrder": "asc",
"filters": {
"afterTime": 1704067200,
"beforeTime": 1706745600
}
}
]
}'
Successful Transactions Only
Filter to only return transactions that succeeded:
curl https://fra.rpc.orbitflare.com?api_key=YOUR-API-KEY -X POST -H "Content-Type: application/json" -d '{
"jsonrpc": "2.0",
"id": 1,
"method": "getTransactionsForAddress",
"params": [
"ADDRESS_HERE",
{
"filters": {
"status": "success"
}
}
]
}'
Paginated Request
Use cursor-based pagination to fetch more results:
curl https://fra.rpc.orbitflare.com?api_key=YOUR-API-KEY -X POST -H "Content-Type: application/json" -d '{
"jsonrpc": "2.0",
"id": 1,
"method": "getTransactionsForAddress",
"params": [
"ADDRESS_HERE",
{
"limit": 100,
"before": "LAST_SIGNATURE_FROM_PREVIOUS_RESPONSE"
}
]
}'
TypeScript Example
import { Connection } from '@solana/web3.js' ;
const connection = new Connection ( 'https://fra.rpc.orbitflare.com?api_key=YOUR-API-KEY' );
interface GetTransactionsOptions {
transactionDetails ?: 'full' | 'signatures' ;
limit ?: number ;
sortOrder ?: 'asc' | 'desc' ;
before ?: string ;
after ?: string ;
filters ?: {
tokenAccounts ?: 'all' | 'none' ;
beforeTime ?: number ;
afterTime ?: number ;
beforeSlot ?: number ;
afterSlot ?: number ;
status ?: 'success' | 'failed' ;
};
}
async function getTransactionsForAddress (
address : string ,
options : GetTransactionsOptions = {}
) {
const response = await fetch ( 'https://fra.rpc.orbitflare.com?api_key=YOUR-API-KEY' , {
method: 'POST' ,
headers: { 'Content-Type' : 'application/json' },
body: JSON . stringify ({
jsonrpc: '2.0' ,
id: 1 ,
method: 'getTransactionsForAddress' ,
params: [ address , options ],
}),
});
const data = await response . json ();
return data . result ;
}
// Get recent transactions
const recent = await getTransactionsForAddress ( 'ADDRESS_HERE' );
// Get oldest transactions first with time filter
const historical = await getTransactionsForAddress ( 'ADDRESS_HERE' , {
sortOrder: 'asc' ,
filters: {
afterTime: Math . floor ( Date . now () / 1000 ) - 86400 * 30 , // Last 30 days
},
});
// Paginate through all transactions
async function getAllTransactions ( address : string ) {
const allTransactions = [];
let before : string | undefined ;
while ( true ) {
const batch = await getTransactionsForAddress ( address , {
limit: 100 ,
before ,
});
if ( ! batch || batch . length === 0 ) break ;
allTransactions . push ( ... batch );
before = batch [ batch . length - 1 ]. signature ;
}
return allTransactions ;
}
Use Cases
Token Launch Analysis
Find the earliest transactions for a token mint to identify first minters and early holders. Use sortOrder: "asc" to start from the beginning:
const earlyActivity = await getTransactionsForAddress ( tokenMintAddress , {
sortOrder: 'asc' ,
limit: 100 ,
filters: {
tokenAccounts: 'all' ,
},
});
Wallet Funding History
Trace where a wallet’s funds originated by querying its complete transaction history:
const fundingHistory = await getTransactionsForAddress ( walletAddress , {
sortOrder: 'asc' ,
filters: {
tokenAccounts: 'all' ,
},
transactionDetails: 'full' ,
});
// First transactions often reveal funding sources
const firstTransactions = fundingHistory . slice ( 0 , 10 );
Failed Transaction Analysis
Debug transaction failures by filtering to only failed transactions:
const failedTxs = await getTransactionsForAddress ( walletAddress , {
filters: {
status: 'failed' ,
},
transactionDetails: 'full' ,
});
// Analyze error logs to understand failure reasons
failedTxs . forEach ( tx => {
console . log ( tx . signature , tx . meta ?. err , tx . meta ?. logMessages );
});
Build a Wallet Transaction Feed
Create a paginated transaction history for a wallet UI:
async function getWalletFeed ( wallet : string , cursor ?: string ) {
return getTransactionsForAddress ( wallet , {
limit: 20 ,
before: cursor ,
transactionDetails: 'full' ,
filters: {
tokenAccounts: 'all' ,
},
});
}
Trading Pattern Analysis
Filter successful trades within a specific time window:
const trades = await getTransactionsForAddress ( traderWallet , {
filters: {
status: 'success' ,
afterTime: startOfMonth ,
beforeTime: endOfMonth ,
},
transactionDetails: 'full' ,
});
Compliance Audit
Build a complete transaction history for regulatory compliance:
async function auditAddress ( address : string ) {
const allTxs = await getAllTransactions ( address );
return {
totalTransactions: allTxs . length ,
successful: allTxs . filter ( tx => ! tx . err ). length ,
failed: allTxs . filter ( tx => tx . err ). length ,
firstTransaction: allTxs [ allTxs . length - 1 ],
lastTransaction: allTxs [ 0 ],
};
}
For addresses with many transactions, you’ll need to paginate through results. The method supports cursor-based pagination using the before and after parameters.
Fetching Newer Transactions (Default)
With sortOrder: "desc" (default), transactions are returned newest-first. Use before to get older transactions:
// First request
const page1 = await getTransactionsForAddress ( address , { limit: 100 });
// Get next page using last signature as cursor
const lastSignature = page1 [ page1 . length - 1 ]. signature ;
const page2 = await getTransactionsForAddress ( address , {
limit: 100 ,
before: lastSignature ,
});
Fetching Older Transactions First
With sortOrder: "asc", transactions are returned oldest-first. Use after to get newer transactions:
// Get oldest transactions first
const page1 = await getTransactionsForAddress ( address , {
sortOrder: 'asc' ,
limit: 100 ,
});
// Continue forward in time
const lastSignature = page1 [ page1 . length - 1 ]. signature ;
const page2 = await getTransactionsForAddress ( address , {
sortOrder: 'asc' ,
limit: 100 ,
after: lastSignature ,
});
Fetch all transactions for an address:
async function getAllTransactions ( address : string ) {
const allTransactions = [];
let cursor : string | undefined ;
while ( true ) {
const batch = await getTransactionsForAddress ( address , {
limit: 100 ,
before: cursor ,
transactionDetails: 'full' ,
});
if ( ! batch || batch . length === 0 ) break ;
allTransactions . push ( ... batch );
cursor = batch [ batch . length - 1 ]. signature ;
// Optional: Add delay to respect rate limits
await new Promise ( resolve => setTimeout ( resolve , 100 ));
}
return allTransactions ;
}
Best Practices
Use signatures mode for counting : When you only need to count or list transactions, use transactionDetails: "signatures" for better performance and higher limits.
Filter early : Apply time, slot, or status filters to reduce the amount of data returned and improve response times.
Implement pagination : For addresses with many transactions, always paginate using the before cursor.
Cache results : Transaction data is immutable once confirmed. Cache historical results to avoid redundant requests.
Handle rate limits : Implement exponential backoff when making many sequential requests.
Common Errors
Code Message Solution -32600 Invalid request Check JSON-RPC format and required fields -32602 Invalid params Verify address format and option values -32005 Request limit exceeded Reduce limit or implement rate limiting
Comparison with Standard Methods
Feature getSignaturesForAddress + getTransaction getTransactionsForAddress API calls Multiple (1 + N) Single Sorting Newest first only Bidirectional Time filtering Not supported Supported Status filtering Not supported Supported Max signatures 1000 per call 1000 per call Max full transactions Limited by calls 100 per call