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.2.9.18.tar.gz (151.4 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.2.9.18-py3-none-any.whl (62.7 kB view details)

Uploaded Python 3

File details

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

File metadata

  • Download URL: coinmetrics_api_client-2026.2.9.18.tar.gz
  • Upload date:
  • Size: 151.4 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: poetry/2.3.2 CPython/3.11.14 Linux/6.8.0-55-generic

File hashes

Hashes for coinmetrics_api_client-2026.2.9.18.tar.gz
Algorithm Hash digest
SHA256 e51fd9fc522db3370d01dc07921cebfc75aa4016d7b187fd1ee6fe1c6741106a
MD5 dd369fcbc9b6f7c7cd17dd0c93acee08
BLAKE2b-256 3bcbb1ed0304b2982fb8905d3184bc0934d75e7bd9e2fbad0a43cee9a78b64f3

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for coinmetrics_api_client-2026.2.9.18-py3-none-any.whl
Algorithm Hash digest
SHA256 5ec13025716044136010bd60eefb6d3377e1a62532d904f90fdab24abd82a2fa
MD5 8a84c3247090c6fc5e92b543a27f17fb
BLAKE2b-256 7289898b093afe98e060a3ee74548e0e5d997a99c8c82cdc69bbde41cf44cc25

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