# 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: Querying This Documentation

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

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

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

The question should be specific, self-contained, and written in natural language.
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.
