Skip to main content
Version: v4

historical

Get historical price data for cryptocurrency pair(s) within a provider.

Examples​

from openbb import obb
obb.crypto.price.historical(symbol='BTCUSD')
obb.crypto.price.historical(symbol='BTCUSD', start_date='2024-01-01', end_date='2024-01-31')
# Get monthly historical prices from Yahoo Finance for Ethereum.
obb.crypto.price.historical(symbol='ETH-USD', interval='1m', start_date='2024-01-01', end_date='2024-12-31')

Parameters​

symbol: str | list[str]
Symbol to get data for. Multiple items allowed for provider(s): fmp, tiingo, yfinance.

start_date: date | None | str
Start date of the data, in YYYY-MM-DD format.

end_date: date | None | str
End date of the data, in YYYY-MM-DD format.


Returns​

results: CryptoHistorical

Serializable results.

provider: Optional[Literal['fmp', 'tiingo', 'yfinance']]

Provider name.

warnings: Optional[list[Warning_]]

list of warnings.

chart: Optional[Chart]

Chart object.

extra: dict[str, Any]

Extra info.


Data​

date: date | datetime | str
The date of the data.

open: float | None
The open price.

high: float | None
The high price.

low: float | None
The low price.

close: float
The close price.

volume: float | None
The trading volume.

vwap: float | None
Volume Weighted Average Price over the period.