kencryptotools
v1.0.5
Published
1 - Create a ".env" file and fill with a variable API_KEY containing your coinmarketcap api key, as show in the example below:
Downloads
1
Readme
HOW TO USE:
1 - Create a ".env" file and fill with a variable API_KEY containing your coinmarketcap api key, as show in the example below:
API_KEY=xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx
If you dont have a key, you can get it from this link: https://coinmarketcap.com/api/
2 - Import the class: import Kencrypto from "Kencrypto";
3 - Instantiate the class const kencrypto = new Kencrypto();
4 - Call the methods with your arguments get last quotes: kencrypto.quotes(["btc"]).then((resp) => { console.log(resp) });
convert quotes: kencrypto.conversion("eth", 1, ["usd"]).then((resp) => console.log(resp));
note: change "btc", "eth" and "usd" with your desired coins.