Quick Reference :
/v0/transactions
- Parse individual or multiple transaction signatures
/v0/addresses/{address}/transactions
- Get transaction history for an address
Filter by transaction type using the type
parameter (e.g., NFT_SALE
, SWAP
, TRANSFER
)
Important Limitations :
Enhanced Transaction API V1 won’t be updated while we are working on V2
We only parse NFT, Jupiter, and SPL-related transactions
Do not rely on these parsers for DeFi or non-NFT, Jupiter, and SPL transactions
Overview
The Enhanced Transactions API transforms complex Solana transactions into human-readable data. Instead of dealing with raw instruction data and account lists, you get structured information about:
What happened in the transaction (transfers, swaps, NFT activities)
Which accounts were involved
How much SOL or tokens were transferred
Timestamps and other metadata
Getting Started
Parse Individual Transactions
Parse one or more transaction signatures or raw transaction data with a single API call:
const parseTransaction = async () => {
const url = "https://api.helius.xyz/v0/transactions/?api-key=YOUR_API_KEY" ;
const response = await fetch ( url , {
method: 'POST' ,
headers: {
'Content-Type' : 'application/json' ,
},
body: JSON . stringify ({
transactions: [ "5rfFLBUp5YPr6rC2g1KBBW8LGZBcZ8Lvs7gKAdgrBjmQvFf6EKkgc5cpAQUTwGxDJbNqtLYkjV5vS5zVK4tb6JtP" ],
}),
});
const data = await response . json ();
console . log ( "Parsed transaction:" , data );
};
parseTransaction ();
const parseTransaction = async () => {
const url = "https://api.helius.xyz/v0/transactions/?api-key=YOUR_API_KEY" ;
const response = await fetch ( url , {
method: 'POST' ,
headers: {
'Content-Type' : 'application/json' ,
},
body: JSON . stringify ({
transactions: [ "5rfFLBUp5YPr6rC2g1KBBW8LGZBcZ8Lvs7gKAdgrBjmQvFf6EKkgc5cpAQUTwGxDJbNqtLYkjV5vS5zVK4tb6JtP" ],
}),
});
const data = await response . json ();
console . log ( "Parsed transaction:" , data );
};
parseTransaction ();
import requests
import json
def parse_transaction ():
url = "https://api.helius.xyz/v0/transactions/?api-key=YOUR_API_KEY"
payload = {
"transactions" : [ "5rfFLBUp5YPr6rC2g1KBBW8LGZBcZ8Lvs7gKAdgrBjmQvFf6EKkgc5cpAQUTwGxDJbNqtLYkjV5vS5zVK4tb6JtP" ]
}
response = requests.post(url, json = payload)
data = response.json()
print ( "Parsed transaction:" , data)
parse_transaction()
API Reference View detailed documentation for parsing transactions
Fetch Transaction History for an Address
Retrieve transaction history for any Solana address:
const fetchWalletTransactions = async () => {
const walletAddress = "M2mx93ekt1fmXSVkTrUL9xVFHkmME8HTUi5Cyc5aF7K" ; // Replace with target wallet
const url = `https://api.helius.xyz/v0/addresses/ ${ walletAddress } /transactions?api-key=YOUR_API_KEY` ;
const response = await fetch ( url );
const transactions = await response . json ();
console . log ( "Wallet transactions:" , transactions );
};
fetchWalletTransactions ();
const fetchWalletTransactions = async () => {
const walletAddress = "M2mx93ekt1fmXSVkTrUL9xVFHkmME8HTUi5Cyc5aF7K" ; // Replace with target wallet
const url = `https://api.helius.xyz/v0/addresses/ ${ walletAddress } /transactions?api-key=YOUR_API_KEY` ;
const response = await fetch ( url );
const transactions = await response . json ();
console . log ( "Wallet transactions:" , transactions );
};
fetchWalletTransactions ();
import requests
def fetch_wallet_transactions ():
wallet_address = "M2mx93ekt1fmXSVkTrUL9xVFHkmME8HTUi5Cyc5aF7K" # Replace with target wallet
url = f "https://api.helius.xyz/v0/addresses/ { wallet_address } /transactions?api-key=YOUR_API_KEY"
response = requests.get(url)
transactions = response.json()
print ( "Wallet transactions:" , transactions)
fetch_wallet_transactions()
API Reference View detailed documentation for transaction history
Handling Incomplete Transaction Sets
Occasionally, history endpoint may return an incomplete set of transactions due to internal timeouts during data retrieval.
To mitigate this issue:
First, call getSignaturesForAddress
to retrieve a batch of transaction signatures
Next, use the /v0/transactions
endpoint with the received signatures
If any transactions are missing from the response, you can retry fetching these specific transactions
Common Use Cases
For high-volume addresses, implement pagination to fetch all transactions:
const fetchAllTransactions = async () => {
const walletAddress = "2k5AXX4guW9XwRQ1AKCpAuUqgWDpQpwFfpVFh3hnm2Ha" ; // Replace with target wallet
const baseUrl = `https://api.helius.xyz/v0/addresses/ ${ walletAddress } /transactions?api-key=YOUR_API_KEY` ;
let url = baseUrl ;
let lastSignature = null ;
let allTransactions = [];
while ( true ) {
if ( lastSignature ) {
url = baseUrl + `&before= ${ lastSignature } ` ;
}
const response = await fetch ( url );
// Check response status
if ( ! response . ok ) {
console . error ( `API error: ${ response . status } ` );
break ;
}
const transactions = await response . json ();
if ( transactions && transactions . length > 0 ) {
console . log ( `Fetched batch of ${ transactions . length } transactions` );
allTransactions = [ ... allTransactions , ... transactions ];
lastSignature = transactions [ transactions . length - 1 ]. signature ;
} else {
console . log ( `Finished! Total transactions: ${ allTransactions . length } ` );
break ;
}
}
return allTransactions ;
};
Filter Transactions by Type
Get only specific transaction types, such as NFT sales:
NFT Sales Token Transfers Swaps const fetchNftSales = async () => {
const tokenAddress = "GjUG1BATg5V4bdAr1csKys1XK9fmrbntgb1iV7rAkn94" ; // NFT mint address
const url = `https://api.helius.xyz/v0/addresses/ ${ tokenAddress } /transactions?api-key=YOUR_API_KEY&type=NFT_SALE` ;
const response = await fetch ( url );
const nftSales = await response . json ();
console . log ( "NFT sale transactions:" , nftSales );
};
const fetchNftSales = async () => {
const tokenAddress = "GjUG1BATg5V4bdAr1csKys1XK9fmrbntgb1iV7rAkn94" ; // NFT mint address
const url = `https://api.helius.xyz/v0/addresses/ ${ tokenAddress } /transactions?api-key=YOUR_API_KEY&type=NFT_SALE` ;
const response = await fetch ( url );
const nftSales = await response . json ();
console . log ( "NFT sale transactions:" , nftSales );
};
const fetchTokenTransfers = async () => {
const walletAddress = "M2mx93ekt1fmXSVkTrUL9xVFHkmME8HTUi5Cyc5aF7K" ; // Wallet address
const url = `https://api.helius.xyz/v0/addresses/ ${ walletAddress } /transactions?api-key=YOUR_API_KEY&type=TRANSFER` ;
const response = await fetch ( url );
const transfers = await response . json ();
console . log ( "Transfer transactions:" , transfers );
};
const fetchSwapTransactions = async () => {
const walletAddress = "M2mx93ekt1fmXSVkTrUL9xVFHkmME8HTUi5Cyc5aF7K" ; // Wallet address
const url = `https://api.helius.xyz/v0/addresses/ ${ walletAddress } /transactions?api-key=YOUR_API_KEY&type=SWAP` ;
const response = await fetch ( url );
const swaps = await response . json ();
console . log ( "Swap transactions:" , swaps );
};
API Reference
Query Parameters
Parameter Description Default Example limit
Number of transactions to return 10 &limit=25
before
Fetch transactions before this signature - &before=sig123...
until
Fetch transactions until this signature - &until=sig456...
type
Filter by transaction type - &type=NFT_SALE
commitment
Commitment level finalized
&commitment=confirmed
Response Example
Enhanced transaction responses include structured data with human-readable descriptions:
{
"description" : "Transfer 0.1 SOL to FXvStt8aeQHMGKDgqaQ2HXWfJsXnqiKSoBEpHJahkuD" ,
"type" : "TRANSFER" ,
"source" : "SYSTEM_PROGRAM" ,
"fee" : 5000 ,
"feePayer" : "M2mx93ekt1fmXSVkTrUL9xVFHkmME8HTUi5Cyc5aF7K" ,
"signature" : "5rfFLBUp5YPr6rC2g1KBBW8LGZBcZ8Lvs7gKAdgrBjmQvFf6EKkgc5cpAQUTwGxDJbNqtLYkjV5vS5zVK4tb6JtP" ,
"slot" : 171341028 ,
"timestamp" : 1674080473 ,
"nativeTransfers" : [
{
"fromUserAccount" : "M2mx93ekt1fmXSVkTrUL9xVFHkmME8HTUi5Cyc5aF7K" ,
"toUserAccount" : "FXvStt8aeQHMGKDgqaQ2HXWfJsXnqiKSoBEpHJahkuD" ,
"amount" : 100000000
}
],
"events" : {
"sol" : {
"from" : "M2mx93ekt1fmXSVkTrUL9xVFHkmME8HTUi5Cyc5aF7K" ,
"to" : "FXvStt8aeQHMGKDgqaQ2HXWfJsXnqiKSoBEpHJahkuD" ,
"amount" : 0.1
}
}
}
Best Practices
Error Handling Implement proper error handling and retries for production applications
Rate Limiting Use pagination and caching strategies to avoid hitting rate limits
Error Handling
Always implement proper error handling in your code:
const fetchTransactions = async () => {
try {
const response = await fetch ( url );
if ( ! response . ok ) {
throw new Error ( `API error: ${ response . status } ` );
}
const data = await response . json ();
return data ;
} catch ( error ) {
console . error ( "Failed to fetch transactions:" , error );
// Implement retry logic or user-friendly error messages
}
};
Rate Limiting Considerations
To avoid hitting rate limits when working with the API:
Implement pagination for large datasets
Cache responses when appropriate
Add exponential backoff for retries
Consider upgrading your API plan for high-volume applications
For high-traffic applications, consider implementing a caching layer with Redis or similar technology to minimize redundant API calls.
FAQs