CoinGecko-API icon indicating copy to clipboard operation
CoinGecko-API copied to clipboard

Nodejs Not working.

Open colo13verdadeo opened this issue 4 years ago • 1 comments

I need extract Bitcoin value in nodejs! That no reply with any code;

var func = async() => { let data = await CoinGeckoClient.ping(); let data2 = CoinGeckoClient.coins.fetchTickers('bitcoin') };

function expvu(message){ var func = async() => { console.log(CoinGeckoClient.coins.fetchTickers('bitcoin')); let data = await CoinGeckoClient.coins.fetch('bitcoin', {}); console.log(data2); message.reply(data2); console.log("Test");

};}

colo13verdadeo avatar Sep 07 '21 03:09 colo13verdadeo

I need extract Bitcoin value in nodejs! That no reply with any code;

var func = async() => { let data = await CoinGeckoClient.ping(); let data2 = CoinGeckoClient.coins.fetchTickers('bitcoin') };

function expvu(message){ var func = async() => { console.log(CoinGeckoClient.coins.fetchTickers('bitcoin')); let data = await CoinGeckoClient.coins.fetch('bitcoin', {}); console.log(data2); message.reply(data2); console.log("Test");

};}

hi, by the way I made a call to retrieve the complete data then I put a loop to look for the value of a specific crypto, you can see my source code here https://github.com/toutpuissantged/cryptoMonsterHot

import CoinGecko from 'coingecko-api'; const CoinGeckoClient = new CoinGecko();

const gekoFetch = async() => { let data = await CoinGeckoClient.coins.all(); return data }

export default gekoFetch

toutpuissantged avatar Sep 20 '21 16:09 toutpuissantged