On-Chain Data

Request ChartInspect on-chain time series, snapshots, field projections, CSV, and published resolutions.

text
GET /api/v1/onchain/{metric}?chain={asset_id}

On-chain data requires a Pro key with on-chain permission.

curl -H "x-api-key: YOUR_API_KEY" \
  "https://chartinspect.com/api/v1/onchain/mvrv-z-score?chain=bitcoin&days=365&limit=1000"

#Parameters

The generic route supports days, limit, chain, startDate, endDate, format, and fields. Metrics with published alternate files also advertise dataResolution. Dedicated metric routes can support fewer parameters, so check the generated reference.

The shared defaults and bounds are:

ParameterBehavior
chainDefaults to bitcoin
limitDefaults to 10,000 and cannot exceed 10,000
daysCannot exceed 3,650
startDate, endDateInclusive YYYY-MM-DD bounds; explicit dates take precedence over days
fieldsComma-separated projection; available date and timestamp keys are retained
formatjson, or csv when the endpoint advertises it
dataResolutionExact published token; unsupported pairs return 404

#Exact Metric Matching

The route accepts exact manifest IDs plus documented hyphen, underscore, and compatibility aliases. It does not use substring matching. This prevents a misspelled paid metric from silently returning a different series.

#JSON

Most generic metric responses contain an array of rows plus metadata. The fields differ by metric and asset. Price columns may use price, a legacy btc_price, or an asset-specific name. Use metric discovery or the generated reference, not a universal row type.

#CSV

curl -H "x-api-key: YOUR_API_KEY" \
  "https://chartinspect.com/api/v1/onchain/mvrv-z-score?chain=bitcoin&format=csv" \
  --output mvrv-z-score.csv

CSV is available only when format is advertised. Snapshot and dedicated routes may intentionally remain JSON-only.

#Resolutions

curl -H "x-api-key: YOUR_API_KEY" \
  "https://chartinspect.com/api/v1/onchain/mvrv-z-score?chain=bitcoin&dataResolution=hour1&days=30"

There is no silent daily fallback. Use the resolution matrix first and handle availableResolutions on a 404 response.

Was this page helpful?