Closed paramkr2 closed 2 months ago
To clarify, I am looking for functionality that retrieves all available pool/pair addresses on a particular chain, such as Ethereum or BSC.
I can currently retrieve all pair addresses directly from the chain using the following code by:
const { ethers } = require("ethers");
const provider = new ethers.providers.JsonRpcProvider(");
const factory = new ethers.Contract("0x5C69bEe701ef814a2B6a3EDD4B1652CB9cc5aA6f", ["function allPairs(uint256) view returns (address)", "function allPairsLength() view returns (uint256)"], provider);
async function getAllPairs() {
const length = await factory.allPairsLength();
for (let i = 0; i < length; i++) console.log(await factory.allPairs(i));
}
However, I am interested in knowing if it is possible to achieve the same result using the Dexscreener API. Their API documentation does not mention a method for fetching all pair addresses in one request.
Thx.
If its not in their documentation then its not possible.
Is there any way to get all pair/pool Addresses listed on dexscreener. Thanks.