Chart Data
Get Chart Data
Retrieve underlying data for a specific chart
GET
/
v1
/
charts
/
{visualizationId}
/
data
Get Chart Data
curl --request GET \
--url https://api.blockworks.com/v1/charts/{visualizationId}/data \
--header 'x-api-key: <api-key>'import requests
url = "https://api.blockworks.com/v1/charts/{visualizationId}/data"
headers = {"x-api-key": "<api-key>"}
response = requests.get(url, headers=headers)
print(response.text)const options = {method: 'GET', headers: {'x-api-key': '<api-key>'}};
fetch('https://api.blockworks.com/v1/charts/{visualizationId}/data', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));{
"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
}
],
"total": 123,
"page": 123
}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 to fetch a list of charts or open the chart on https://app.blockworksresearch.com/analytics to grab the id from its URL.Example Request
curl -H "x-api-key: YOUR_API_KEY" \
"https://api.blockworks.com/v1/charts/3/data?limit=5&page=1"
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()
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()
Example Response
{
"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
selectparameter to limit response to specific columns for better performance. - Large datasets are paginated — use
limitandpagefor navigation.
See also
Authorizations
Path Parameters
Query Parameters
Required range:
1 <= x <= 2147483647Required range:
1 <= x <= 100000Maximum string length:
255Maximum string length:
255Maximum string length:
255Available options:
asc, desc