Skip to main content

Overview

Retrieve Open, High, Low, Close, and Volume (OHLCV) data for a specific coin for the last completed day. This endpoint provides daily candle data for the most recent full 24-hour period.

Usage

coinpaprika-cli ohlcv-latest <coin_id> [OPTIONS]

Arguments

coin_id
string
required
The unique identifier for the coin in format symbol-name (e.g., btc-bitcoin, eth-ethereum)

Options

quote
string
default:"usd"
Quote currency for price data. Common values: usd, btc, eth
output
string
default:"table"
Output format: table or json
raw
boolean
default:"false"
Output raw JSON without metadata wrapper (useful for scripting)

Examples

Get latest OHLCV for Bitcoin

coinpaprika-cli ohlcv-latest btc-bitcoin

Get latest OHLCV for Ethereum in BTC

coinpaprika-cli ohlcv-latest eth-ethereum --quote btc

Get latest OHLCV as JSON

coinpaprika-cli ohlcv-latest btc-bitcoin --output json

Get raw JSON for scripting

coinpaprika-cli ohlcv-latest btc-bitcoin --output json --raw

Response

The command returns OHLCV data for the last complete day:
[
  {
    "time_open": "2024-01-01T00:00:00Z",
    "time_close": "2024-01-01T23:59:59Z",
    "open": 42150.50,
    "high": 42800.25,
    "low": 41900.10,
    "close": 42500.75,
    "volume": 25000000000,
    "market_cap": 830000000000
  }
]

Response Fields

time_open
string
ISO 8601 timestamp when the candle period opened
time_close
string
ISO 8601 timestamp when the candle period closed
open
number
Opening price at the start of the period
high
number
Highest price during the period
low
number
Lowest price during the period
close
number
Closing price at the end of the period
volume
number
Total trading volume during the period
market_cap
number
Market capitalization at the end of the period

Notes

  • This endpoint returns data for the last full day only (completed 24-hour period)
  • For today’s incomplete data, use the ohlcv-today command
  • For historical OHLCV data, use the ohlcv command
  • All values may be null if data is unavailable
  • Available on free tier

Build docs developers (and LLMs) love