{"id":18285887,"url":"https://github.com/exodusmovement/cryptocompare","last_synced_at":"2025-04-04T15:08:38.944Z","repository":{"id":51292849,"uuid":"64634841","full_name":"ExodusMovement/cryptocompare","owner":"ExodusMovement","description":"CryptoCompare JavaScript API","archived":false,"fork":false,"pushed_at":"2023-05-11T14:56:18.000Z","size":52,"stargazers_count":247,"open_issues_count":5,"forks_count":79,"subscribers_count":48,"default_branch":"master","last_synced_at":"2025-03-28T14:06:30.277Z","etag":null,"topics":["bitcoin","btc","exchange","price-data"],"latest_commit_sha":null,"homepage":null,"language":"JavaScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/ExodusMovement.png","metadata":{"files":{"readme":"README.md","changelog":"CHANGELOG.md","contributing":null,"funding":null,"license":"LICENSE.md","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2016-08-01T04:03:57.000Z","updated_at":"2025-03-27T07:25:30.000Z","dependencies_parsed_at":"2024-06-18T13:50:41.552Z","dependency_job_id":"2b819992-f5c1-435e-8739-1b77fde88542","html_url":"https://github.com/ExodusMovement/cryptocompare","commit_stats":null,"previous_names":[],"tags_count":12,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ExodusMovement%2Fcryptocompare","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ExodusMovement%2Fcryptocompare/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ExodusMovement%2Fcryptocompare/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ExodusMovement%2Fcryptocompare/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/ExodusMovement","download_url":"https://codeload.github.com/ExodusMovement/cryptocompare/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":247198460,"owners_count":20900080,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["bitcoin","btc","exchange","price-data"],"created_at":"2024-11-05T13:18:04.567Z","updated_at":"2025-04-04T15:08:38.925Z","avatar_url":"https://github.com/ExodusMovement.png","language":"JavaScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"cryptocompare\n=============\n\n[![npm][npm-image]][npm-url]\n[![travis][travis-image]][travis-url]\n[![standard][standard-image]][standard-url]\n\n[npm-image]: https://img.shields.io/npm/v/cryptocompare.svg?style=flat-square\n[npm-url]: https://www.npmjs.com/package/cryptocompare\n[travis-image]: https://img.shields.io/travis/ExodusMovement/cryptocompare.svg?style=flat-square\n[travis-url]: https://travis-ci.org/ExodusMovement/cryptocompare\n[standard-image]: https://img.shields.io/badge/code%20style-standard-brightgreen.svg?style=flat-square\n[standard-url]: http://npm.im/standard\n\n[CryptoCompare](https://www.cryptocompare.com/) JavaScript API\n\nInstall\n-------\n\n    npm install --save cryptocompare\n\n\nUsage\n-----\n\n**Note:** cryptocompare depends on [`fetch()`](https://developer.mozilla.org/en-US/docs/Web/API/WindowOrWorkerGlobalScope/fetch) being defined globally.\n\n- If you are using this in electron, it should work without any configuration.\n- If you are using this in Node.js, you will need to use [`node-fetch`](https://www.npmjs.com/package/node-fetch).\n- The package works without an API key but the IP limits will slowly be reduced over time, to create an API key just go to https://www.cryptocompare.com/cryptopian/api-keys and make sure you give it the \"Read All Price Streaming and Polling Endpoints\" permission\n\n  **Example:**\n  ```js\n  global.fetch = require('node-fetch')\n  const cc = require('cryptocompare')\n  cc.setApiKey('\u003cyour-api-key\u003e')\n  ```\n\n### Methods\n\n### `coinList()`\n\nGet the current list of all cryptocurrencies and the following information about each coin.\n\n`coinList()`\n\n- `No parameters`\n- `Returns` (Object)...\n  - `BaseImageUrl` (String) The base url for all the images from the ImageUrl field (https://www.cryptocompare.com),\n  - `BaseLinkUrl` The base url for all the links from the Url field (https://www.cryptocompare.com)\n  - `Data` (Object) Contains the following infomration about each coin.\n    - `Id` (String)\n    - `Url` (String) Url to the CryptoCompare page for the coin. (Ex: `/coins/eth/overview`) Url must be appended to `https://www.cryptocompare.com`.\n    - `ImageUrl` (String) Url to get the coin logo image. (Ex: `/media/351001/404.png`). Url must be appended to `https://www.cryptocompare.com`.\n    - `Name` (String) Ticker name of the given cryptocurrency.\n    - `Symbol` (String) Ticker symbol of the given cryptocurrency (usually the same as the name).\n    - `CoinName` (String) Name of the given cryptocurrency.\n    - `FullName` (String) Name of the given cryptocurrency concatenated with the symbol (Ex: `Ethereum (ETH)`).\n    - `Algorithm` (String) Name cryptographic algorithm for that coin.\n    - `ProofType` (String) The proof type of the cryptocurrency.\n    - `ProofType` (String) The proof type of the cryptocurrency.\n    - `FullyPremined` (String) Returns \"1\" if the coin was premined, if not it returns \"0\".\n    - `TotalCoinSupply` (String) Total supply of the cryptocurrency.\n    - `PreMinedValue` (String) Value of premined coins.\n    - `TotalCoinsFreeFloat` (String)\n    - `SortOrder` (String) The order CryptoCompare ranks the coin inside their internal system.\n    - `Sponsored` (Boolean) Is `true` when the coin is sponsored by CryptoCompare, is `false` otherwise.\n\n```js\nconst cc = require('cryptocompare')\ncc.setApiKey('\u003cyour-api-key\u003e')\n\n// Usage:\ncc.coinList()\n.then(coinList =\u003e {\n  console.log(coinList)\n  // -\u003e\n  // {\n  //   BTC: {\n  //    Id: \"1182\",\n  //    Url: \"/coins/btc/overview\",\n  //    ImageUrl: \"/media/19633/btc.png\",\n  //    Name: \"BTC\",\n  //    Symbol: \"BTC\",\n  //    CoinName: \"Bitcoin\",\n  //    FullName: \"Bitcoin (BTC)\",\n  //    Algorithm: \"SHA256\",\n  //    ProofType: \"PoW\",\n  //    FullyPremined: \"0\",\n  //    TotalCoinSupply: \"21000000\",\n  //    PreMinedValue: \"N/A\",\n  //    TotalCoinsFreeFloat: \"N/A\",\n  //    SortOrder: \"1\",\n  //    Sponsored: false\n  // },\n  //   ETH: {...},\n  // }\n})\n.catch(console.error)\n```\n\n### `exchangeList()`\n\nReturns all the exchanges that CryptoCompare has integrated with.\n\n`exchangeList()`\n\n- `No parameters`\n- `Returns` (Object)\n\n```js\nconst cc = require('cryptocompare')\ncc.setApiKey('\u003cyour-api-key\u003e')\n\n// Usage:\ncc.exchangeList()\n.then(exchangeList =\u003e {\n  console.log(exchangeList)\n  // {\n  //   \"Cryptsy\":\n  //   {\n  //     \"42\":[\"BTC\",\"XRP\"],\n  //     \"EMC2\":[\"BTC\",\"XRP\"],\n  //     \"POINTS\":[\"BTC\"],\n  //     \"VTC\":[\"BTC\",\"LTC\",\"XRP\"]\n  //     ...\n  //   }\n  //   ...\n  // }\n})\n.catch(console.error)\n```\n\n### `price()`\n\nGet the current price of any cryptocurrency in any other currency.\n\n`price(fsym, tsyms[, options])`\n\n- `fsym` (String) From Symbol\n- `tsyms` (Array of Strings | String) To Symbol(s)\n- `options` (Object)\n  - `tryConversion` (Boolean) By default, if the crypto does not trade directly into the toSymbol requested, BTC will be used for conversion. Set `tryConversion` to `false` to disable using BTC for conversion.\n  - `exchanges` (Array of Strings | Array) Exchanges to get price data from. By default, average data is used. (You can get a list of top exchanges for a given pair with `topExchanges()`.)\n\n```js\nconst cc = require('cryptocompare')\ncc.setApiKey('\u003cyour-api-key\u003e')\n\n// Basic Usage:\ncc.price('BTC', ['USD', 'EUR'])\n.then(prices =\u003e {\n  console.log(prices)\n  // -\u003e { USD: 1100.24, EUR: 1039.63 }\n})\n.catch(console.error)\n\n// Passing a single pair of currencies:\ncc.price('BTC', 'USD')\n.then(prices =\u003e {\n  console.log(prices)\n  // -\u003e { USD: 1100.24 }\n})\n.catch(console.error)\n```\n\n### `priceMulti()`\n\nWorks like `price()`, except it allows you to specify a matrix of From Symbols.\n\n`priceMulti(fsyms, tsyms[, options])`\n\n- `fsyms` (Array of Strings | String) From Symbol(s)\n- `tsyms` (Array of Strings | String) To Symbol(s)\n- `options` (Object)\n  - `tryConversion` (Boolean) By default, if the crypto does not trade directly into the toSymbol requested, BTC will be used for conversion. Set `tryConversion` to `false` to disable using BTC for conversion.\n  - `exchanges` (Array of Strings | Array) Exchanges to get price data from. By default, average data is used. (You can get a list of top exchanges for a given pair with `topExchanges()`.)\n\n```js\nconst cc = require('cryptocompare')\ncc.setApiKey('\u003cyour-api-key\u003e')\n\n// Basic Usage:\ncc.priceMulti(['BTC', 'ETH'], ['USD', 'EUR'])\n.then(prices =\u003e {\n  console.log(prices)\n  // -\u003e { BTC: { USD: 1114.63, EUR: 1055.82 },\n  //      ETH: { USD: 12.74, EUR: 12.06 } }\n})\n.catch(console.error)\n\n// Passing a single pair of currencies:\ncc.priceMulti('BTC', 'USD')\n.then(prices =\u003e {\n  console.log(prices)\n  // -\u003e { BTC: { USD: 1114.63 } }\n})\n.catch(console.error)\n```\n\n### `priceFull()`\n\nGet all the current trading info (price, vol, open, high, low, etc.) of any list of cryptocurrencies in any other currency.\n\n`priceFull(fsyms, tsyms[, options])`\n\n- `fsyms` (Array of Strings | String) From Symbol(s)\n- `tsyms` (Array of Strings | String) To Symbol(s)\n- `options` (Object)\n  - `tryConversion` (Boolean) By default, if the crypto does not trade directly into the toSymbol requested, BTC will be used for conversion. Set `tryConversion` to `false` to disable using BTC for conversion.\n  - `exchanges` (Array of Strings | Array) Exchanges to get price data from. By default, average data is used. (You can get a list of top exchanges for a given pair with `topExchanges()`.)\n\n```js\nconst cc = require('cryptocompare')\ncc.setApiKey('\u003cyour-api-key\u003e')\n\ncc.priceFull(['BTC', 'ETH'], ['USD', 'EUR'])\n.then(prices =\u003e {\n  console.log(prices)\n  // {\n  //   BTC: {\n  //     USD: {\n  //       TYPE: '5',\n  //       MARKET: 'CCCAGG',\n  //       FROMSYMBOL: 'BTC',\n  //       TOSYMBOL: 'USD',\n  //       FLAGS: '4',\n  //       PRICE: 1152.42,\n  //       LASTUPDATE: 1487865689,\n  //       LASTVOLUME: 0.21,\n  //       LASTVOLUMETO: 242.20349999999996,\n  //       LASTTRADEID: 1224703,\n  //       VOLUME24HOUR: 53435.45299122338,\n  //       VOLUME24HOURTO: 60671593.843186244,\n  //       OPEN24HOUR: 1119.31,\n  //       HIGH24HOUR: 1170,\n  //       LOW24HOUR: 1086.641,\n  //       LASTMARKET: 'itBit',\n  //       CHANGE24HOUR: 33.11000000000013,\n  //       CHANGEPCT24HOUR: 2.958072383879366,\n  //       SUPPLY: 16177825,\n  //       MKTCAP: 18643649086.5\n  //     },\n  //     EUR: ...\n  //   },\n  //   ETH: ...\n  // }\n})\n.catch(console.error)\n```\n\n### `priceHistorical()`\n\nGet the price of any cryptocurrency in any other currency at a given timestamp. The price comes from the daily info - so it would be the price at the end of the day GMT based on the requested timestamp.\n\n`priceHistorical(fsym, tsyms, time[, options])`\n\n- `fsym` (String) From Symbol\n- `tsyms` (Array of Strings | String) To Symbol(s)\n- `time` (Date) Date in history that you want price data for\n- `options` (Object)\n  - `tryConversion` (Boolean) By default, if the crypto does not trade directly into the toSymbol requested, BTC will be used for conversion. Set `tryConversion` to `false` to disable using BTC for conversion.\n  - `exchanges` (Array of Strings | Array) Exchanges to get price data from. By default, average data is used. (You can get a list of top exchanges for a given pair with `topExchanges()`.)\n\n```js\nconst cc = require('cryptocompare')\ncc.setApiKey('\u003cyour-api-key\u003e')\n\n// Basic Usage:\ncc.priceHistorical('BTC', ['USD', 'EUR'], new Date('2017-01-01'))\n.then(prices =\u003e {\n  console.log(prices)\n  // -\u003e { BTC: { USD: 997, EUR: 948.17 } }\n})\n.catch(console.error)\n```\n\n### `generateAvg()`\n\nCompute the current trading info (price, vol, open, high, low etc) of the requested pair as a volume weighted average based on the markets requested.\n\n`generateAvg(fsym, tsym, markets[, tryConversion])`\n\n- `fsym` (String) From Symbol\n- `tsym` (String) To Symbol\n- `markets` (Array) Array of markets to base the average on. (You can get a list of top exchanges for a given pair with `topExchanges()`.)\n- `tryConversion` (Boolean) By default, if the crypto does not trade directly into the toSymbol requested, BTC will be used for conversion. Set `tryConversion` to `false` to disable using BTC for conversion.\n\n```js\nconst cc = require('cryptocompare')\ncc.setApiKey('\u003cyour-api-key\u003e')\n\n// Basic Usage:\ncc.generateAvg('BTC', 'USD', ['Coinbase', 'Kraken', 'Bitstamp', 'Bitfinex'])\n.then(data =\u003e {\n  console.log(data)\n  // -\u003e { MARKET: 'CUSTOMAGG',\n  //      FROMSYMBOL: 'BTC',\n  //      TOSYMBOL: 'USD',\n  //      FLAGS: '2',\n  //      PRICE: 1155.61,\n  //      LASTUPDATE: 1488059738,\n  //      LASTVOLUME: 0.25546663,\n  //      LASTVOLUMETO: 294.93622433499996,\n  //      LASTTRADEID: 26533969,\n  //      VOLUME24HOUR: 27318.892083369985,\n  //      VOLUME24HOURTO: 31652183.38370657,\n  //      OPEN24HOUR: 1177.16,\n  //      HIGH24HOUR: 1189.9,\n  //      LOW24HOUR: 1110,\n  //      LASTMARKET: 'Bitfinex',\n  //      CHANGE24HOUR: -21.550000000000182,\n  //      CHANGEPCT24HOUR: -1.830677223147251 }\n})\n.catch(console.error)\n```\n\n### `topPairs()`\n\nGet top pairs by volume for a currency.\n\n`topPairs(fsym[, limit])`\n\n- `fsym` (String) From Symbol\n- `limit` (Number) Limit the number of pairs you receive (default 5).\n\n```js\nconst cc = require('cryptocompare')\ncc.setApiKey('\u003cyour-api-key\u003e')\n\ncc.topPairs('BTC', 2)\n.then(pairs =\u003e {\n  console.log(pairs)\n  // -\u003e [ { exchange: 'CCCAGG',\n  //        fromSymbol: 'BTC',\n  //        toSymbol: 'JPY',\n  //        volume24h: 235602.43493487104,\n  //        volume24hTo: 31888554862.766888 },\n  //      { exchange: 'CCCAGG',\n  //        fromSymbol: 'BTC',\n  //        toSymbol: 'USD',\n  //        volume24h: 124504.4477389583,\n  //        volume24hTo: 145514032.93780443 } ]\n})\n.catch(console.error)\n```\n\n### `topExchanges()`\n\nGet top exchanges by volume for a currency pair.\n\n`topExchanges(fsym, tsym[, limit])`\n\n- `fsym` (String) From Symbol\n- `tsym` (String) To Symbol\n- `limit` (Number) Limit the number of exchanges you receive (default 5).\n\n```js\nconst cc = require('cryptocompare')\ncc.setApiKey('\u003cyour-api-key\u003e')\n\ncc.topExchanges('BTC', 'USD', 2)\n.then(exchanges =\u003e {\n  console.log(exchanges)\n  // -\u003e [ { exchange: 'Bitfinex',\n  //        fromSymbol: 'BTC',\n  //        toSymbol: 'USD',\n  //        volume24h: 35239.36701090003,\n  //        volume24hTo: 41472258.85534388 },\n  //      { exchange: 'Bitstamp',\n  //        fromSymbol: 'BTC',\n  //        toSymbol: 'USD',\n  //        volume24h: 19658.748675010014,\n  //        volume24hTo: 23047071.74260772 } ]\n})\n.catch(console.error)\n```\n\n### `topExchangesFull()`\n\nGet full data on top exchanges by volume for a currency pair.\n\n`topExchangesFull(fsym, tsym[, limit])`\n\n- `fsym` (String) From Symbol\n- `tsym` (String) To Symbol\n- `limit` (Number) Limit the number of exchanges you receive (default 5).\n\n### `histoDay()`\n\nGet open, high, low, close, volumefrom and volumeto from the daily historical data. The values are based on 00:00 GMT time.\n\n`histoDay(fsym, tsym[, options])`\n\n- `fsym` (String) From Symbol\n- `tsym` (String) To Symbol\n- `options` (Object)\n  - `aggregate` (Number) Number of data points to aggregate.\n  - `aggregatePredictableTimePeriods` (Boolean) Generate predictable time periods.\n  - `allData` (Boolean) Returns all data.\n  - `toTs` (Number) Last unix timestamp to return data for.\n  - `limit` (Number | `'none'`) Limit the number of days to lookup. Default is 30. If you set it to the string `'none'`, you will get all available data.\n  - `tryConversion` (Boolean) By default, if the crypto does not trade directly into the toSymbol requested, BTC will be used for conversion. Set `tryConversion` to `false` to disable using BTC for conversion.\n  - `timestamp` (Date) By default, `histoDay()` gets historical data for the past several days. Use the `timestamp` option to set a historical start point.\n  - `exchange` (String) Exchange to get history data from. By default, average data is used. (You can get a list of top exchanges for a given pair with `topExchanges()`.)\n\n```js\ncc.histoDay('BTC', 'USD')\n.then(data =\u003e {\n  console.log(data)\n  // -\u003e [ { time: 1485388800,\n  //        close: 915.65,\n  //        high: 917.71,\n  //        low: 893.81,\n  //        open: 893.97,\n  //        volumefrom: 35494.93,\n  //        volumeto: 32333344.2 },\n  //        ... ]\n})\n.catch(console.error)\n```\n\n### `histoHour()`\n\nGet open, high, low, close, volumefrom and volumeto from the hourly historical data.\n\n`histoHour(fsym, tsym[, options])`\n\n- `fsym` (String) From Symbol\n- `tsym` (String) To Symbol\n- `options` (Object)\n  - `aggregate` (Number) Number of data points to aggregate.\n  - `aggregatePredictableTimePeriods` (Boolean) Generate predictable time periods.\n  - `toTs` (Number) Last unix timestamp to return data for\n  - `limit` (Number) Limit the number of hours to lookup. Default is 168.\n  - `tryConversion` (Boolean) By default, if the crypto does not trade directly into the toSymbol requested, BTC will be used for conversion. Set `tryConversion` to `false` to disable using BTC for conversion.\n  - `timestamp` (Date) By default, `histoHour()` gets historical data for the past several hours. Use the `timestamp` option to set a historical start point.\n  - `exchange` (String) Exchange to get history data from. By default, average data is used. (You can get a list of top exchanges for a given pair with `topExchanges()`.)\n\n```js\ncc.histoHour('BTC', 'USD')\n.then(data =\u003e {\n  console.log(data)\n  // -\u003e [ { time: 1487448000,\n  //        close: 1060.34,\n  //        high: 1061.44,\n  //        low: 1058.85,\n  //        open: 1059.24,\n  //        volumefrom: 739.6,\n  //        volumeto: 790019.22 },\n  //        ... ]\n})\n.catch(console.error)\n```\n\n### `histoMinute()`\n\nGet open, high, low, close, volumefrom and volumeto from the minute-by-minute historical data.\n\n`histoMinute(fsym, tsym[, options])`\n\n- `fsym` (String) From Symbol\n- `tsym` (String) To Symbol\n- `options` (Object)\n  - `aggregate` (Number) Number of data points to aggregate.\n  - `aggregatePredictableTimePeriods` (Boolean) Generate predictable time periods.\n  - `toTs` (Number) Last unix timestamp to return data for\n  - `limit` (Number) Limit the number of minutes to lookup. Default is 1440.\n  - `tryConversion` (Boolean) By default, if the crypto does not trade directly into the toSymbol requested, BTC will be used for conversion. Set `tryConversion` to `false` to disable using BTC for conversion.\n  - `timestamp` (Date) By default, `histoMinute()` gets historical data for the past several minutes. Use the `timestamp` option to set a historical start point.\n  - `exchange` (String) Exchange to get history data from. By default, average data is used. (You can get a list of top exchanges for a given pair with `topExchanges()`.)\n\n```js\ncc.histoMinute('BTC', 'USD')\n.then(data =\u003e {\n  console.log(data)\n  // -\u003e [ { time: 1487970960,\n  //        close: 1171.97,\n  //        high: 1172.72,\n  //        low: 1171.97,\n  //        open: 1172.37,\n  //        volumefrom: 25.06,\n  //        volumeto: 29324.12 },\n  //        ... ]\n})\n.catch(console.error)\n```\n\n### `newsList()`\n\nReturns news articles from the providers that CryptoCompare has integrated with.\n\n`newsList(lang[, options])`\n\n- `lang` (String) Preferred language - English (EN) or Portuguese (PT)\n- `options` (Object)\n  - `feeds` (Array of Strings | Array) Specific news feeds to retrieve news from, if empty, defaults to all of them. (You can get a list of news feeds with `newsFeedsAndCategories().Feeds`..)\n  - `categories` (Array of Strings | Array) Category of news articles to return, if empty, defaults to all of them. (You can get a list of news categories with `newsFeedsAndCategories().Categories`..)\n  - `excludeCategories` (Array of Strings | Array) News article categories to exclude from results, if empty, defaults to none. (You can get a list of news categories with `newsFeedsAndCategories().Categories`..)\n  - `lTs` (Date) Returns news before that timestamp\n\n```js\nconst cc = require('cryptocompare')\ncc.setApiKey('\u003cyour-api-key\u003e')\n\n// Basic Usage:\ncc.newsList('EN')\n.then(newsList =\u003e {\n  console.log(newsList)\n  //[ \n  //  {\n  //    id:  \"708235\"\n  //    guid: \"https://www.cryptoglobe.com/latest/2018/11/china-cryptocurrency-mining-machines-are-reportedly-being-sold-according-to-their-weight/\"\n  //    published_on: 1542886256\n  //    imageurl: \"https://images.cryptocompare.com/news/cryptoglobe/fwMg0080000.jpeg\"\n  //    title: \"China: Cryptocurrency Mining Machines Reportedly Being Sold According to Their Weight\"\n  //    url: \"https://www.cryptoglobe.com/latest/2018/11/china-cryptocurrency-mining-machines-are-reportedly-being-sold-according-to-their-weight/\"\n  //    source:  \"cryptoglobe\"\n  //    body: \"Cryptocurrency mining machines are reportedly being sold in China according to their weight as miners who haven’t been able to make a profit are seemingly getting rid of their old models to get some of their investment back.\"\n  //    tags:  \"\"\n  //    categories:  \"Mining|Asia|Business\"\n  //    upvotes:  \"0\"\n  //    downvotes:  \"0\"\n  //    lang:  \"EN\"\n  //    source_info: {\n  //      name:  \"CryptoGlobe\"\n  //      lang:  \"EN\"\n  //      img: \"https://images.cryptocompare.com/news/default/cryptoglobe.png\"\n  //    }\n  //  }\n  //  ....\n  //]\n})\n.catch(console.error)\n```\n\n### `newsFeedsAndCategories()`\n\nReturns all the news feeds (providers) that CryptoCompare has integrated with and the full list of categories.\n\n`newsFeedsAndCategories()`\n\n- `No parameters`\n- `Returns` (Object)\n\n```js\nconst cc = require('cryptocompare')\ncc.setApiKey('\u003cyour-api-key\u003e')\n\n// Usage:\ncc.exchangeList()\n.then(newsFeedsAndCategories =\u003e {\n  console.log(newsFeedsAndCategories)\n  // {\n  //   \"Categories\":\n  //   [\n  //      {\n  //        categoryName:  \"BTC\"\n  //        wordsAssociatedWithCategory: [\"BTC\",\"BITCOIN\", \"SATOSHI\"]\n  //      }\n  //     ...\n  //   ]\n  //  \"Feeds\":\n  //  [\n  //    {\n  //      key:  \"cryptocompare\"\n  //      name:  \"CryptoCompare\"\n  //      lang:  \"EN\"\n  //      img: \"https://images.cryptocompare.com/news/default/cryptocompare.png\"\n  //    }\n  //    ...\n  //  ]\n  // }\n})\n.catch(console.error)\n```\n\n### `constituentExchangeList()`\n\nReturns all the constituent exchanges in the request instrument.\n\n`constituentExchangeList([options])`\n\n- `options` (Object)\n  - `instrument` (String) The type of average instrument.\n- `Returns` (Object)\n\n```js\nconst cc = require('cryptocompare')\ncc.setApiKey('\u003cyour-api-key\u003e')\n\n// Usage:\ncc.constituentExchangeList()\n.then(exchanges =\u003e {\n  console.log(exchanges)\n  // {\n  //   \"ABCC\": {\n  //     \"includeAll\": false,\n  //     \"onlyPairs\": {\n  //       \"CNN~BTC\": true,\n  //       \"TNS~BTC\": true,\n  //       \"TTU~USDT\": true,\n  //       \"XMX~BTC\": true,\n  //       \"GUSD~USDT\": true\n  //     }\n  //   },\n  //   \"ACX\": {\n  //     \"includeAll\": true,\n  //     \"onlyPairs\": {}\n  //   },\n  //   ...\n  // }\n})\n.catch(console.error)\n```\n\n### `latestSocial()`\n\nReturns latest social stats data for the coin requested.\n\n_Note_: **Requires a valid API key.**\n\n`latestSocial([options])`\n\n- `options` (Object)\n  - `coinId` (Number) The id of the coin.\n- `Returns` (Object)\n\n```js\nconst cc = require('cryptocompare')\ncc.setApiKey('\u003cyour-api-key\u003e')\n\n// Usage:\ncc.latestSocial()\n.then(social =\u003e {\n  console.log(social)\n  // {\n  //   \"General\": {\n  //     \"Points\": 7431355,\n  //     \"Name\": \"BTC\",\n  //     \"CoinName\": \"Bitcoin\",\n  //     \"Type\": \"Webpagecoinp\"\n  //   },\n  //   \"CryptoCompare\": {\n  //     ...\n  //   },\n  //   \"Twitter\": {\n  //     ...\n  //   },\n  //   \"Reddit\": {\n  //     ...\n  //   },\n  //   \"Facebook\": {\n  //     ...\n  //   },\n  //   \"CodeRepository\": {\n  //     ...\n  //   }\n  // }\n})\n.catch(console.error)\n```\n\n### `histoSocial()`\n\nReturns social stats data for the coin requested.\n\n_Note_: **Requires a valid API key.**\n\n`histoSocial(timePeriod[, options])`\n\n- `timePeriod` (String) Time period - 'day' or 'hour'\n- `options` (Object)\n  - `coinId` (Number) The id of the coin.\n  - `aggregate` (Number) Time period to aggregate the data over.\n  - `aggregatePredictableTimePeriods` (Boolean) Only used if `aggregate` param included. If false, then it will create time slots based on when the call is made.\n  - `limit` (Number) Number of data points to return.\n  - `toTs` (Number) Last unix timestamp to return data for\n- `Returns` (Array of Objects)\n\n```js\nconst cc = require('cryptocompare')\ncc.setApiKey('\u003cyour-api-key\u003e')\n\n// Usage:\ncc.histoSocial('hour')\n.then(socialStats =\u003e {\n  console.log(socialStats)\n  // [\n  //   {\n  //     \"time\": 1548640800,\n  //     \"comments\": 229133,\n  //     \"posts\": 89997,\n  //     \"followers\": 64128,\n  //     \"points\": 6144455,\n  //     \"overview_page_views\": 22335644,\n  //     \"analysis_page_views\": 955496,\n  //     \"markets_page_views\": 1402190,\n  //     \"charts_page_views\": 7527086,\n  //     \"trades_page_views\": 673204,\n  //     \"forum_page_views\": 6585840,\n  //     \"influence_page_views\": 55903,\n  //     \"total_page_views\": 39535363,\n  //     \"fb_likes\": 40054,\n  //     \"fb_talking_about\": 92,\n  //     \"twitter_followers\": 844049,\n  //     \"twitter_following\": 165,\n  //     \"twitter_lists\": 6631,\n  //     \"twitter_favourites\": 1000,\n  //     \"twitter_statuses\": 20316,\n  //     \"reddit_subscribers\": 1013891,\n  //     \"reddit_active_users\": 4365,\n  //     \"reddit_posts_per_hour\": 3.77,\n  //     \"reddit_posts_per_day\": 90.46,\n  //     \"reddit_comments_per_hour\": 68.39,\n  //     \"reddit_comments_per_day\": 1641.34,\n  //     \"code_repo_stars\": 44353,\n  //     \"code_repo_forks\": 25367,\n  //     \"code_repo_subscribers\": 4179,\n  //     \"code_repo_open_pull_issues\": 330,\n  //     \"code_repo_closed_pull_issues\": 11847,\n  //     \"code_repo_open_issues\": 903,\n  //     \"code_repo_closed_issues\": 5187\n  //   }\n  // ]\n})\n.catch(console.error)\n```\n\n## License\n\n[MIT](LICENSE.md)\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fexodusmovement%2Fcryptocompare","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fexodusmovement%2Fcryptocompare","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fexodusmovement%2Fcryptocompare/lists"}