Links
🔌

Raw Transactions API

Blazing-fast, highly queryable historical Solana transactions.

v1/raw-transactions

Database does not contain data earlier than November 28, 2022 or older than 60 days.
Returns an array of raw transactions for the provided accounts. The query can be limited to specific time or slot ranges.
post
https://api.helius.xyz
/v1/raw-transactions
Returns an array of raw transactions for the given accounts.

Code Samples

Basic example
Advanced example with pagination
getAllTransactions.js
const url = 'https://api.helius.xyz/v1/raw-transactions?api-key=<your_key_here>';
// Query for transactions that happened in the last week for these two monkes.
// Leverages pagination to repeatedly call the API until we get all transactions.
const accounts = [
'BAAzgRGWY2v5AJBNZNFd2abiRXAUo56UxywKEjoCZW2',
'8s6kQUZfdm7GSaThAcsmSs56wMinXrbk6SdNVngutrz5'
];
const unixDay = 60 * 60 * 24;
const startTimeUnix = Math.floor(Date.now() / 1000) - 7 * unixDay;
const getAllTransactions = async () => {
const transactions = [];
let paginationToken;
while (true) {
const { data } = await axios.post(url, {
query: {
accounts: accounts,
startTime: startTimeUnix,
},
options: {
limit: 10,
paginationToken: paginationToken,
},
});
console.log(`Got batch of ${data.result.length} transactions!`);
transactions.push(...data.result);
if (data.paginationToken) {
paginationToken = data.paginationToken;
console.log(`Proceeding to next page with token ${paginationToken}.`);
} else {
console.log('Finished getting all transactions.');
break;
}
}
console.log(`Got ${transactions.length} transactions in total!`);
return transactions;
};
getAllTransactions();

v0/raw-transactions (deprecated)

Returns an array of raw (meaning the exact same format as returned by the Solana JSON-RPC specification) transactions. Takes in multiple transaction signatures and fetches them all in parallel.
post
https://api.helius.xyz
/v0/raw-transactions
Returns an array of raw (directly from RPC) transactions.