Skip to main content
Paid Feature — Requires Starter plan or higherView pricing · Set API key

Overview

Retrieve historical price, volume, and market cap data for a token by its smart contract address.

Usage

coinpaprika-cli contract-history <platform_id> <address> --start <date> [options]

Arguments

platform_id
string
required
Platform ID (e.g., eth-ethereum, bnb-binance-coin)
address
string
required
Smart contract address

Options

--start
string
required
Start date in ISO format (e.g., 2024-01-01 or 2024-01-01T00:00:00Z)
--end
string
End date in ISO format (defaults to current time)
--interval
string
default:"24h"
Time interval: 5m, 15m, 30m, 1h, 6h, 12h, 24h, 7d, 30d
5-minute intervals require Starter+ plan
--limit
number
default:"50"
Maximum number of data points to return
--output
string
default:"table"
Output format: table or json
--raw
boolean
default:"false"
JSON output without _meta wrapper (for scripts/piping)

Examples

Get daily price history

coinpaprika-cli contract-history eth-ethereum \
  0xdac17f958d2ee523a2206206994597c13d831ec7 \
  --start 2024-01-01 --interval 24h --limit 30

Get hourly data for last week

coinpaprika-cli contract-history eth-ethereum \
  0xdac17f958d2ee523a2206206994597c13d831ec7 \
  --start 2024-03-01 --end 2024-03-08 --interval 1h

5-minute intervals (Starter+ only)

coinpaprika-cli contract-history eth-ethereum \
  0xdac17f958d2ee523a2206206994597c13d831ec7 \
  --start 2024-03-03T00:00:00Z --interval 5m --limit 100

JSON output for charting

coinpaprika-cli contract-history eth-ethereum \
  0xdac17f958d2ee523a2206206994597c13d831ec7 \
  --start 2024-01-01 --interval 24h \
  --output json --raw | jq '.[] | {date: .timestamp, price: .price}'

Response Fields

timestamp
string
ISO 8601 timestamp for the data point
price
number
Price at the given timestamp
volume_24h
number
24-hour trading volume
market_cap
number
Market capitalization at the given timestamp

API Endpoint

GET https://api-pro.coinpaprika.com/v1/contracts/{platform_id}/{address}/historical
Query Parameters:
  • start — ISO 8601 date/time
  • end — ISO 8601 date/time (optional)
  • interval — Time interval
  • limit — Max results

Plan Requirements

Available on:
  • Starter plan: 5m, 1h, 24h intervals
  • Business/Enterprise: All intervals + higher limits
Free tier: Use contract-ticker for current data only

contract-ticker

Get current ticker data by contract

ticker-history

Get historical ticker data by coin ID

Notes

  • Requires a valid API key from Starter plan or higher
  • Historical data availability depends on when the token was listed
  • 5-minute intervals are limited to recent data (last 30 days typically)
  • Use --limit to control data volume and API credits

Build docs developers (and LLMs) love