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

228
Visualizações
Solana/Web3.js: Does @Solana/web3.js support the current price for Solana?

I am currently using the @Solana/web3.js framework and want to grab the current price for Solana in order to convert a user's balance to USD .etc.

about 4 years ago · Santiago Trujillo
2 Respostas
Responde à pergunta

0

The @solana/web3.js module currently concerns itself solely with interacting with native Solana programs as well as giving the tools to interact with the Solana blockchain via the RPC.

I recommend using CoinGecko's API to find the current USD value of SOL and other tokens.

about 4 years ago · Santiago Trujillo Relatório

0

Here is a client side example, notice the url params

ids=solana vs_currencies=usd

var url = "https://api.coingecko.com/api/v3/simple/price?ids=solana&vs_currencies=usd";

var xhr = new XMLHttpRequest();
xhr.open("GET", url);

xhr.setRequestHeader("accept", "application/json");

xhr.onreadystatechange = function() {
  if (xhr.readyState === 4) {
    console.log(xhr.status);
    console.log(xhr.responseText);
  }
};

xhr.send();

about 4 years ago · Santiago Trujillo Relatório
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