Skip to main content
GET
/
bulk
/
v1
/
datasets
/
{datasetSlug}
/
{granularity}
/
data
cURL
curl --request GET \
  --url https://api.messari.io/bulk/v1/datasets/{datasetSlug}/{granularity}/data \
  --header 'x-messari-api-key: <api-key>'
"asset_id,timestamp,price_usd,market_cap_usd\nbtc,2024-01-01T00:00:00Z,42500.50,834215000000\neth,2024-01-01T00:00:00Z,2250.75,270500000000\n"

Overview

Downloads bulk timeseries data for a specific dataset at the specified granularity. The data is streamed directly as a file in either CSV or JSONL format, making it ideal for large-scale data downloads.

Path Parameters

  • datasetSlug (required): The slug identifier of the dataset to download. Use the Get Available Datasets endpoint to discover available dataset slugs.
  • granularity (required): The time interval for the data points. Available options: 5m, 15m, 30m, 1h, 1d

Query Parameters

  • rangeStart (required): Start of the time range in ISO 8601 format (e.g., 2024-01-01T00:00:00Z)
  • rangeEnd (required): End of the time range in ISO 8601 format (e.g., 2024-12-31T23:59:59Z)
  • format (optional): Output format - either csv (default) or jsonl

Output Formats

CSV Format

Comma-separated values with a header row. Compatible with Excel, Google Sheets, pandas, and most data analysis tools.
asset_id,timestamp,price_usd,market_cap_usd,volume_24h
btc,2024-01-01T00:00:00Z,42500.50,834215000000,18234567890
eth,2024-01-01T00:00:00Z,2250.75,270500000000,8945123456

JSONL Format

JSON Lines format with one JSON object per line. Ideal for streaming processing and database imports.
{"asset_id":"btc","timestamp":"2024-01-01T00:00:00Z","price_usd":42500.50,"market_cap_usd":834215000000,"volume_24h":18234567890}
{"asset_id":"eth","timestamp":"2024-01-01T00:00:00Z","price_usd":2250.75,"market_cap_usd":270500000000,"volume_24h":8945123456}

Time Range Limits

To prevent excessive data downloads, time ranges are limited based on granularity:
  • 5m, 15m, 30m: Maximum 30 days per request
  • 1h: Maximum 90 days per request
  • 1d: Maximum 365 days per request
For larger time ranges, make multiple requests with different date ranges.

Usage Examples

Download CSV Data

curl -X GET "https://api.messari.io/bulk/v1/datasets/asset_price/1d/data?rangeStart=2024-01-01T00:00:00Z&rangeEnd=2024-12-31T23:59:59Z&format=csv" \
  -H "x-messari-api-key: YOUR_API_KEY" \
  -o asset_price_data.csv

Download JSONL Data

curl -X GET "https://api.messari.io/bulk/v1/datasets/asset_price/1h/data?rangeStart=2024-01-01T00:00:00Z&rangeEnd=2024-01-31T23:59:59Z&format=jsonl" \
  -H "x-messari-api-key: YOUR_API_KEY" \
  -o asset_price_data.jsonl

Python Example with pandas

import pandas as pd
import requests

url = "https://api.messari.io/bulk/v1/datasets/asset_price/1d/data"
params = {
    "rangeStart": "2024-01-01T00:00:00Z",
    "rangeEnd": "2024-12-31T23:59:59Z",
    "format": "csv"
}
headers = {"x-messari-api-key": "YOUR_API_KEY"}

response = requests.get(url, params=params, headers=headers)
df = pd.read_csv(pd.io.common.BytesIO(response.content))
print(df.head())

Response Headers

The response includes helpful headers:
  • Content-Type: text/csv; charset=utf-8 or application/x-ndjson
  • Content-Disposition: Suggests a filename for the download (e.g., asset_price_1d_2024-01-01_2024-12-31.csv)
  • Content-Encoding: gzip if compression is applied

Error Responses

400 Bad Request

  • Invalid date format
  • End date before start date
  • Time range exceeds maximum allowed for the granularity
  • Invalid format parameter

403 Forbidden

  • Your subscription tier does not have access to this dataset

404 Not Found

  • Dataset slug does not exist
  • Granularity not supported for this dataset

Best Practices

  1. Start with the datasets catalog: Always check available datasets first to see supported granularities
  2. Respect time range limits: Break large downloads into smaller time windows
  3. Use appropriate granularity: Choose the coarsest granularity that meets your needs to reduce data transfer
  4. Handle errors gracefully: Implement retry logic for transient network errors
  5. Store data efficiently: Consider using columnar formats like Parquet for long-term storage after download

Authorizations

x-messari-api-key
string
header
required

API key for authentication. Get your key at https://messari.io/account/api

Path Parameters

datasetSlug
enum<string>
required

Dataset slug identifier. Use /bulk/v1/datasets to see all available datasets.

Available options:
asset-price,
market
granularity
enum<string>
required

Data granularity interval

Available options:
5m,
15m,
30m,
1h,
1d

Query Parameters

rangeStart
string<date-time>
required

Start of time range in ISO 8601 format

Example:

"2024-01-01T00:00:00Z"

rangeEnd
string<date-time>
required

End of time range in ISO 8601 format

Example:

"2024-12-31T23:59:59Z"

format
enum<string>
default:csv

Output format for the data

Available options:
csv,
jsonl

Response

Successfully generated and streaming bulk data file

The response is of type file.