Paginated History
Browse full transaction history with efficient keyset pagination using the Helius RPC method. Best for indexing or loading large histories with up to 1000 transactions per page.
RPC vs Enhanced API
This uses the RPC getTransactionsForAddress method which returns raw signature data with keyset pagination tokens. It's faster and supports larger page sizes than the Enhanced API, but doesn't include parsed transaction types or descriptions.
Try It
Code Example
// Paginated transaction history using RPC method
// Uses keyset pagination for efficient large history queries
import { Helius } from 'helius-sdk';
const helius = new Helius('YOUR_API_KEY');
async function* getTransactionHistory(address: string) {
let paginationToken: string | null = null;
do {
// Use getTransactionsForAddress RPC method
const response = await helius.rpc.getTransactionsForAddress(address, {
transactionDetails: 'signatures', // Fast mode, up to 1000 per page
limit: 100,
sortOrder: 'desc',
...(paginationToken && { paginationToken }),
});
yield response.data;
paginationToken = response.paginationToken;
} while (paginationToken);
}
// Usage with async iterator
const address = '86xCnPeV69n6t3DnyGvkKobf9FdN2H9oiVDdaMpo2MMY';
let count = 0;
for await (const page of getTransactionHistory(address)) {
count += page.length;
console.log(`Loaded ${count} transactions...`);
// Process each signature
page.forEach(sig => {
console.log(` ${sig.signature} - ${sig.blockTime}`);
});
}API Tips
- Keyset pagination: Use the
paginationTokenfrom the response to fetch the next page efficiently. - Page size: With
transactionDetails: "signatures", you can request up to 1000 transactions per page. - Use case: Ideal for indexing full wallet history or analytics. For user-facing activity feeds, prefer the Enhanced API.
Frequently Asked Questions
What is keyset pagination?
Keyset pagination uses a cursor token instead of page numbers. Pass the paginationToken from the response to get the next page. This is more efficient than offset pagination for large datasets.
How many transactions can I fetch per page?
With transactionDetails set to "signatures", you can fetch up to 1000 transactions per page. This is ideal for indexing full wallet history.
When should I use RPC pagination vs Enhanced API?
Use RPC pagination for indexing or analytics where you need raw data fast. Use the Enhanced API for user-facing activity feeds where you need parsed transaction types and descriptions.