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

115
Visualizações
how to properly console this shiba-inu price
async function getPrice () {
 //console.log("waiting");
const price = await  promise.all([axios.get('https://api.coingecko.com/api/v3/simple/price?ids=shiba-inu&vs_currencies=usd'),axios.get('https://api.coingecko.com/api/v3/simple/price?ids=dogecoin&vs_currencies=usd')]).then(results =>{
                 return results[0].data.shiba-inu.usd / results[1].data.dogecoin.usd;}).then(pricedata =>{
                 return pricedata;
    });         
  return price ;
};

the json file from : https://api.coingecko.com/api/v3/simple/price?ids=shiba-inu&vs_currencies=usd contains :

{
  "shiba-inu": {
    "usd": 0.00002847
  }
}

this is the error:

return results[0].data.shiba-inu.usd / results[1].data.dogecoin.usd;}).then(pricedata =>{

ReferenceError: inu is not defined.

I don't know how to properly get the shiba-inu price , I have tried to put it between () or ''. the code is runnig well my only problem is with this composed name(shiba-inu) if I try tether or something else it goes well (replacing api and results[0].data.tether.usd)

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