CoinGecko-API
CoinGecko-API copied to clipboard
Coin Images full color
Hello world!
Possibly it is not a problem, but a suggestion.
In the market data, you can pull the images of each coin from the data. But the images have been saved into a circle shape with a transparent background. Since you can create the circle shape in most applications with a "borderRadius" or similar, it is better to provide the images with a background color or white with a transparent background.
From my point of view, it would be better to save the coin icon as white on a transparent background or as SVG with another data field with the base color. Like Bitcoin: { image: "the image URL", coin_color: "##F79413" }. But it depends on what you guys aim for.
I pulled the data with the following code:
let coinDataSet = async () => {
let coinData = await CoinGeckoClient.coins.markets();
fs.writeFileSync("./assets/data/coinData.json", JSON.stringify(coinData));
};
what I got was:
{
"success": true,
"message": "OK",
"code": 200,
"data": [
{
"id": "bitcoin",
"symbol": "btc",
"name": "Bitcoin",
// this is the image i mean the other images in this dataset aew similar.
"image": "https://assets.coingecko.com/coins/images/1/large/bitcoin.png?1547033579",
// ---
"current_price": 47003,
"market_cap": 887157897642,
"market_cap_rank": 1,
"fully_diluted_valuation": 985473262230,
"total_volume": 22264401998,
"high_24h": 48126,
"low_24h": 46487,
"price_change_24h": 68.53,
"price_change_percentage_24h": 0.14602,
"market_cap_change_24h": -293282295.3970947,
"market_cap_change_percentage_24h": -0.03305,
"circulating_supply": 18904943,
"total_supply": 21000000,
"max_supply": 21000000,
"ath": 69045,
"ath_change_percentage": -31.94853,
"ath_date": "2021-11-10T14:24:11.849Z",
"atl": 67.81,
"atl_change_percentage": 69191.66172,
"atl_date": "2013-07-06T00:00:00.000Z",
"roi": null,
"last_updated": "2021-12-19T10:35:35.424Z"
},
{
"id": "ethereum",
"symbol": "eth",
"name": "Ethereum",