Ad

Bitcoin To Dollar Conversion

- 1 answer

I am making a project to fetch data of cryptocurrencies using an API

https://min-api.cryptocompare.com/data/pricemultifull?fsyms=ETH&tsyms=USD

VOLUME24HOUR":373400.47865766; How to convert this into $

If I want to get let's say Market CAP

SO THE API return this ,"MKTCAP":"$ 90.90 B", what does B mean also they don't match Market Cap according to this website is $91,295,043,296

Question

How do I get the correct data ?

Ad

Answer

The API endpoint IS returning USD values, unless you specify a different currency. You're passing in USD to the URL in this chunk tsyms=USD

According to the API documentation (https://www.cryptocompare.com/api/#-api-data-price-), the tsyms parameter takes a currency (or crypto currency) shorthand and returns the values in that specified currency.

Ad
source: stackoverflow.com
Ad