Empresas
Empregos
  • Sobre nós
  • Soluções
    • Publicação de vagas
      Publique sua vaga e receba candidatos qualificados em 48h.
    • Avaliações de candidatos
      Mais de 500 testes técnicos e psicológicos, mais anti-fraude.
    • Headhunting
      Busca executiva personalizada do início ao fim.
    • Folha de Pagamento + EOR
      Dispersão de folha e EOR em mais de 15 países da LATAM.
  • Preços
  • Empregos

0

159
Visualizações
how to track a tokens liquidity

I'm trying to build a single module to get the token's details however I get all the required data but do not get liquidity in the pool.

const ADDRESS = "0x26193c7fa4354ae49ec53ea2cebc513dc39a10aa";
async function run() {
const contract = new web3.eth.Contract(ABI, ADDRESS);
const name = await contract.methods.name().call();
console.log("name:", name);
const symbol = await contract.methods.symbol().call();
console.log("symbol:", symbol);
const decimals = await contract.methods.decimals().call();
console.log("decimals:", decimals);
const totalSupply = await contract.methods.totalSupply().call();
console.log("totalSupply:", totalSupply);

(async () => {
    const tokenAddres = ADDRESS; // change this with the token addres that you want to know the 
    let bnbPrice = await calcBNBPrice() // query pancakeswap to get the price of BNB in USDT
    console.log(`CURRENT BNB PRICE: ${bnbPrice}`);
    // Them amount of tokens to sell. adjust this value based on you need, you can encounter errors with high supply tokens when this value is 1.


    let tokens_to_sell = 1;
    let priceInBnb = await calcSell(tokens_to_sell, tokenAddres) / tokens_to_sell; 
    // calculate TOKEN price in BNB
    console.log('IN BNB : ' + priceInBnb + ' | Just convert it to USD ');
    console.log(`IN USD: ${priceInBnb * bnbPrice}`); 
    [![enter image description here][1]][1]// convert the token price from BNB to USD based on the retrieved BNB value
})();

run();
about 4 years ago · Juan Pablo Isaza
Responde à pergunta
Encontrar trabalhos remotos

Descubra a nova forma de encontrar um emprego!

melhores empregos
Principais categorias de trabalho
Empresas
Postar vaga Preços Comercial
Jurídico
Termos e Condições Política de privacidade
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Recomende algumas ofertas para mim
Preciso de ajuda