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.16.18.tar.gz (180.6 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.16.18-py3-none-any.whl (150.3 kB view details)

Uploaded Python 3

File details

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

File metadata

  • Download URL: coinmetrics_api_client-2026.4.16.18.tar.gz
  • Upload date:
  • Size: 180.6 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.16.18.tar.gz
Algorithm Hash digest
SHA256 764025db4b616cdc00ad488a364e6aa67fefda60d84a2ecb135db9e7fd89cb3f
MD5 658bf853e1727bb5193434d27086a4e9
BLAKE2b-256 69707c66fa37668e4e9b1d9d99be3e61798e13090011f37c249fcce0e2a2dc3b

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for coinmetrics_api_client-2026.4.16.18-py3-none-any.whl
Algorithm Hash digest
SHA256 47fbf6ffe7f680a73613412a355b30e9fd1b89b8bb82d5bf506fa3b54ceca47f
MD5 4a4c670a0823845ad1410447c1e85e39
BLAKE2b-256 5be842311832314c25b075a3e24595b13012b8fd096e73a976861ba69c2b732f

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