Skip to main content

Python client for Coin Metrics API v4.

Project description

Coin Metrics Python API Client

The Coin Metrics Python API Client is the official Python wrapper for the Coin Metrics API, allowing you to access Coin Metrics data 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. Ensure that your latest version matches with what's in pyPI

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.

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()

Project details


Release history Release notifications | RSS feed

Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

coinmetrics_api_client-2026.4.30.17.tar.gz (183.9 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

coinmetrics_api_client-2026.4.30.17-py3-none-any.whl (152.9 kB view details)

Uploaded Python 3

File details

Details for the file coinmetrics_api_client-2026.4.30.17.tar.gz.

File metadata

  • Download URL: coinmetrics_api_client-2026.4.30.17.tar.gz
  • Upload date:
  • Size: 183.9 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: poetry/1.8.4 CPython/3.11.15 Linux/6.8.0-110-generic

File hashes

Hashes for coinmetrics_api_client-2026.4.30.17.tar.gz
Algorithm Hash digest
SHA256 048dc62ec5244a1525bd5ed81d4513634c541c818290feaa8909439adbdf5533
MD5 0eedefcb14ed9aebfd30c8effd547295
BLAKE2b-256 7b7c24639cf42090918f51e0fbcd9e0c14d7d95710f0814ed07a2013738620f1

See more details on using hashes here.

File details

Details for the file coinmetrics_api_client-2026.4.30.17-py3-none-any.whl.

File metadata

File hashes

Hashes for coinmetrics_api_client-2026.4.30.17-py3-none-any.whl
Algorithm Hash digest
SHA256 1938020799e94ff42c9cde231c47baac6080b32922d0cf8b957e841aaf208738
MD5 b0ab87d8cbb90be1e8fa9ec0d2131713
BLAKE2b-256 92537ec93c926e21ab0f1c7e6d41a7373737912cc387b82f091297bee2ba9738

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page