{ "info": { "author": "Paula Grangeiro", "author_email": "contato@paulagrangeiro.com.br", "bugtrack_url": null, "classifiers": [], "description": "# Python Coin Market Cap Client\n\nA Python library to connect with [Coin Market Cap](https://coinmarketcap.com/) APIs.\n\nSupported APIs:\n- [Ticker](https://coinmarketcap.com/api/#endpoint_ticker)\n- [Ticker for Specific Cryptocurrency](https://coinmarketcap.com/api/#endpoint_ticker_specific_cryptocurrency)\n- [Listings](https://coinmarketcap.com/api/#endpoint_listings)\n- [Global Data](https://coinmarketcap.com/api/#endpoint_global_data)\n\n\n# Install\n```\npip install coinmarketcap-client\n```\n\n\n# Tests\n```\ntox\n```\n\n\n# Usage\n\n```\n>>> from coinmarketcap.clients import CoinMarketCapClient\n>>> client = CoinMarketCapClient()\n```\n\n## List cryptocurrencies\n\nReturn the active list of cryptocurrencies.\n\n```\n>>> client.listing.get()\n[{'id': 1, 'name': 'Bitcoin', 'symbol': 'BTC', 'website_slug': 'bitcoin'}, {'id': 2, 'name': 'Litecoin', 'symbol': 'LTC', 'website_slug': 'litecoin'}, ...\n```\n\n## Get tickers\n\nReturn the ticker data for all active cryptocurrencies.\n\nParameters:\n- limit[optional]: Return a maximum of [limit] results (default is 100; max is 100)\n- start[optional]: Return results from rank [start] and above\n- sort[optional]: Return results sorted by [sort] . Possible values are \"id\", \"rank\", \"volume_24h\" and \"percent_change_24h\" (default is rank).\n- currency[optional]: Return pricing info in terms of another currency (default is USD)\n - Supported values are: \"AUD\", \"BRL\", \"CAD\", \"CHF\", \"CLP\", \"CNY\", \"CZK\", \"DKK\", \"EUR\", \"GBP\", \"HKD\", \"HUF\", \"IDR\", \"ILS\", \"INR\", \"JPY\", \"KRW\", \"MXN\", \"MYR\", \"NOK\", \"NZD\", \"PHP\", \"PKR\", \"PLN\", \"RUB\", \"SEK\", \"SGD\", \"THB\", \"TRY\", \"TWD\", \"ZAR\"\n - Also supports these cryptocurrency values: \"BTC\", \"ETH\" \"XRP\", \"LTC\", and \"BCH\"\n\n```\n>>> client.tickers.get()\n[{'id': 1, 'name': 'Bitcoin', 'symbol': 'BTC', 'website_slug': 'bitcoin', 'rank': 1, 'circulating_supply': 17073725.0, 'total_supply': 17073725.0, 'max_supply': 21000000.0, 'quotes': {'USD': {'price': 7600.48, 'volume_24h': 4943200000.0, 'market_cap': 129768505388.0, 'percent_change_1h': -0.32, 'percent_change_24h': -1.66, 'percent_change_7d': 4.4}}, 'last_updated': 1528100975}, {'id': 1027, 'name': 'Ethereum', 'symbol': 'ETH', 'website_slug': 'e...\n```\n\n## Get ticker by Cryptocurrency\n\nReturn the last ticker data for specific cryptocurrency.\n\nParameters:\n- coin_id: The cryptocurrency id in Coin Market Cap API.\n- currency[optional]: Return pricing info in terms of another currency (default is USD)\n - Supported values are: \"AUD\", \"BRL\", \"CAD\", \"CHF\", \"CLP\", \"CNY\", \"CZK\", \"DKK\", \"EUR\", \"GBP\", \"HKD\", \"HUF\", \"IDR\", \"ILS\", \"INR\", \"JPY\", \"KRW\", \"MXN\", \"MYR\", \"NOK\", \"NZD\", \"PHP\", \"PKR\", \"PLN\", \"RUB\", \"SEK\", \"SGD\", \"THB\", \"TRY\", \"TWD\", \"ZAR\"\n - Also supports these cryptocurrency values: \"BTC\", \"ETH\" \"XRP\", \"LTC\", and \"BCH\"\n\n```\n>>> client.cryptocoin.get(coin_id=1)\n{'id': 1, 'name': 'Bitcoin', 'symbol': 'BTC', 'website_slug': 'bitcoin', 'rank': 1, 'circulating_supply': 17083000.0, 'total_supply': 17083000.0, 'max_supply': 21000000.0, 'quotes': {'USD': {'price': 7635.7, 'volume_24h':4211460000.0, 'market_cap': 130440663100.0, 'percent_change_1h': -0.13, 'percent_change_24h': -0.6, 'percent_change_7d': 1.86}}, 'last_updated': 1528503874}\n```\n\n## Get global summary data\n\nReturns the global summary data from Coin Market Cap.\n\nParameters:\n- currency[optional]: Return pricing info in terms of another currency (default is USD)\n - Supported values are: \"AUD\", \"BRL\", \"CAD\", \"CHF\", \"CLP\", \"CNY\", \"CZK\", \"DKK\", \"EUR\", \"GBP\", \"HKD\", \"HUF\", \"IDR\", \"ILS\", \"INR\", \"JPY\", \"KRW\", \"MXN\", \"MYR\", \"NOK\", \"NZD\", \"PHP\", \"PKR\", \"PLN\", \"RUB\", \"SEK\", \"SGD\", \"THB\", \"TRY\", \"TWD\", \"ZAR\"\n - Also supports these cryptocurrency values: \"BTC\", \"ETH\" \"XRP\", \"LTC\", and \"BCH\"\n\n```\n>>> client.global_data.get()\n{'active_cryptocurrencies': 1654, 'active_markets': 11318, 'bitcoin_percentage_of_market_cap': 38.08, 'quotes': {'USD': {'total_market_cap': 342680267176.0, 'total_volume_24h': 13469496559.0}}, 'last_updated': 1528506574}\n```\n\n\n# Customizing\n\n## Parsing response data from Coin Market Cap API\n\nYou can create your own parser to customizing Coin Market Cap response.\n\n```\nclass MyParser:\n\n @classmethod\n def parse(cls, data):\n \"\"\"\n Implement your customized parse classmethod.\n \"\"\"\n```\n\nThen you can pass your custom parser _MyParser_ by param into some client initialization.\n\n```\nclient = TickerClient(MyParser) # Client to get tickers from Coin Market Cap\n```\n\nThis way, you can customize the parsing method from any single client from this lib.\n\n```\nfrom coinmarketcap.clients import *\n\ntickers_c = TickerClient(MyParser)\ncriptocoin_c = CryptoCoinTickerClient(MyParser)\nlisting_c = ListCryptoCoinClient(MyParser)\nglobal_c = GlobalSummaryClient(MyParser)\n```\n\nBut you also can customize the response from CoinMarketCapClient, like the example above:\n\n```\nclient = CoinMarketCap()\nMyParser.parse(client_c.tickers.get())\n```\n\n\n", "description_content_type": "text/markdown", "docs_url": null, "download_url": "https://gitlab.com/pgrangeiro/python-coinmarketcap-client/-/archive/master/python-coinmarketcap-client-master.tar.gz", "downloads": { "last_day": -1, "last_month": -1, "last_week": -1 }, "home_page": "https://gitlab.com/pgrangeiro/python-coinmarketcap-client", "keywords": "coinmarketcap,cryptocurrency,cryptocoin", "license": "GNU General Public License v3.0", "maintainer": "", "maintainer_email": "", "name": "coinmarketcap-client", "package_url": "https://pypi.org/project/coinmarketcap-client/", "platform": "", "project_url": "https://pypi.org/project/coinmarketcap-client/", "project_urls": { "Download": "https://gitlab.com/pgrangeiro/python-coinmarketcap-client/-/archive/master/python-coinmarketcap-client-master.tar.gz", "Homepage": "https://gitlab.com/pgrangeiro/python-coinmarketcap-client" }, "release_url": "https://pypi.org/project/coinmarketcap-client/2.5.3/", "requires_dist": [ "requests (>=2.18)" ], "requires_python": ">=3.6", "summary": "Python Coin Market Cap Client", "version": "2.5.3" }, "last_serial": 3944593, "releases": { "2.5.3": [ { "comment_text": "", "digests": { "md5": "94476aaa2b80ea0f3b48e569c5afacfa", "sha256": "d642831f18f6f766b82d14e8dd168c014f7fd3515c5ecaa152cc0ce19b63bd5c" }, "downloads": -1, "filename": "coinmarketcap_client-2.5.3-py3-none-any.whl", "has_sig": false, "md5_digest": "94476aaa2b80ea0f3b48e569c5afacfa", "packagetype": "bdist_wheel", "python_version": "py3", "requires_python": ">=3.6", "size": 7820, "upload_time": "2018-06-09T03:29:43", "url": "https://files.pythonhosted.org/packages/ee/7a/3a3a4885330d2cd520369173482cb994f203079bdf92468c6f942ebfa2a6/coinmarketcap_client-2.5.3-py3-none-any.whl" }, { "comment_text": "", "digests": { "md5": "22539fa350a329bffb1d90a299a6ca5c", "sha256": "583e4868b4adc24a66e137ef27bdcead537509f7024b2133982bbf12b760cc57" }, "downloads": -1, "filename": "coinmarketcap-client-2.5.3.tar.gz", "has_sig": false, "md5_digest": "22539fa350a329bffb1d90a299a6ca5c", "packagetype": "sdist", "python_version": "source", "requires_python": ">=3.6", "size": 5962, "upload_time": "2018-06-09T03:29:44", "url": "https://files.pythonhosted.org/packages/56/6f/a3be5d19c6516dfc68c9baf217c36ef1c935702335ef5b6ffe6d3c931d3d/coinmarketcap-client-2.5.3.tar.gz" } ] }, "urls": [ { "comment_text": "", "digests": { "md5": "94476aaa2b80ea0f3b48e569c5afacfa", "sha256": "d642831f18f6f766b82d14e8dd168c014f7fd3515c5ecaa152cc0ce19b63bd5c" }, "downloads": -1, "filename": "coinmarketcap_client-2.5.3-py3-none-any.whl", "has_sig": false, "md5_digest": "94476aaa2b80ea0f3b48e569c5afacfa", "packagetype": "bdist_wheel", "python_version": "py3", "requires_python": ">=3.6", "size": 7820, "upload_time": "2018-06-09T03:29:43", "url": "https://files.pythonhosted.org/packages/ee/7a/3a3a4885330d2cd520369173482cb994f203079bdf92468c6f942ebfa2a6/coinmarketcap_client-2.5.3-py3-none-any.whl" }, { "comment_text": "", "digests": { "md5": "22539fa350a329bffb1d90a299a6ca5c", "sha256": "583e4868b4adc24a66e137ef27bdcead537509f7024b2133982bbf12b760cc57" }, "downloads": -1, "filename": "coinmarketcap-client-2.5.3.tar.gz", "has_sig": false, "md5_digest": "22539fa350a329bffb1d90a299a6ca5c", "packagetype": "sdist", "python_version": "source", "requires_python": ">=3.6", "size": 5962, "upload_time": "2018-06-09T03:29:44", "url": "https://files.pythonhosted.org/packages/56/6f/a3be5d19c6516dfc68c9baf217c36ef1c935702335ef5b6ffe6d3c931d3d/coinmarketcap-client-2.5.3.tar.gz" } ] }