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

238
Vistas
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 Respuestas
Responde la pregunta

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 Denunciar

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 Denunciar
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