{"id":13829120,"url":"https://github.com/alexanderdavidpan/cryptocompare","last_synced_at":"2025-07-09T09:32:48.390Z","repository":{"id":38804721,"uuid":"95276995","full_name":"alexanderdavidpan/cryptocompare","owner":"alexanderdavidpan","description":"💸 A Ruby gem for finding cryptocurrency prices by using the CryptoCompare API.","archived":false,"fork":false,"pushed_at":"2021-11-25T08:29:36.000Z","size":508,"stargazers_count":77,"open_issues_count":2,"forks_count":16,"subscribers_count":7,"default_branch":"master","last_synced_at":"2024-11-15T09:55:19.955Z","etag":null,"topics":["bitcoin","cryptocompare","cryptocurrency","ethereum","litecoin","ruby"],"latest_commit_sha":null,"homepage":"https://rubygems.org/gems/cryptocompare","language":"Ruby","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/alexanderdavidpan.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE.txt","code_of_conduct":"CODE_OF_CONDUCT.md","threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2017-06-24T05:06:36.000Z","updated_at":"2024-06-27T19:31:23.000Z","dependencies_parsed_at":"2022-09-12T01:11:26.793Z","dependency_job_id":null,"html_url":"https://github.com/alexanderdavidpan/cryptocompare","commit_stats":null,"previous_names":[],"tags_count":17,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/alexanderdavidpan%2Fcryptocompare","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/alexanderdavidpan%2Fcryptocompare/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/alexanderdavidpan%2Fcryptocompare/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/alexanderdavidpan%2Fcryptocompare/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/alexanderdavidpan","download_url":"https://codeload.github.com/alexanderdavidpan/cryptocompare/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":225533010,"owners_count":17484179,"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","cryptocompare","cryptocurrency","ethereum","litecoin","ruby"],"created_at":"2024-08-04T10:00:19.982Z","updated_at":"2024-11-20T10:30:28.726Z","avatar_url":"https://github.com/alexanderdavidpan.png","language":"Ruby","readme":"# cryptocompare\n\n[![Gem Version](https://badge.fury.io/rb/cryptocompare.svg)](http://badge.fury.io/rb/cryptocompare) [![CircleCI](https://circleci.com/gh/alexanderdavidpan/cryptocompare.svg?style=shield)](https://circleci.com/gh/alexanderdavidpan/cryptocompare)\n[![Test Coverage](https://codeclimate.com/github/alexanderdavidpan/cryptocompare/badges/coverage.svg)](https://codeclimate.com/github/alexanderdavidpan/cryptocompare/coverage)\n\nThis is a Ruby gem that utilizes the CryptoCompare API to fetch data related to cryptocurrencies.\n\n## Installation\n\nAdd this line to your application's Gemfile:\n\n```ruby\ngem 'cryptocompare'\n```\n\nAnd then execute:\n\n    $ bundle\n\nOr install it yourself as:\n\n    $ gem install cryptocompare\n\n## Usage\n\nTo use cryptocompare, just require it like so:\n\n```ruby\nrequire 'cryptocompare'\n```\n\n### API Keys\n\nSome requests will require an API key. In order to obtain an API key, you will need to request one from Cryptocompare. You can then pass it in as an optional parameter in the any Cryptocompare module method like so:\n\n```ruby\nCryptocompare::Price.find('ETH', 'USD', { api_key: 'API_KEY' })\n# =\u003e {\"ETH\"=\u003e{\"USD\"=\u003e4714.16}}\n```\n\n### Price\n\nFinds the currency price(s) of a given currency symbol. Really fast, 20-60 ms. Cached each 10 seconds.\n\n**Examples:**\n\nConvert cryptocurrency to fiat.\n\n```ruby\nCryptocompare::Price.find('BTC', 'USD')\n# =\u003e {\"BTC\"=\u003e{\"USD\"=\u003e2594.07}}\n```\n\nConvert fiat to cryptocurrency.\n\n```ruby\nCryptocompare::Price.find('USD', 'BTC')\n# =\u003e {\"USD\"=\u003e{\"BTC\"=\u003e0.0004176}}\n```\n\nConvert cryptocurrency to cryptocurrency.\n\n```ruby\nCryptocompare::Price.find('BTC', 'ETH')\n# =\u003e {\"BTC\"=\u003e{\"ETH\"=\u003e9.29}}\n```\n\nConvert fiat to fiat.\n\n```ruby\nCryptocompare::Price.find('USD', 'EUR')\n# =\u003e {\"USD\"=\u003e{\"EUR\"=\u003e0.8772}}\n```\n\nConvert multiple cryptocurrencies to multiple fiat.\n\n```ruby\nCryptocompare::Price.find(['BTC','ETH', 'LTC'], ['USD', 'EUR', 'CNY'])\n# =\u003e {\"BTC\"=\u003e{\"USD\"=\u003e2501.61, \"EUR\"=\u003e2197.04, \"CNY\"=\u003e17329.48}, \"ETH\"=\u003e{\"USD\"=\u003e236.59, \"EUR\"=\u003e209.39, \"CNY\"=\u003e1655.15}, \"LTC\"=\u003e{\"USD\"=\u003e45.74, \"EUR\"=\u003e40.33, \"CNY\"=\u003e310.5}}\n```\n\nConvert multiple fiat to multiple cryptocurrencies.\n\n```ruby\nCryptocompare::Price.find(['USD', 'EUR'], ['BTC','ETH', 'LTC'])\n# =\u003e {\"USD\"=\u003e{\"BTC\"=\u003e0.0003996, \"ETH\"=\u003e0.004238, \"LTC\"=\u003e0.02184}, \"EUR\"=\u003e{\"BTC\"=\u003e0.0004548, \"ETH\"=\u003e0.00477, \"LTC\"=\u003e0.0248}}\n```\n\nConvert prices based on exchange.\n\n```ruby\nCryptocompare::Price.find('DASH', 'USD', {'e' =\u003e 'Kraken'})\n# =\u003e {\"DASH\"=\u003e{\"USD\"=\u003e152.4}}\n```\n\nGet full price info (raw and display) for cryptocurrency to fiat currency.\n```ruby\nCryptocompare::Price.full('BTC', 'USD')\n# =\u003e {\n#   \"RAW\" =\u003e {\n#     \"BTC\" =\u003e {\n#       \"USD\" =\u003e {\n#         \"TYPE\"=\u003e\"5\",\n#         \"MARKET\"=\u003e\"CCCAGG\",\n#         \"FROMSYMBOL\"=\u003e\"BTC\",\n#         \"TOSYMBOL\"=\u003e\"USD\",\n#         \"FLAGS\"=\u003e\"4\",\n#         \"PRICE\"=\u003e4551.84,\n#         \"LASTUPDATE\"=\u003e1504753702,\n#         \"LASTVOLUME\"=\u003e2.19e-06,\n#         \"LASTVOLUMETO\"=\u003e0.00995355,\n#         \"LASTTRADEID\"=\u003e20466080,\n#         \"VOLUME24HOUR\"=\u003e110449.85666195827,\n#         \"VOLUME24HOURTO\"=\u003e503369392.8440719,\n#         \"OPEN24HOUR\"=\u003e4497.45,\n#         \"HIGH24HOUR\"=\u003e4667.51,\n#         \"LOW24HOUR\"=\u003e4386.51,\n#         \"LASTMARKET\"=\u003e\"Coinbase\",\n#         \"CHANGE24HOUR\"=\u003e54.39000000000033,\n#         \"CHANGEPCT24HOUR\"=\u003e1.2093519661141388,\n#         \"SUPPLY\"=\u003e16549137,\n#         \"MKTCAP\"=\u003e75329023762.08\n#       }\n#     }\n#   },\n#   \"DISPLAY\" =\u003e {\n#     \"BTC\" =\u003e {\n#       \"USD\" =\u003e {\n#         \"FROMSYMBOL\"=\u003e\"Ƀ\",\n#         \"TOSYMBOL\"=\u003e\"$\",\n#         \"MARKET\"=\u003e\"CryptoCompare Index\",\n#         \"PRICE\"=\u003e\"$ 4,551.84\",\n#         \"LASTUPDATE\"=\u003e\"Just now\",\n#         \"LASTVOLUME\"=\u003e\"Ƀ 0.00000219\",\n#         \"LASTVOLUMETO\"=\u003e\"$ 0.009954\",\n#         \"LASTTRADEID\"=\u003e20466080,\n#         \"VOLUME24HOUR\"=\u003e\"Ƀ 110,449.9\",\n#         \"VOLUME24HOURTO\"=\u003e\"$ 503,369,392.8\",\n#         \"OPEN24HOUR\"=\u003e\"$ 4,497.45\",\n#         \"HIGH24HOUR\"=\u003e\"$ 4,667.51\",\n#         \"LOW24HOUR\"=\u003e\"$ 4,386.51\",\n#         \"LASTMARKET\"=\u003e\"Coinbase\",\n#         \"CHANGE24HOUR\"=\u003e\"$ 54.39\",\n#         \"CHANGEPCT24HOUR\"=\u003e\"1.21\",\n#         \"SUPPLY\"=\u003e\"Ƀ 16,549,137\",\n#         \"MKTCAP\"=\u003e\"$ 75.33 B\"\n#       }\n#     }\n#   }\n# }\n```\n\nGenerate average price for cryptocurrency to fiat currency.\n\n```ruby\nCryptocompare::Price.generate_avg('BTC', 'USD', ['Coinbase', 'Bitfinex'])\n# =\u003e {\n#   \"RAW\" =\u003e {\n#     \"MARKET\" =\u003e \"CUSTOMAGG\",\n#     \"FROMSYMBOL\" =\u003e \"BTC\",\n#     \"TOSYMBOL\" =\u003e \"USD\",\n#     \"FLAGS\" =\u003e 0,\n#     \"PRICE\" =\u003e 4137.43,\n#     \"LASTUPDATE\" =\u003e 1503454563,\n#     \"LASTVOLUME\" =\u003e 2,\n#     \"LASTVOLUMETO\" =\u003e 8271.98,\n#     \"LASTTRADEID\" =\u003e 19656029,\n#     \"VOLUME24HOUR\" =\u003e 71728.71957884016,\n#     \"VOLUME24HOURTO\" =\u003e 279374718.3442189,\n#     \"OPEN24HOUR\" =\u003e 3885.85,\n#     \"HIGH24HOUR\" =\u003e 4145,\n#     \"LOW24HOUR\" =\u003e 3583.46,\n#     \"LASTMARKET\" =\u003e \"Coinbase\",\n#     \"CHANGE24HOUR\" =\u003e 251.58000000000038,\n#     \"CHANGEPCT24HOUR\" =\u003e 6.474259171095137\n#   },\n#   \"DISPLAY\" =\u003e {\n#     \"FROMSYMBOL\" =\u003e \"Ƀ\",\n#     \"TOSYMBOL\" =\u003e \"$\",\n#     \"MARKET\" =\u003e \"CUSTOMAGG\",\n#     \"PRICE\" =\u003e \"$ 4,137.43\",\n#     \"LASTUPDATE\" =\u003e \"Just now\",\n#     \"LASTVOLUME\" =\u003e \"Ƀ 2\",\n#     \"LASTVOLUMETO\" =\u003e \"$ 8,271.98\",\n#     \"LASTTRADEID\" =\u003e 19656029,\n#     \"VOLUME24HOUR\" =\u003e \"Ƀ 71,728.7\",\n#     \"VOLUME24HOURTO\" =\u003e \"$ 279,374,718.3\",\n#     \"OPEN24HOUR\" =\u003e \"$ 3,885.85\",\n#     \"HIGH24HOUR\" =\u003e \"$ 4,145\",\n#     \"LOW24HOUR\" =\u003e \"$ 3,583.46\",\n#     \"LASTMARKET\" =\u003e \"Coinbase\",\n#     \"CHANGE24HOUR\" =\u003e \"$ 251.58\",\n#     \"CHANGEPCT24HOUR\" =\u003e \"6.47\"\n#   }\n# }\n```\n\nGet day average price.\n\n```ruby\nCryptocompare::Price.day_avg('BTC', 'USD')\n# =\u003e {\n#   \"USD\" =\u003e 4109.92,\n#   \"ConversionType\" =\u003e {\n#     \"type\" =\u003e \"direct\",\n#     \"conversionSymbol\" =\u003e \"\"\n#   }\n# }\n```\n\n### PriceHistorical\n\nFinds the price of any cryptocurrency in any other currency that you need 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. If the crypto does not trade directly into the toSymbol requested, BTC will be used for conversion. Tries to get direct trading pair data, if there is none or it is more than 30 days before the ts requested, it uses BTC conversion. If the opposite pair trades we invert it (eg.: BTC-XMR)\n\n**Examples:**\n\nFind historical price of cryptocurrency.\n\n```ruby\nCryptocompare::PriceHistorical.find('ETH', 'USD')\n# =\u003e {\"ETH\"=\u003e{\"USD\"=\u003e225.93}}\n```\n\nFind historical price of cryptocurrency at a given timestamp.\n\n```ruby\nCryptocompare::PriceHistorical.find('ETH', 'USD', {'ts' =\u003e 1452680400})\n# =\u003e {\"ETH\"=\u003e{\"USD\"=\u003e223.2}}\n```\n\nFind historical price of cryptocurrency in many currencies at a given timestamp.\n\n```ruby\nCryptocompare::PriceHistorical.find('ETH', ['BTC', 'USD', 'EUR'], {'ts' =\u003e '1452680400'})\n# =\u003e {\"ETH\"=\u003e{\"BTC\"=\u003e0.08006, \"USD\"=\u003e225.93, \"EUR\"=\u003e194.24}}\n```\n\n### CoinList\n\nGet general info for all the coins available on Cryptocompare's API.\n\n**Example:**\n\n```ruby\nCryptocompare::CoinList.all\n# =\u003e {\n#     \"Response\" =\u003e \"Success\",\n#     \"Message\" =\u003e \"Coin list succesfully returned!\",\n#     \"BaseImageUrl\" =\u003e \"https://www.cryptocompare.com\",\n#     \"BaseLinkUrl\" =\u003e \"https://www.cryptocompare.com\",\n#     \"DefaultWatchlist\" =\u003e {\n#       \"CoinIs\" =\u003e \"1182,7605,5038,24854,3807,3808,202330,5324,5031,20131\",\n#       \"Sponsored\" =\u003e \"\"\n#     },\n#     \"Data\" =\u003e {\n#       \"BTC\" =\u003e {\n#         \"Id\" =\u003e \"1182\",\n#         \"Url\" =\u003e \"/coins/btc/overview\",\n#         \"ImageUrl\" =\u003e \"/media/19633/btc.png\",\n#         \"Name\" =\u003e \"BTC\",\n#         \"Symbol\" =\u003e \"BTC\",\n#         \"CoinName\" =\u003e \"Bitcoin\",\n#         \"FullName\" =\u003e \"Bitcoin (BTC)\",\n#         \"Algorithm\" =\u003e \"SHA256\",\n#         \"ProofType\" =\u003e \"PoW\",\n#         \"FullyPremined\" =\u003e \"0\",\n#         \"TotalCoinSupply\" =\u003e \"21000000\",\n#         \"PreMinedValue\" =\u003e \"N/A\",\n#         \"TotalCoinsFreeFloat\" =\u003e \"N/A\",\n#         \"SortOrder\" =\u003e \"1\",\n#         \"Sponsored\" =\u003e false\n#       },\n#       \"ETH\" =\u003e {\n#         \"Id\" =\u003e \"7605\",\n#         \"Url\" =\u003e \"/coins/eth/overview\",\n#         \"ImageUrl\" =\u003e \"/media/20646/eth_logo.png\",\n#         \"Name\" =\u003e \"ETH\",\n#         \"Symbol\" =\u003e \"ETH\",\n#         \"CoinName\" =\u003e \"Ethereum \",\n#         \"FullName\" =\u003e \"Ethereum (ETH)\",\n#         \"Algorithm\" =\u003e \"Ethash\",\n#         \"ProofType\" =\u003e \"PoW\",\n#         \"FullyPremined\" =\u003e \"0\",\n#         \"TotalCoinSupply\" =\u003e \"0\",\n#         \"PreMinedValue\" =\u003e \"N/A\",\n#         \"TotalCoinsFreeFloat\" =\u003e \"N/A\",\n#         \"SortOrder\" =\u003e \"2\",\n#         \"Sponsored\" =\u003e false\n#       },\n#       ...\n#     },\n#     \"Type\" =\u003e 100\n#   }\n```\n\n### CoinSnapshot\n\nGet data for a currency pair. It returns general block explorer information, aggregated data and individual data for each exchange available.\n\n**Example:**\n\n```ruby\nCryptocompare::CoinSnapshot.find('BTC', 'USD')\n# =\u003e {\n#      \"Response\":\"Success\",\n#      \"Message\":\"Total available exchanges - 107\",\n#      \"Type\":100,\n#      \"Data\": {\n#        \"CoinInfo\"=\u003e {\n#          \"Id\"=\u003e\"1182\",\n#          \"Name\"=\u003e\"BTC\",\n#          \"FullName\"=\u003e\"Bitcoin\",\n#          \"Internal\"=\u003e\"BTC\",\n#          \"ImageUrl\"=\u003e\"/media/37746251/btc.png\",\n#          \"Url\"=\u003e\"/coins/btc/overview\",\n#          \"Algorithm\"=\u003e\"SHA-256\",\n#          \"ProofType\"=\u003e\"PoW\",\n#          \"TotalCoinsMined\"=\u003e18873906,\n#          \"BlockNumber\"=\u003e710736,\n#          \"NetHashesPerSecond\"=\u003e152163633011463750000,\n#          \"BlockReward\"=\u003e6.25,\n#          \"BlockTime\"=\u003e637,\n#          \"AssetLaunchDate\"=\u003e\"2009-01-03\",\n#          \"MaxSupply\"=\u003e20999999.9769,\n#          \"MktCapPenalty\"=\u003e0,\n#          \"TotalVolume24H\"=\u003e119421.69853408838,\n#          \"TotalTopTierVolume24H\"=\u003e119164.10371469974\n#       },\n#       \"AggregatedData\" =\u003e {\n#         \"TYPE\"=\u003e\"5\",\n#         \"MARKET\"=\u003e\"CCCAGG\",\n#         \"FROMSYMBOL\"=\u003e\"BTC\",\n#         \"TOSYMBOL\"=\u003e\"USD\",\n#         \"FLAGS\"=\u003e\"1026\",\n#         \"PRICE\"=\u003e59405.32,\n#         \"LASTUPDATE\"=\u003e1637524770,\n#         \"MEDIAN\"=\u003e59406,\n#         \"LASTVOLUME\"=\u003e0.0214,\n#         \"LASTVOLUMETO\"=\u003e1271.689008,\n#         \"LASTTRADEID\"=\u003e\"aa1gpl99200btcfe\",\n#         \"VOLUMEDAY\"=\u003e12490.619219841396,\n#         \"VOLUMEDAYTO\"=\u003e739844937.9215171,\n#         \"VOLUME24HOUR\"=\u003e14980.50732139,\n#         \"VOLUME24HOURTO\"=\u003e888337522.224627,\n#         \"OPENDAY\"=\u003e59770.02,\n#         \"HIGHDAY\"=\u003e60058.65,\n#         \"LOWDAY\"=\u003e58575.6,\n#         \"OPEN24HOUR\"=\u003e59502.04,\n#         \"HIGH24HOUR\"=\u003e60075.96,\n#         \"LOW24HOUR\"=\u003e58554.42,\n#         \"LASTMARKET\"=\u003e\"coinfield\",\n#         \"VOLUMEHOUR\"=\u003e522.9115465200042,\n#         \"VOLUMEHOURTO\"=\u003e31084371.054275494,\n#         \"OPENHOUR\"=\u003e59528.37,\n#         \"HIGHHOUR\"=\u003e59629.67,\n#         \"LOWHOUR\"=\u003e59298.19,\n#         \"TOPTIERVOLUME24HOUR\"=\u003e14980.50630839,\n#         \"TOPTIERVOLUME24HOURTO\"=\u003e888337462.2300239,\n#         \"CHANGE24HOUR\"=\u003e-96.72000000000116,\n#         \"CHANGEPCT24HOUR\"=\u003e-0.16254904873849899,\n#         \"CHANGEDAY\"=\u003e-364.6999999999971,\n#         \"CHANGEPCTDAY\"=\u003e-0.6101721230810984,\n#         \"CHANGEHOUR\"=\u003e-123.05000000000291,\n#         \"CHANGEPCTHOUR\"=\u003e-0.20670816284740018,\n#         \"CONVERSIONTYPE\"=\u003e\"direct\",\n#         \"CONVERSIONSYMBOL\"=\u003e\"\",\n#         \"SUPPLY\"=\u003e18873906,\n#         \"MKTCAP\"=\u003e1121210425579.92,\n#         \"MKTCAPPENALTY\"=\u003e0,\n#         \"CIRCULATINGSUPPLY\"=\u003e18873906,\n#         \"CIRCULATINGSUPPLYMKTCAP\"=\u003e1121210425579.92,\n#         \"TOTALVOLUME24H\"=\u003e119421.69853408838,\n#         \"TOTALVOLUME24HTO\"=\u003e7092699907.396162,\n#         \"TOTALTOPTIERVOLUME24H\"=\u003e119164.10371469974,\n#         \"TOTALTOPTIERVOLUME24HTO\"=\u003e7077397404.903025,\n#         \"IMAGEURL\"=\u003e\"/media/37746251/btc.png\"\n#       },\n#       \"Exchanges\":[\n#         {\n#           \"TYPE\":\"2\",\n#           \"MARKET\":\"LakeBTC\",\n#           \"FROMSYMBOL\":\"BTC\",\n#           \"TOSYMBOL\":\"USD\",\n#           \"FLAGS\":\"2\",\n#           \"PRICE\":\"244.37\",\n#           \"LASTUPDATE\":\"1444513131\",\n#           \"LASTVOLUME\":\"0.03\",\n#           \"LASTVOLUMETO\":\"7.3311\",\n#           \"LASTTRADEID\":\"1444513131\",\n#           \"VOLUME24HOUR\":\"3599.0560000000005\",\n#           \"VOLUME24HOURTO\":\"879237.6299349999\",\n#           \"OPEN24HOUR\":\"243.83\",\n#           \"HIGH24HOUR\":\"245.23\",\n#           \"LOW24HOUR\":\"242.68\"\n#         },\n#         ....\n#       ]\n#     }\n#   }\n```\n\n### TopPairs\n\nGet top pairs by volume for a currency (always uses aggregated data). The number of pairs you get is the minimum of the limit you set (default 5) and the total number of pairs available.\n\n**Examples:**\n\nFind top pairs by trading volume for a given currency.\n\n```ruby\nCryptocompare::TopPairs.find('ETH')\n# =\u003e {\n#   \"Response\" =\u003e \"Success\",\n#   \"Data\" =\u003e [\n#     {\n#       \"exchange\" =\u003e \"CCCAGG\",\n#       \"fromSymbol\" =\u003e \"ETH\",\n#       \"toSymbol\" =\u003e \"USD\",\n#       \"volume24h\" =\u003e 1310705.3005027298,\n#       \"volume24hTo\" =\u003e 288031723.3503975\n#     },\n#     {\n#       \"exchange\" =\u003e \"CCCAGG\",\n#       \"fromSymbol\" =\u003e \"ETH\",\n#       \"toSymbol\" =\u003e \"BTC\",\n#       \"volume24h\" =\u003e 978200.2198323006,\n#       \"volume24hTo\" =\u003e 77883.06190085363\n#     },\n#     ...\n#   ]\n# }\n```\n\n### HistoMinute\n\nGet open, high, low, close, volumefrom and volumeto for each minute of historical data. This data is only stored for 7 days, if you need more, use the hourly or daily path. It uses BTC conversion if data is not available because the coin is not trading in the specified currency.\n\n**Examples:**\n\nFind historical data by minute for BTC to USD.\n\n```ruby\nCryptocompare::HistoMinute.find('BTC', 'USD')\n# =\u003e {\n#   \"Response\" =\u003e \"Success\",\n#   \"Type\" =\u003e 100,\n#   \"Aggregated\" =\u003e true,\n#   \"Data\" =\u003e [\n#     {\n#       \"time\" =\u003e 1502259120,\n#       \"close\" =\u003e 3396.44,\n#       \"high\" =\u003e 3397.63,\n#       \"low\" =\u003e 3396.34,\n#       \"open\" =\u003e 3397.39,\n#       \"volumefrom\" =\u003e 98.2,\n#       \"volumeto\" =\u003e 335485\n#     },\n#     {\n#       \"time\" =\u003e 1502259300,\n#       \"close\" =\u003e 3396.86,\n#       \"high\" =\u003e 3396.94,\n#       \"low\" =\u003e 3396.44,\n#       \"open\" =\u003e 3396.44,\n#       \"volumefrom\" =\u003e 16.581031,\n#       \"volumeto\" =\u003e 56637.869999999995\n#     },\n#     ...\n#   ],\n#   \"TimeTo\" =\u003e 1502259360,\n#   \"TimeFrom\" =\u003e 1502259120,\n#   \"FirstValueInArray\" =\u003e true,\n#   \"ConversionType\" =\u003e {\n#     \"type\" =\u003e \"direct\",\n#     \"conversionSymbol\" =\u003e \"\"\n#   }\n# }\n```\n\n### HistoHour\n\nGet open, high, low, close, volumefrom and volumeto from the each hour historical data. It uses BTC conversion if data is not available because the coin is not trading in the specified currency.\n\n**Examples:**\n\nFind historical data by hour for BTC to USD.\n\n```ruby\nCryptocompare::HistoHour.find('BTC', 'USD')\n# =\u003e {\n#   \"Response\" =\u003e \"Success\",\n#   \"Type\" =\u003e 100,\n#   \"Aggregated\" =\u003e false,\n#     \"Data\" =\u003e [\n#     {\n#       \"time\" =\u003e 1502259120,\n#       \"close\" =\u003e 3396.44,\n#       \"high\" =\u003e 3397.63,\n#       \"low\" =\u003e 3396.34,\n#       \"open\" =\u003e 3397.39,\n#       \"volumefrom\" =\u003e 98.2,\n#       \"volumeto\" =\u003e 335485\n#     },\n#     {\n#       \"time\" =\u003e 1502259300,\n#       \"close\" =\u003e 3396.86,\n#       \"high\" =\u003e 3396.94,\n#       \"low\" =\u003e 3396.44,\n#       \"open\" =\u003e 3396.44,\n#       \"volumefrom\" =\u003e 16.581031,\n#       \"volumeto\" =\u003e 56637.869999999995\n#     },\n#     ...\n#   ],\n#   \"TimeTo\" =\u003e 1503248400,\n#   \"TimeFrom\" =\u003e 1502643600,\n#   \"FirstValueInArray\" =\u003e true,\n#   \"ConversionType\" =\u003e {\n#     \"type\" =\u003e \"direct\",\n#     \"conversionSymbol\" =\u003e \"\"\n#   }\n# }\n```\n\n### HistoDay\n\nGet open, high, low, close, volumefrom and volumeto daily historical data. The values are based on 00:00 GMT time. It uses BTC conversion if data is not available because the coin is not trading in the specified currency.\n\n**Examples:**\n\nFind historical data by day for BTC to USD.\n\n```ruby\nCryptocompare::HistoDay.find('BTC', 'USD')\n# =\u003e {\n#   \"Response\" =\u003e \"Success\",\n#   \"Type\" =\u003e 100,\n#   \"Aggregated\" =\u003e false,\n#   \"Data\" =\u003e [\n#     {\n#       \"time\" =\u003e 1500854400,\n#       \"close\" =\u003e 2763.42,\n#       \"high\" =\u003e 2798.89,\n#       \"low\" =\u003e 2715.69,\n#       \"open\" =\u003e 2756.61,\n#       \"volumefrom\" =\u003e 83009.25,\n#       \"volumeto\" =\u003e 229047365.02\n#     },\n#     {\n#       \"time\" =\u003e 1500940800,\n#       \"close\" =\u003e 2582.58,\n#       \"high\" =\u003e 2779.08,\n#       \"low\" =\u003e 2472.62,\n#       \"open\" =\u003e 2763.42,\n#       \"volumefrom\" =\u003e 205883.15,\n#       \"volumeto\" =\u003e 534765380.75\n#     },\n#     ...\n#   ],\n#   \"TimeTo\" =\u003e 1503446400,\n#   \"TimeFrom\" =\u003e 1500854400,\n#   \"FirstValueInArray\" =\u003e true,\n#   \"ConversionType\" =\u003e {\n#     \"type\" =\u003e \"direct\",\n#     \"conversionSymbol\" =\u003e \"\"\n#   }\n# }\n```\n\n## News\nGet news articles from the providers that CryptoCompare has integrated with as well as news provider data.\n\n**Example:**\n\nGet news articles from the providers that CryptoCompare has integrated with.\n\n```ruby\nCryptocompare::News.all\n# =\u003e [\n#     {\n#       \"id\" =\u003e \"85721\",\n#       \"guid\" =\u003e \"https://news.bitcoin.com/?p=127153\",\n#       \"published_on\" =\u003e 1520834400,\n#       \"imageurl\" =\u003e \"https://images.cryptocompare.com/news/bitcoin.com/b9MBw3g640c.jpeg\",\n#       \"title\" =\u003e \"Study Finds $3B Worth of Faked Cryptocurrency Volumes and Wash Trades\",\n#       \"url\" =\u003e \"https://news.bitcoin.com/study-finds-3b-worth-of-faked-cryptocurrency-volumes-and-wash-trades/\",\n#       \"source\" =\u003e \"bitcoin.com\",\n#       \"body\" =\u003e \"On March 10 a cryptocurrency trader and researcher published a report on how he believes $3 billion worth of cryptocurrency trade volumes, primarily from a couple of exchanges, are concocted. The author of the study, Sylvain Ribes, alleges that the exchange Okcoin has been fabricating up to 93 percent of its trade volumes. Also read: Thailand [\u0026#8      230;]The post Study Finds $3B Worth of Faked Cryptocurrency Volumes and Wash Trades appeared first on Bitcoin News.\",\n#       \"tags\" =\u003e \"News|95%|altcoin exchange|Binance|Bitcoin|BTC|Coinmarketcap|Fake Trades|GDAX|Huobi|illiquid assets|Kraken|Liquidity|Livecoinwatch|N-Featured|OKcoin|Okex|Poloniex|Sylvain Ribes|trading|Volumes|Wash Trades|Zhao Changpeng\",\n#       \"categories\" =\u003e \"BTC|Exchange|Trading\",\n#       \"lang\" =\u003e \"EN\",\n#       \"source_info\" =\u003e {\n#         \"name\" =\u003e \"Bitcoin.com\",\n#         \"lang\" =\u003e \"EN\",\n#         \"img\" =\u003e \"https://images.cryptocompare.com/news/default/bitcoincom.png\"\n#       }\n#     },\n#     ...\n# ]\n```\n\n**Example:**\n\nGet all the news providers that CryptoCompare has integrated with.\n\n```ruby\nCryptocompare::News.providers\n# =\u003e [\n#     {\n#       \"key\" =\u003e \"cryptocompare\",\n#       \"name\" =\u003e \"CryptoCompare\",\n#       \"lang\" =\u003e \"EN\",\n#       \"img\" =\u003e \"https://images.cryptocompare.com/news/default/cryptocompare.png\"\n#     },\n#     {\n#       \"key\" =\u003e \"coindesk\",\n#       \"name\" =\u003e \"CoinDesk\",\n#       \"lang\" =\u003e \"EN\",\n#       \"img\" =\u003e \"https://images.cryptocompare.com/news/default/coindesk.png\"\n#     },\n#     {\n#       \"key\" =\u003e \"bitcoinmagazine\",\n#       \"name\" =\u003e \"Bitcoin Magazine\",\n#       \"lang\" =\u003e \"EN\",\n#       \"img\" =\u003e \"https://images.cryptocompare.com/news/default/bitcoinmagazine.png\"\n#     },\n#     {\n#       \"key\" =\u003e \"yahoofinance\",\n#       \"name\" =\u003e \"Yahoo Finance Bitcoin\",\n#       \"lang\" =\u003e \"EN\",\n#       \"img\" =\u003e \"https://images.cryptocompare.com/news/default/yahoofinance.png\"\n#     },\n#     ...\n# ]\n```\n\n### Exchanges\nGet exchange data, such as cryptocurrencies that each exchange offers, and the supported conversion cryptocurrencies.\n\n**Examples:**\n\nGet info for all exchanges.\n\n```ruby\nCryptocompare::Exchanges.all\n# =\u003e {\n#   \"Coinbase\" =\u003e [\n#      {\n#         \"LTC\" =\u003e [\n#            \"BTC\",\n#            \"USD\",\n#            \"EUR\"\n#         ],\n#         \"ETH\" =\u003e [\n#            \"BTC\",\n#            \"USD\",\n#            \"EUR\"\n#         ],\n#         \"BCH\" =\u003e [\n#            \"USD\"\n#         ],\n#         \"BTC\" =\u003e [\n#            \"USD\",\n#            \"GBP\",\n#            \"EUR\",\n#            \"CAD\"\n#         ]\n#      },\n#   ],\n#   ...\n# }\n```\n\n## Supported Exchanges\n\n* aax\n* ABCC\n* Abucoins\n* ACX\n* AidosMarket\n* aliexchange\n* alphaex\n* altilly\n* ataix\n* bcbitcoin\n* BCEX\n* beldex\n* bequant\n* betconix\n* Bgogo\n* bhex\n* Bibox\n* BigONE\n* biki\n* bilaxy\n* Binance\n* binancedex\n* Binanceje\n* binanceusa\n* bingcoins\n* Bit2C\n* bitasset\n* BitBank\n* BitBay\n* bitbuy\n* bitci\n* bitcoincom\n* BitexBook\n* bitfex\n* Bitfinex\n* BitFlip\n* bitFlyer\n* bitflyereu\n* bitFlyerFX\n* bitflyerus\n* Bitforex\n* BitGrail\n* Bithumb\n* bithumbglobal\n* Bitinfi\n* Bitkub\n* Bitlish\n* BitMarket\n* BitMart\n* bitmax\n* Bitmex\n* bitpanda\n* Bitpoint\n* Bitsane\n* Bitshares\n* Bitso\n* bitspark\n* BitSquare\n* Bitstamp\n* BitTrex\n* BitZ\n* bkex\n* Blackturtle\n* Bleutrade\n* blockchaincom\n* Bluebelt\n* Braziliex\n* BTC38\n* BTCAlpha\n* BTCBOX\n* BTCChina\n* BTCE\n* BTCExchange\n* BTCMarkets\n* btcmex\n* BTCTurk\n* btcXchange\n* BTCXIndia\n* BTER\n* btse\n* Buda\n* bw\n* BXinth\n* bybit\n* Catex\n* CBX\n* CCCAGG\n* CCEDK\n* CCEX\n* Cexio\n* chainrift\n* chainx\n* chaoex\n* CHBTC\n* ChileBit\n* cobinhood\n* Codex\n* coinall\n* Coinbase\n* CoinBene\n* Coincap\n* Coincheck\n* CoinCorner\n* CoinDeal\n* coineal\n* coinegg\n* CoinEx\n* CoinFalcon\n* coinfield\n* Coinfloor\n* CoinHub\n* CoinJar\n* Coinmate\n* Coinnest\n* Coinone\n* CoinPulse\n* Coinroom\n* CoinsBank\n* Coinsbit\n* Coinse\n* Coinsetter\n* coinspro\n* coinsuper\n* CoinTiger\n* coinzest\n* compound\n* coss\n* crex24\n* crosstower\n* Cryptagio\n* CryptoBulls\n* CryptoCarbon\n* cryptodotcom\n* CryptoExchangeWS\n* cryptofacilities\n* cryptonex\n* Cryptonit\n* Cryptopia\n* CryptoX\n* Cryptsy\n* currency\n* curve\n* darbfinance\n* dcoin\n* DDEX\n* decoin\n* deribit\n* DEx\n* DigiFinex\n* DSX\n* e55com\n* eidoo\n* equos\n* erisx\n* EtherDelta\n* Ethermium\n* EthexIndia\n* Ethfinex\n* etoro\n* Everbloom\n* Exenium\n* Exmo\n* EXRATES\n* exscudo\n* ExtStock\n* EXX\n* fatbtc\n* FCCE\n* FCoin\n* Foxbit\n* ftx\n* ftxus\n* Gatecoin\n* Gateio\n* Gemini\n* Globitex\n* Gneiss\n* Gnosis\n* gopax\n* Graviex\n* HADAX\n* hbus\n* Hikenex\n* HitBTC\n* Huobi\n* huobifutures\n* huobijapan\n* huobikorea\n* HuobiPro\n* iCoinbay\n* IDAX\n* idevex\n* IDEX\n* Incorex\n* IndependentReserve\n* indodax\n* InstantBitex\n* IQFinex\n* Ironex\n* itBit\n* Jubi\n* Korbit\n* Kraken\n* Kucoin\n* Kuna\n* LakeBTC\n* LAToken\n* LBank\n* Liqnet\n* Liqui\n* Liquid\n* LiveCoin\n* lmax\n* LocalBitcoins\n* Luno\n* Lykke\n* MercadoBitcoin\n* Minebit\n* MonetaGo\n* MtGox\n* NDAX\n* Nebula\n* Neraex\n* Nexchange\n* Nlexch\n* nominex\n* Novaexchange\n* Nuex\n* oex\n* OKCoin\n* OKEX\n* onederx\n* oneinch\n* OpenLedger\n* Ore\n* P2PB2B\n* pancakeswap\n* paribu\n* Paymium\n* Poloniex\n* primexbt\n* probit\n* Qryptos\n* QuadrigaCX\n* quickswap\n* Quoine\n* raidofinance\n* Remitano\n* RightBTC\n* SafeCoin\n* safetrade\n* seedcx\n* sigenp2p\n* sigenpro\n* Simex\n* SingularityX\n* sistemkoin\n* slicex\n* smartrade\n* StocksExchange\n* StocksExchangeio\n* Surbitcoin\n* sushiswap\n* Switcheo\n* tchapp\n* TDAX\n* TheRockTrading\n* thore\n* Threexbit\n* Tidex\n* timex\n* Tokenomy\n* tokensnet\n* TokenStore\n* tokok\n* TradeSatoshi\n* TrustDEX\n* trxmarket\n* TuxExchange\n* uniswap\n* uniswapv2\n* uniswapv3\n* unnamed\n* Unocoin\n* Upbit\n* utorg\n* valr\n* Vaultoro\n* VBTC\n* Velox\n* ViaBTC\n* WavesDEX\n* wbb\n* WEX\n* WorldCryptoCap\n* xbtpro\n* xcoex\n* xena\n* XS2\n* xtpub\n* Yacuna\n* Yobit\n* Yunbi\n* Zaif\n* ZB\n* ZBG\n* zebitex\n* Zecoex\n* zloadr\n\nIf no exchange option is specified, then the default 'CCCAGG' is used. This is cryptocompare's aggregated data.\n\n### Stats\n\nGet stats such as rate limit.\n\n**Examples:**\n\nFind out how many calls you have left in the current month, day, hour, minute and second.\n\n```ruby\nCryptocompare::Stats.rate_limit\n# =\u003e {\n#   \"Response\" =\u003e \"Success\",\n#   \"Message\" =\u003e \"\",\n#   \"HasWarning\" =\u003e false,\n#   \"Type\" =\u003e 100,\n#   \"RateLimit\" =\u003e {},\n#   \"Data\" =\u003e {\n#     \"calls_made\" =\u003e {\n#       \"second\" =\u003e 1,\n#       \"minute\" =\u003e 2,\n#       \"hour\" =\u003e 2,\n#       \"day\" =\u003e 2,\n#       \"month\" =\u003e 33\n#     },\n#     \"calls_left\" =\u003e {\n#       \"second\" =\u003e 19,\n#       \"minute\" =\u003e 298,\n#       \"hour\" =\u003e 2998,\n#       \"day\" =\u003e 7498,\n#       \"month\" =\u003e 49967\n#     }\n#   }\n# }\n```\n\n## Development\n\nAfter checking out the repo, run `bin/setup` to install dependencies. Then, run `rake test` to run the tests. You can also run `bin/console` for an interactive prompt that will allow you to experiment.\n\nTo install this gem onto your local machine, run `bundle exec rake install`. To release a new version, update the version number in `version.rb`, and then run `bundle exec rake release`, which will create a git tag for the version, push git commits and tags, and push the `.gem` file to [rubygems.org](https://rubygems.org).\n\n## Contributing\n\nBug reports and pull requests are welcome on GitHub at https://github.com/alexanderdavidpan/cryptocompare. This project is intended to be a safe, welcoming space for collaboration, and contributors are expected to adhere to the [Contributor Covenant](http://contributor-covenant.org) code of conduct.\n\n\n## License\n\nThe gem is available as open source under the terms of the [MIT License](http://opensource.org/licenses/MIT).\n","funding_links":[],"categories":["Awesome CryptoCompare [![Awesome](https://github.com/CryptoCompareLTD/awesome-cryptocompare/blob/master/awesomecc.svg)](https://github.com/sindresorhus/awesome)"],"sub_categories":["Ruby"],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Falexanderdavidpan%2Fcryptocompare","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Falexanderdavidpan%2Fcryptocompare","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Falexanderdavidpan%2Fcryptocompare/lists"}