> For the complete documentation index, see [llms.txt](https://gitbook-docs.coinmetrics.io/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://gitbook-docs.coinmetrics.io/python-api-client/reference/coinmetricsclient.md).

# CoinMetricsClient

`CoinMetricsClient` is the main entry point for the Python client. Instantiate it once with your API key and call the method that matches the Coin Metrics REST endpoint you want to hit; every method returns either a `DataCollection` (REST endpoints) or a `CmStream` (WebSocket endpoints).

```python
class coinmetrics.api_client.CoinMetricsClient(
    api_key='',
    verify_ssl_certs=True,
    proxy_url=None,
    session=None,
    debug_mode=False,
    verbose=False,
    host=None,
    port=None,
    schema='https',
    ignore_unsupported_errors=False,
    ignore_forbidden_errors=False,
    max_retries=5,
)
```

Bases: [`object`](https://docs.python.org/3/library/functions.html#object)

The CoinMetricsClient class is a Python wrapper for calling the Coin Metrics API.

* **Parameters:**
  * **api\_key** ([*str*](https://docs.python.org/3/library/stdtypes.html#str))
  * **verify\_ssl\_certs** ([*bool*](https://docs.python.org/3/library/functions.html#bool) *|* [*str*](https://docs.python.org/3/library/stdtypes.html#str))
  * **proxy\_url** ([*str*](https://docs.python.org/3/library/stdtypes.html#str) *|* *None*)
  * **session** (*Session* *|* *None*)
  * **debug\_mode** ([*bool*](https://docs.python.org/3/library/functions.html#bool))
  * **verbose** ([*bool*](https://docs.python.org/3/library/functions.html#bool))
  * **host** ([*str*](https://docs.python.org/3/library/stdtypes.html#str) *|* *None*)
  * **port** ([*int*](https://docs.python.org/3/library/functions.html#int) *|* *None*)
  * **schema** ([*str*](https://docs.python.org/3/library/stdtypes.html#str))
  * **ignore\_unsupported\_errors** ([*bool*](https://docs.python.org/3/library/functions.html#bool))
  * **ignore\_forbidden\_errors** ([*bool*](https://docs.python.org/3/library/functions.html#bool))
  * **max\_retries** ([*int*](https://docs.python.org/3/library/functions.html#int) *|* *None*)

## Endpoints

Methods are grouped by endpoint root. For example, every `catalog-v2/*` request lives under **Catalog v2** and every `timeseries/*` request lives under **Time Series**.


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

## Querying This Documentation
If you need additional information that is not directly available in this page, you can query the documentation by asking a question.

Perform an HTTP GET request on the following URL with the `ask` and `goal` query parameters:

```
GET https://gitbook-docs.coinmetrics.io/python-api-client/reference/coinmetricsclient.md?ask=<question>&goal=<user_goal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is what the user is ultimately trying to achieve, the reason they need the answer. Sharing it helps GitBook give you a better, more relevant answer. A goal is most helpful when it describes the outcome the user wants rather than restating the question. For example, with `ask=how do I create an API token`, a goal like `automate deployments from our CI pipeline` lets GitBook tailor the answer to that use case.

The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
