How to get all historical Uniswap/Pancakeswap trades for a given token

Viewed 550

For each token in a list of tokens, I want to (programatically) get a list of all historical trades of that token on Uniswap or Pancakeswap, with accompanying information such as block number, trade quantity, gas price, token reserves, etc... What is the best way to do this?

I checked out etherscan.io, but its web interface only allows users to export the most recent DEX trades, not all of them, and its API doesn't seem to be able to solve my problem.

0 Answers
Related