Skip to main content

Commands Overview

OHLCV commands provide candlestick data for charting and technical analysis:
  • ohlcv - Historical OHLCV data (paid feature)
  • ohlcv-latest - Latest full day OHLCV
  • ohlcv-today - Today’s incomplete OHLCV

Historical OHLCV

PAID FEATURE: Requires Starter plan or higher. See pricing plans.
coinpaprika-cli ohlcv <COIN_ID> --start <DATE> [OPTIONS]
Get historical OHLCV (candlestick) data with various time intervals.

Arguments

  • <COIN_ID> - Coin identifier (e.g., btc-bitcoin)

Options

  • --start <DATE> - Start date in ISO format (e.g., 2024-01-01) [Required]
  • --end <DATE> - End date in ISO format (optional)
  • --interval <INTERVAL> - Time interval (default: 24h)
  • --limit <NUMBER> - Maximum number of results (default: 50)
  • --quote <CURRENCY> - Quote currency (default: usd)

Available Intervals

  • 5m - 5 minutes (requires paid plan)
  • 15m - 15 minutes (requires paid plan)
  • 30m - 30 minutes (requires paid plan)
  • 1h - 1 hour (requires paid plan)
  • 6h - 6 hours (requires paid plan)
  • 12h - 12 hours (requires paid plan)
  • 24h - 24 hours (1 day)

Examples

coinpaprika-cli ohlcv btc-bitcoin \
  --start 2024-01-01 \
  --interval 24h \
  --limit 30

Response Fields

  • time_open - Candle open time (ISO 8601)
  • time_close - Candle close time (ISO 8601)
  • open - Opening price
  • high - Highest price in period
  • low - Lowest price in period
  • close - Closing price
  • volume - Trading volume in period
  • market_cap - Market cap at close

Latest OHLCV

coinpaprika-cli ohlcv-latest <COIN_ID> [OPTIONS]
Get OHLCV data for the last full day (yesterday if today is incomplete).

Arguments

  • <COIN_ID> - Coin identifier

Options

  • --quote <CURRENCY> - Quote currency (default: usd)

Examples

coinpaprika-cli ohlcv-latest btc-bitcoin

Use Case

Get the most recent complete 24-hour candle without specifying dates:
# Quick daily summary
coinpaprika-cli ohlcv-latest btc-bitcoin

Today’s OHLCV

coinpaprika-cli ohlcv-today <COIN_ID> [OPTIONS]
Get OHLCV data for today (current incomplete day).

Arguments

  • <COIN_ID> - Coin identifier

Options

  • --quote <CURRENCY> - Quote currency (default: usd)

Examples

coinpaprika-cli ohlcv-today btc-bitcoin

Use Case

Track intraday performance:
# Monitor today's range
coinpaprika-cli ohlcv-today btc-bitcoin
The “today” candle is incomplete and updates throughout the day.

Practical Examples

Build a Price Chart

# Get 90 days of daily candles
coinpaprika-cli ohlcv btc-bitcoin \
  --start $(date -d '90 days ago' +%Y-%m-%d) \
  --interval 24h \
  --limit 90 \
  --output json --raw > btc-ohlcv-90d.json

Calculate Daily Returns

# Get week of data and calculate returns
coinpaprika-cli ohlcv btc-bitcoin \
  --start $(date -d '7 days ago' +%Y-%m-%d) \
  --interval 24h \
  --output json --raw | \
  jq '.[] | {date: .time_close, return: ((.close - .open) / .open * 100)}'

Find High/Low Range

# Get 24-hour high and low
data=$(coinpaprika-cli ohlcv-latest btc-bitcoin --output json --raw)
echo "High: $(echo $data | jq -r '.[0].high')"
echo "Low: $(echo $data | jq -r '.[0].low')"

Intraday Trading Data

# 15-minute candles for today (paid plan)
coinpaprika-cli ohlcv btc-bitcoin \
  --start $(date +%Y-%m-%d) \
  --interval 15m \
  --limit 100

Volume Analysis

# Compare volumes across days
coinpaprika-cli ohlcv btc-bitcoin \
  --start $(date -d '30 days ago' +%Y-%m-%d) \
  --limit 30 \
  --output json --raw | \
  jq '.[] | {date: .time_close, volume: .volume}'

Supported Quote Currencies

  • usd - US Dollar (most common)
  • btc - Bitcoin
  • eth - Ethereum
  • Other major cryptocurrencies
# Get Ethereum price in Bitcoin
coinpaprika-cli ohlcv eth-ethereum --start 2024-01-01 --quote btc

Data Availability

Free Tier

  • Daily OHLCV: Up to 1 year back
  • Hourly OHLCV: Last 24 hours only
  • Intervals: 24h only
  • Ticker History: Not available
  • Full historical data: All available history
  • 5-minute intervals: Detailed intraday data
  • All intervals: 5m, 15m, 30m, 1h, 6h, 12h, 24h
  • Ticker history: Included
Run coinpaprika-cli plans for details.

Comparison: OHLCV vs Ticker History

FeatureOHLCVTicker History
Data TypeCandlestick (OHLCV)Price snapshots
Best ForCharting, technical analysisTime-series analysis
FieldsOpen, high, low, close, volumePrice, volume, market cap
Intervals5m to 24h5m to 30d
Free TierLatest/today onlyNot available
Paid PlansFull historyFull history

When to Use Each

Use OHLCV when:
  • Building price charts
  • Performing technical analysis
  • Need high/low ranges
  • Calculating candlestick patterns
Use Ticker History when:
  • Need exact timestamps
  • Tracking market cap changes
  • Comparing multiple metrics
  • Building time-series models

API Details

  • Historical OHLCV: /coins/{coin_id}/ohlcv/historical (paid)
  • Latest OHLCV: /coins/{coin_id}/ohlcv/latest
  • Today OHLCV: /coins/{coin_id}/ohlcv/today
  • Method: GET
  • Rate Limit: Counts toward your monthly limit

Build docs developers (and LLMs) love