gauss314 / defi

Tools for use in DeFi. Impermanent Loss calculations, staking and farming strategies, coingecko and pancakeswap API queries, liquidity pools and more
MIT License
554 stars 143 forks source link

PancakeSwap Historical Data #6

Open whittlem opened 3 years ago

whittlem commented 3 years ago

I would like to retrieve the historical data for a liquidity pool on PancakeSwap. Is this possible using your defi package? If not would you mind giving me some pointers on how to do it? Is the best/easiest way to use Web3 to iterate through the smart contract event log and construct 5 minute candlesticks manually in Python?

gauss314 commented 3 years ago

Yes, its possible get a historial TVL by protocol, read documentation, function getProtocol()