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.9.19.tar.gz (177.2 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.9.19-py3-none-any.whl (149.0 kB view details)

Uploaded Python 3

File details

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

File metadata

  • Download URL: coinmetrics_api_client-2026.4.9.19.tar.gz
  • Upload date:
  • Size: 177.2 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.9.19.tar.gz
Algorithm Hash digest
SHA256 19b0648bb5c53b5b9f742f3bc9fc286cb9419a26d2f2b6ef445f9063e26a293f
MD5 5ab683e183fa8a73b0154f84d9c6796d
BLAKE2b-256 62d99824e23a832f15592ab2779344deca2b3b7b3537e6c2e62d5474c7a21f5b

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for coinmetrics_api_client-2026.4.9.19-py3-none-any.whl
Algorithm Hash digest
SHA256 c4f612f44b36d425e8ebd89d94815884b9c99c9c75612cd443e954a526167392
MD5 0b28dfef92acffcd01dcd5ff73bdade5
BLAKE2b-256 2024c996942e6221e8f4daa2325c49a1a7ba8f5fb5a13afcc0b2b85d5319f2d6

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