Skip to main content

Currency Snapshots


Implementation details

Class names

Model nameParameters classData class
CurrencySnapshotsCurrencySnapshotsQueryParamsCurrencySnapshotsData

Import Statement

from openbb_core.provider.standard_models.currency_snapshots import (
CurrencySnapshotsData,
CurrencySnapshotsQueryParams,
)

Parameters

base: str | list[str]
Default: usd
The base currency symbol. Multiple items allowed for provider(s): fmp, polygon.

quote_type: Literal['direct', 'indirect']
Default: indirect
Whether the quote is direct or indirect. Selecting 'direct' will return the exchange rate as the amount of domestic currency required to buy one unit of the foreign currency. Selecting 'indirect' (default) will return the exchange rate as the amount of foreign currency required to buy one unit of the domestic currency.

counter_currencies: str | list[str]
An optional list of counter currency symbols to filter for. None returns all.

Data

base_currency: str
The base, or domestic, currency.

counter_currency: str
The counter, or foreign, currency.

last_rate: float
The exchange rate, relative to the base currency. Rates are expressed as the amount of foreign currency received from selling one unit of the base currency, or the quantity of foreign currency required to purchase one unit of the domestic currency. To inverse the perspective, set the 'quote_type' parameter as 'direct'.

open: float
The open price.

high: float
The high price.

low: float
The low price.

close: float
The close price.

volume: int
The trading volume.

prev_close: float
The previous close price.