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.2.14.tar.gz (172.3 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.2.14-py3-none-any.whl (148.7 kB view details)

Uploaded Python 3

File details

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

File metadata

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

File hashes

Hashes for coinmetrics_api_client-2026.4.2.14.tar.gz
Algorithm Hash digest
SHA256 6094f99038e7b96b4b4a4142ed6c591031e2384683038d3fb57d73881c7060c4
MD5 6903ca3e31b98a891c89bce755daf620
BLAKE2b-256 1c7599abe336aa7bbe270ee1473473ec372ca4c843b36ebe9636f6f0b5056f4c

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for coinmetrics_api_client-2026.4.2.14-py3-none-any.whl
Algorithm Hash digest
SHA256 071ffafe0cdf024ff856d49857e38a4c51eacaa2fba4ed9843f4850070bac8fd
MD5 5a918803c68bac15d38aea2567861694
BLAKE2b-256 8d29444fff3aecf6cd40499d79e51966d85625312904b73d6327242bd9b91f61

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