> 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/data-collection/parallel.md).

# DataCollection.parallel

```python
coinmetrics._data_collection.DataCollection.parallel(
    parallelize_on=None,
    executor=None,
    max_workers=None,
    progress_bar=None,
    time_increment=None,
    height_increment=None,
)
```

Convert this [`DataCollection`](https://gitbook-docs.coinmetrics.io/python-api-client/reference/data-collection/pages/xfhfweQfdRu1PKsB5acj#coinmetrics._data_collection.DataCollection) into a [`ParallelDataCollection`](https://gitbook-docs.coinmetrics.io/python-api-client/reference/data-collection/pages/c1wF821ZUobyBKenTdv2#coinmetrics._data_collection.ParallelDataCollection), splitting a single HTTP request into many parallel requests for faster data export.

By default the request is split on the primary query parameter (for example, `get_asset_metrics(assets=...)` is split into one request per asset).

* **Parameters:**
  * **parallelize\_on** (*Optional* \*\[\**Union* *\[*[*str*](https://docs.python.org/3/library/stdtypes.html#str) *,* *List* *\[*[*str*](https://docs.python.org/3/library/stdtypes.html#str) *]* *]* *]*) -- Parameter(s) to parallelize on. Must be one of the list-type parameters of the underlying endpoint (`assets`, `markets`, `metrics`, ...).
  * **executor** (*Optional* \*\[\**Callable* *\[* \*\[\**Any* *]* *,* [*concurrent.futures.Executor*](https://docs.python.org/3/library/concurrent.futures.html#concurrent.futures.Executor) *]* *]*) -- Executor class used for concurrency. Defaults to [`concurrent.futures.ThreadPoolExecutor`](https://docs.python.org/3/library/concurrent.futures.html#concurrent.futures.ThreadPoolExecutor); pass a [`ProcessPoolExecutor`](https://docs.python.org/3/library/concurrent.futures.html#concurrent.futures.ProcessPoolExecutor) (or any other `Executor` subclass) to swap it out.
  * **max\_workers** (*Optional* *\[*[*int*](https://docs.python.org/3/library/functions.html#int) *]*) -- Number of parallel workers. Defaults to `10` and is capped at `10` to respect API rate limits.
  * **progress\_bar** (*Optional* *\[*[*bool*](https://docs.python.org/3/library/functions.html#bool) *]*) -- Whether to display a `tqdm` progress bar while the workers run. Defaults to `True`.
  * **time\_increment** (*Optional* \*\[\**Union* \*\[\**relativedelta* *,* *timedelta* *,* *DateOffset* *]* *]*) -- Optionally split the request along the time axis as well. Use [`datetime.timedelta`](https://docs.python.org/3/library/datetime.html#datetime.timedelta) for sub-month windows and `dateutil.relativedelta.relativedelta` for month / year windows. Requires `start_time` to be set on the original request.
  * **height\_increment** (*Optional* *\[*[*int*](https://docs.python.org/3/library/functions.html#int) *]*) -- Optionally split the request along the block-height axis. Requires `start_height` to be set on the original request.
* **Returns:** A [`ParallelDataCollection`](https://gitbook-docs.coinmetrics.io/python-api-client/reference/data-collection/pages/c1wF821ZUobyBKenTdv2#coinmetrics._data_collection.ParallelDataCollection) that mirrors the original request but executes its workload across multiple workers.

**Returns:**

* [ParallelDataCollection](https://gitbook-docs.coinmetrics.io/python-api-client/reference/data-collection/pages/c1wF821ZUobyBKenTdv2#coinmetrics._data_collection.ParallelDataCollection)


---

# 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/data-collection/parallel.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.
