Empresas
Empleos
  • Sobre nosotros
  • Soluciones
    • Publicación de vacantes
      Publica tu vacante y recibe candidatos calificados en 48h.
    • Evaluación de candidatos
      500+ pruebas técnicas y psicológicas, más anti-fraude.
    • Headhunting
      Búsqueda ejecutiva a la medida de principio a fin.
    • Nómina + EOR
      Dispersión de nómina y EOR en más de 15 países de LATAM.
  • Precios
  • Empleos

0

154
Vistas
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 la pregunta
Encuentra empleos remotos

¡Descubre la nueva forma de encontrar empleo!

Top de empleos
Top categorías de empleo
Empresas
Publicar vacante Precios Comercial
Legal
Términos y condiciones Política de privacidad
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Recomiéndame algunas ofertas
Necesito ayuda