i want to listen to transactions from pools like raydium or orca and get buy or sell amounts and holder address but im confused about the limitation of the rpc , i don't want to use paid rpc even if i buy one it still cannot handle that number of transaction im trying to monitor a big number of hot pairs here's my current code but its not efficient at all for me :
const { Connection, clusterApiUrl, PublicKey, LAMPORTS_PER_SOL } = require('@solana/web3.js')
const connection = new Connection('https://api.mainnet-beta.solana.com/', { commitment: 'confirmed' })
const transactionConnection = new Connection('https://api.mainnet-beta.solana.com/', { commitment: 'confirmed' })
const programId = new PublicKey('tokenprogramid')
async function fn2(signature){
const transaction = await transactionConnection.getParsedTransaction(signature, {commitment:'confirmed' , maxSupportedTransactionVersion:0})
if (!transaction ){return false}
// other code to parse amounts
}
connection.onProgramAccountChange(programId, async (logs) => {
fn2(logs.signature);
} , 'confirmed');