I want to query the transaction numbers of the liquidity pools of PancakeSwap and so that decide which 10000 of them are the most active ones (there are 1.2M). How can I do this using Ethers.js or anything else?

1 Answer 1


You can get the 1k pairs with this function:

const getAllPairs = async () => {
    try {
        let pairs = []
        for(let i = 0; i < 10; i++){
            const result = await factory.allPairs(i)
    } catch (error) {

And order by totalSupply()

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.