coinmetrics-api-client


Namecoinmetrics-api-client JSON
Version 2025.9.3.18 PyPI version JSON
download
home_pagehttps://coinmetrics.github.io/api-client-python/site/index.html
SummaryPython client for Coin Metrics API v4.
upload_time2025-09-03 18:18:29
maintainerNone
docs_urlNone
authorCoin Metrics
requires_python<4.0.0,>=3.9.0
licenseMIT
keywords coin metrics coin metrics crypto bitcoin network-data market-data api handy
VCS
bugtrack_url
requirements No requirements were recorded.
Travis-CI No Travis.
coveralls test coverage No coveralls.
            <h1 align="center"><b>Coin Metrics Python API Client</b></h1>

<p align="center">
  <img src="assets/images/cm-dark-combination.png">
</p>

The **Coin Metrics Python API Client** is the official Python wrapper for the [Coin Metrics API](https://docs.coinmetrics.io/api/v4), allowing you to access [Coin Metrics data](https://docs.coinmetrics.io/) using Python. In just a few lines of code, anyone can access clean cryptocurrency data in a familiar form, such as a pandas dataframe.

This tool offers the following convenient features over simply using `requests` to query the Coin Metrics API:

- **Automatic Pagination**. The Coin Metrics API limits most endpoints to no more than 10,000 entries, requiring users to handle pagination. The Python API Client handles this automatically.
- **DataFrames**. Users may access Coin Metrics data using pandas DataFrames and potentially other data structures, such as polars.
- **Data Exports**. Users may export API outputs to CSV and JSON files.
- **Typing**. DataFrames are automatically converted to the appropriate data types.
- **Parallelization**. Users may submit many requests at once to extract data much more quickly than sending one request at a time.


# Getting Started

## Installation and Updates
To install the client you can run the following command:
```
pip install coinmetrics-api-client
```

Note that the client is updated regularly to reflect the changes made in [API v4](https://docs.coinmetrics.io/api/v4). Ensure that your latest version matches with what's in [pyPI](https://pypi.org/project/coinmetrics-api-client/) 

To update your version, run the following command:
```
pip install coinmetrics-api-client -U
```

## Initialization

To initialize the client you should use your API key, and the CoinMetricsClient class like the following.
```python
from coinmetrics.api_client import CoinMetricsClient
import os

# we recommend storing your Coin Metrics API key in an environment variable
api_key = os.environ.get("CM_API_KEY")
client = CoinMetricsClient(api_key)

# or to use community API:
client = CoinMetricsClient()
```
            

Raw data

            {
    "_id": null,
    "home_page": "https://coinmetrics.github.io/api-client-python/site/index.html",
    "name": "coinmetrics-api-client",
    "maintainer": null,
    "docs_url": null,
    "requires_python": "<4.0.0,>=3.9.0",
    "maintainer_email": null,
    "keywords": "coin metrics, coin, metrics, crypto, bitcoin, network-data, market-data, api, handy",
    "author": "Coin Metrics",
    "author_email": "info@coinmetrics.io",
    "download_url": "https://files.pythonhosted.org/packages/a1/09/a16431663857f29554511e27b4fe47f380dead3d72c7cd24d2520db62b27/coinmetrics_api_client-2025.9.3.18.tar.gz",
    "platform": null,
    "description": "<h1 align=\"center\"><b>Coin Metrics Python API Client</b></h1>\n\n<p align=\"center\">\n  <img src=\"assets/images/cm-dark-combination.png\">\n</p>\n\nThe **Coin Metrics Python API Client** is the official Python wrapper for the [Coin Metrics API](https://docs.coinmetrics.io/api/v4), allowing you to access [Coin Metrics data](https://docs.coinmetrics.io/) using Python. In just a few lines of code, anyone can access clean cryptocurrency data in a familiar form, such as a pandas dataframe.\n\nThis tool offers the following convenient features over simply using `requests` to query the Coin Metrics API:\n\n- **Automatic Pagination**. The Coin Metrics API limits most endpoints to no more than 10,000 entries, requiring users to handle pagination. The Python API Client handles this automatically.\n- **DataFrames**. Users may access Coin Metrics data using pandas DataFrames and potentially other data structures, such as polars.\n- **Data Exports**. Users may export API outputs to CSV and JSON files.\n- **Typing**. DataFrames are automatically converted to the appropriate data types.\n- **Parallelization**. Users may submit many requests at once to extract data much more quickly than sending one request at a time.\n\n\n# Getting Started\n\n## Installation and Updates\nTo install the client you can run the following command:\n```\npip install coinmetrics-api-client\n```\n\nNote that the client is updated regularly to reflect the changes made in [API v4](https://docs.coinmetrics.io/api/v4). Ensure that your latest version matches with what's in [pyPI](https://pypi.org/project/coinmetrics-api-client/) \n\nTo update your version, run the following command:\n```\npip install coinmetrics-api-client -U\n```\n\n## Initialization\n\nTo initialize the client you should use your API key, and the CoinMetricsClient class like the following.\n```python\nfrom coinmetrics.api_client import CoinMetricsClient\nimport os\n\n# we recommend storing your Coin Metrics API key in an environment variable\napi_key = os.environ.get(\"CM_API_KEY\")\nclient = CoinMetricsClient(api_key)\n\n# or to use community API:\nclient = CoinMetricsClient()\n```",
    "bugtrack_url": null,
    "license": "MIT",
    "summary": "Python client for Coin Metrics API v4.",
    "version": "2025.9.3.18",
    "project_urls": {
        "Documentation": "https://coinmetrics.github.io/api-client-python/site/index.html",
        "Homepage": "https://coinmetrics.github.io/api-client-python/site/index.html",
        "Repository": "https://github.com/coinmetrics/api-client-python"
    },
    "split_keywords": [
        "coin metrics",
        " coin",
        " metrics",
        " crypto",
        " bitcoin",
        " network-data",
        " market-data",
        " api",
        " handy"
    ],
    "urls": [
        {
            "comment_text": "",
            "digests": {
                "blake2b_256": "a1b8051c214c8078c9d14c92782bd73ecc29ac6378dae4666d198c2f2e4ad543",
                "md5": "923a000f1c59ce008dd0ea2214a8524e",
                "sha256": "a3e1325fe1e0aa09c302082d0c66b85beba3fbfe9f966ab5f40bd2481023e5f8"
            },
            "downloads": -1,
            "filename": "coinmetrics_api_client-2025.9.3.18-py3-none-any.whl",
            "has_sig": false,
            "md5_digest": "923a000f1c59ce008dd0ea2214a8524e",
            "packagetype": "bdist_wheel",
            "python_version": "py3",
            "requires_python": "<4.0.0,>=3.9.0",
            "size": 60500,
            "upload_time": "2025-09-03T18:18:28",
            "upload_time_iso_8601": "2025-09-03T18:18:28.111013Z",
            "url": "https://files.pythonhosted.org/packages/a1/b8/051c214c8078c9d14c92782bd73ecc29ac6378dae4666d198c2f2e4ad543/coinmetrics_api_client-2025.9.3.18-py3-none-any.whl",
            "yanked": false,
            "yanked_reason": null
        },
        {
            "comment_text": "",
            "digests": {
                "blake2b_256": "a109a16431663857f29554511e27b4fe47f380dead3d72c7cd24d2520db62b27",
                "md5": "34037bf9f74f7220479bab62c9bcddce",
                "sha256": "c302c8f2991d6263ffc1b9319d22c2cd0ae63c31d8d7cf517a8f41c9fd3cb2c8"
            },
            "downloads": -1,
            "filename": "coinmetrics_api_client-2025.9.3.18.tar.gz",
            "has_sig": false,
            "md5_digest": "34037bf9f74f7220479bab62c9bcddce",
            "packagetype": "sdist",
            "python_version": "source",
            "requires_python": "<4.0.0,>=3.9.0",
            "size": 149647,
            "upload_time": "2025-09-03T18:18:29",
            "upload_time_iso_8601": "2025-09-03T18:18:29.887138Z",
            "url": "https://files.pythonhosted.org/packages/a1/09/a16431663857f29554511e27b4fe47f380dead3d72c7cd24d2520db62b27/coinmetrics_api_client-2025.9.3.18.tar.gz",
            "yanked": false,
            "yanked_reason": null
        }
    ],
    "upload_time": "2025-09-03 18:18:29",
    "github": true,
    "gitlab": false,
    "bitbucket": false,
    "codeberg": false,
    "github_user": "coinmetrics",
    "github_project": "api-client-python",
    "travis_ci": false,
    "coveralls": false,
    "github_actions": false,
    "lcname": "coinmetrics-api-client"
}
        
Elapsed time: 0.44295s