My goals is to monitor each token's transactions (buys/sells) on Raydium, live.
For that I use "logsSubscribe" WS method that returns ray_logs
Example JSON 'ray_log' decoded:
{"name": "swapBaseIn","data": {"logType": 3,"amountIn": "21514983692","minimumOut": "0","direction": "1","userSource": "21514983692","poolCoin": "140696852628033375","poolPc": "21316786476678","outAmount": "141507531909869" }}
First way:Subscribe to Raydium's LiquidityPoolV4 program (main AMM that will be streaming every transaction that is happening on Raydium) and then filter & sort these transactions. Problem with this way is logs don't contain Mint address of a token being involved.
Example of single output from 'logsSubscribe' method:
Second way:Subscribe to each individual liquidity pool (pair) and monitor its logs. But say there are 2000+ pairs. Is it too many concurrent WS subscriptions opened OR might actually just be a scale problem?
Any help appreciated, thank yall!