Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

coinkraal-api-interface

Package Overview
Dependencies
Maintainers
1
Versions
10
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

coinkraal-api-interface - npm Package Compare versions

Comparing version 0.2.7 to 0.2.8

31

interface/coin-market-cap.js

@@ -7,7 +7,34 @@

this.agent = agent;
this.apiRoot = 'https://api.coinmarketcap.com/v1';
this.apiRoot = 'https://api.coinmarketcap.com/v2';
}
getCoinTopList(start, limit) {
return this.agent.requests.get(`${this.apiRoot}/ticker/?start=${start}&limit=${limit}`);
return this.agent.requests.get(`${this.apiRoot}/ticker/?start=${start}&limit=${limit}`)
.then(data => {
let arr = [];
let coins = data.data;
for (let id in coins) {
if (coins.hasOwnProperty(id)) {
let c = coins[id];
let coin = {
rank: c.rank,
priceUsd: c.quotes.USD.price,
volumeUsd24h: c.quotes.USD.volume_24h,
marketCapUsd: c.quotes.USD.market_cap,
maxSupply: c.max_supply,
availableSupply: c.circulating_supply,
totalSupply: c.total_supply,
percentChange1h: c.quotes.USD.percent_change_1h,
percentChange24h: c.quotes.USD.percent_change_24h,
percentChange7d: c.quotes.USD.percent_change_7d
}
arr.push(coin);
}
}
return arr;
});
}

@@ -14,0 +41,0 @@

2

package.json
{
"name": "coinkraal-api-interface",
"version": "0.2.7",
"version": "0.2.8",
"description": "Api Interface for CoinKraal Applications",

@@ -5,0 +5,0 @@ "main": "index.js",

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc