How to get transactions for a token on a dex

How can i get buys and sells from a token on a dex?
I know that buying a token with native balance is swapExactEthForTokens and selling would be swapExactTokensForEth but how can i get those events with moralis?

you can sync those events in a server
https://docs.moralis.io/moralis-server/automatic-transaction-sync/smart-contract-events

there isnt a better way to get them without using a server?

you can use a server, and after that you can connect to the server database directly to get that data

i dont want none of that, I just want to get them with a few lines of code without using 3rd party stuff

I don’t know a solution now for that

how are other people getting buys and sells without moralis?
buys and sells have been around forever