Skip to main content
This is a PAID feature requiring a Starter plan or higher. View pricing

Overview

Returns historical Open-High-Low-Close-Volume (OHLCV) candlestick data for a specific cryptocurrency. Essential for technical analysis and charting.

Usage

coinpaprika-cli ohlcv <COIN_ID> --start <START_DATE> [OPTIONS]

Parameters

coin_id
string
required
Coin ID in format symbol-name (e.g., btc-bitcoin)
--start
string
required
Start date in ISO format (e.g., 2024-01-01, 2024-01-01T00:00:00Z)
--end
string
End date in ISO format (defaults to current date if not specified)
--interval
string
default:"24h"
Candle interval: 5m, 15m, 30m, 1h, 6h, 12h, 24h
--limit
number
default:"50"
Maximum number of candles to return
--quote
string
default:"usd"
Quote currency (e.g., usd, btc, eth)
--output
string
default:"table"
Output format: table or json
--raw
boolean
default:"false"
Show raw JSON response without wrapper metadata

Examples

Get Bitcoin daily candles for January 2024

coinpaprika-cli ohlcv btc-bitcoin --start 2024-01-01 --end 2024-01-31

Get Ethereum hourly candles

coinpaprika-cli ohlcv eth-ethereum --start 2024-01-01 --interval 1h --limit 24

Get Solana 15-minute candles

coinpaprika-cli ohlcv sol-solana --start 2024-03-01 --interval 15m --limit 100

Get OHLCV data in JSON format

coinpaprika-cli ohlcv btc-bitcoin --start 2024-01-01 --output json

Example Output

Table Format

┌─────────────────────┬─────────────┬─────────────┬─────────────┬─────────────┬──────────────┬──────────────┐
│ Time Open           │ Open        │ High        │ Low         │ Close       │ Volume       │ Market Cap   │
├─────────────────────┼─────────────┼─────────────┼─────────────┼─────────────┼──────────────┼──────────────┤
│ 2024-01-01 00:00:00 │ $42,000.00  │ $42,500.00  │ $41,800.00  │ $42,156.78  │ $18.2B       │ $825.3B      │
│ 2024-01-02 00:00:00 │ $42,156.78  │ $43,500.00  │ $42,000.00  │ $43,234.56  │ $19.8B       │ $846.1B      │
│ 2024-01-03 00:00:00 │ $43,234.56  │ $44,800.00  │ $43,100.00  │ $44,567.89  │ $22.4B       │ $872.4B      │
│ 2024-01-04 00:00:00 │ $44,567.89  │ $45,200.00  │ $43,500.00  │ $43,890.12  │ $20.1B       │ $859.2B      │
│ 2024-01-05 00:00:00 │ $43,890.12  │ $45,600.00  │ $43,800.00  │ $45,123.45  │ $24.6B       │ $883.5B      │
└─────────────────────┴─────────────┴─────────────┴─────────────┴─────────────┴──────────────┴──────────────┘

JSON Format

[
  {
    "time_open": "2024-01-01T00:00:00Z",
    "time_close": "2024-01-01T23:59:59Z",
    "open": 42000.00,
    "high": 42500.00,
    "low": 41800.00,
    "close": 42156.78,
    "volume": 18200000000,
    "market_cap": 825300000000
  },
  {
    "time_open": "2024-01-02T00:00:00Z",
    "time_close": "2024-01-02T23:59:59Z",
    "open": 42156.78,
    "high": 43500.00,
    "low": 42000.00,
    "close": 43234.56,
    "volume": 19800000000,
    "market_cap": 846100000000
  }
]

Response Fields

FieldTypeDescription
time_openstringCandle opening time (ISO 8601 format)
time_closestringCandle closing time (ISO 8601 format)
opennumberOpening price
highnumberHighest price during period
lownumberLowest price during period
closenumberClosing price
volumenumberTrading volume during period
market_capnumberMarket cap at close

API Endpoint

GET https://api.coinpaprika.com/v1/coins/{coin_id}/ohlcv/historical
  ?start={start}
  &end={end}
  &interval={interval}
  &limit={limit}
  &quote={quote}

Supported Intervals

IntervalDescriptionMax History
5m5 minutes1 week
15m15 minutes2 weeks
30m30 minutes1 month
1h1 hour3 months
6h6 hours1 year
12h12 hours2 years
24h1 dayAll history

Rate Limits

This endpoint requires authentication and is subject to plan-specific rate limits:
  • Starter: 25,000 requests/month
  • Pro: 150,000 requests/month
  • Business: 500,000 requests/month

Common Use Cases

  • Building candlestick charts
  • Technical analysis (moving averages, RSI, MACD)
  • Algorithmic trading strategies
  • Pattern recognition and backtesting
  • Custom trading indicators

Build docs developers (and LLMs) love