Business
Jobs
  • About Us
  • Solutions
    • Job Postings
      Post your job and receive qualified candidates in 48h.
    • Candidate Assessments
      500+ technical and psychological tests, plus anti-fraud.
    • Headhunting
      Tailor-made executive search from start to finish.
    • Payroll + EOR
      Payroll dispersal and EOR across 15+ LATAM countries.
  • Pricing
  • Jobs

0

236
Views
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 answers
Answer question

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 Report

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 Report
Answer question
Find remote jobs

Discover the new way to find a job!

Top jobs
Top job categories
Business
Post vacancy Pricing Sales
Legal
Terms and conditions Privacy policy
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Show me some job opportunities
There's an error!