> ## Documentation Index
> Fetch the complete documentation index at: https://docs.blockworksresearch.com/llms.txt
> Use this file to discover all available pages before exploring further.

# Get Chart Data

> Retrieve underlying data for a specific chart

## Overview

Fetch chart data by **chart ID**. This endpoint returns the underlying data powering charts and visualizations, with support for pagination, filtering,
and sorting. Use [List Charts](/api-reference/charts/list) to fetch a list of charts or open the chart on [https://app.blockworksresearch.com/analytics](https://app.blockworksresearch.com/analytics) to grab the id from its URL.

## Example Request

<CodeGroup>
  ```bash cURL theme={null}
  curl -H "x-api-key: YOUR_API_KEY" \
    "https://api.blockworks.com/v1/charts/3/data?limit=5&page=1"
  ```

  ```typescript TypeScript theme={null}
  const res = await fetch(
    'https://api.blockworks.com/v1/charts/3/data?limit=5&page=1',
    { headers: { 'x-api-key': 'YOUR_API_KEY' } }
  )
  const data = await res.json()
  ```

  ```python Python theme={null}
  import requests

  r = requests.get(
    'https://api.blockworks.com/v1/charts/3/data',
    headers={'x-api-key': 'YOUR_API_KEY'},
    params={'limit': 5, 'page': 1}
  )
  data = r.json()
  ```
</CodeGroup>

## Example Response

```json theme={null}
{
  "data": [
    {
      "dt": "2024-11-12T00:00:00.000Z",
      "btc_block_subsidy_usd": 40198390.03341997,
      "btc_profit": -38437320.788166374,
      "btc_txn_fees": 1761069.2452535906,
      "eth_block_subsidy_usd": 8466344.28558703,
      "eth_profit": 4042623.518063875,
      "eth_txn_fees": 12508967.803650904,
      "sol_block_subsidy_usd": 10791912.603590423,
      "sol_profit": -7419646.687582968,
      "sol_txn_fees": 3372265.916007456
    },
    {
      "dt": "2024-11-11T00:00:00.000Z",
      "btc_block_subsidy_usd": 35340104.40711805,
      "btc_profit": -34074762.00707391,
      "btc_txn_fees": 1265342.400044142,
      "eth_block_subsidy_usd": 8466344.28558703,
      "eth_profit": 2332989.5209395904,
      "eth_txn_fees": 10799333.80652662,
      "sol_block_subsidy_usd": 15086224.226297095,
      "sol_profit": -9486892.245268073,
      "sol_txn_fees": 5599331.9810290225
    }
  ],
  "page": 1,
  "total": 3386
}
```

## Supported Options

| Name                             | Type  | Details                                                     |
| -------------------------------- | ----- | ----------------------------------------------------------- |
| `visualizationIdOrDashboardSlug` | path  | The ID of the visualization or dashboard slug.              |
| `limit`                          | query | Number of data points to return (1-100000, default: 10000). |
| `page`                           | query | Page number for pagination (default: 1).                    |
| `search`                         | query | Search term to filter data.                                 |
| `select`                         | query | Array of column names to include in response.               |
| `order_by`                       | query | Column name to sort by.                                     |
| `order_dir`                      | query | Sort direction: "asc" or "desc" (default: "asc").           |

## Notes

* **Data structure varies by chart** — each chart returns different columns based on its configuration.
* Common fields include `dt` (datetime) and various metric columns with descriptive names.
* Use `select` parameter to limit response to specific columns for better performance.
* Large datasets are paginated — use `limit` and `page` for navigation.

## See also

* [List Charts](/api-reference/charts/list)
* [Get Chart Data with Slug](/api-reference/charts/get-data-with-slug)


## OpenAPI

````yaml GET /v1/charts/{visualizationId}/data
openapi: 3.0.0
info:
  title: Blockworks API
  description: ''
  version: 1.0.0
  contact: {}
servers:
  - url: https://api.blockworks.com
security:
  - x-api-key: []
tags: []
paths:
  /v1/charts/{visualizationId}/data:
    get:
      tags:
        - Charts
      summary: Get Chart Data
      description: Retrieve data for a specific chart or dashboard visualization
      operationId: ChartsController_getData
      parameters:
        - name: visualizationId
          required: true
          in: path
          schema:
            type: string
        - name: page
          required: false
          in: query
          schema:
            minimum: 1
            maximum: 2147483647
            default: 1
            type: integer
        - name: limit
          required: false
          in: query
          schema:
            type: integer
            minimum: 1
            maximum: 100000
            default: 10000
        - name: search
          required: false
          in: query
          schema:
            type: string
            maxLength: 255
        - name: select
          required: false
          in: query
          schema:
            type: array
            items:
              type: string
              maxLength: 255
        - name: order_by
          required: false
          in: query
          schema:
            type: string
            maxLength: 255
        - name: order_dir
          required: false
          in: query
          schema:
            default: asc
            enum:
              - asc
              - desc
            type: string
      responses:
        '200':
          description: Successful response
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ChartDataPageResponse'
        '400':
          description: Bad Request
      security:
        - x-api-key: []
components:
  schemas:
    ChartDataPageResponse:
      type: object
      description: >-
        Chart data response with dynamic columns. Each chart returns different
        data structure based on its configuration. Common fields include 'dt'
        (datetime) and various metric columns.
      properties:
        data:
          type: array
          items:
            type: object
            additionalProperties: true
            example:
              dt: '2024-11-12T00:00:00.000Z'
              btc_block_subsidy_usd: 40198390.03341997
              btc_profit: -38437320.788166374
              btc_txn_fees: 1761069.2452535906
              eth_block_subsidy_usd: 8466344.28558703
              eth_profit: 4042623.518063875
              eth_txn_fees: 12508967.803650904
        total:
          type: integer
        page:
          type: integer
      required:
        - data
        - total
        - page
  securitySchemes:
    x-api-key:
      type: apiKey
      in: header
      name: x-api-key

````