Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Feature] - Add derivates historical chart #6520

Merged
merged 16 commits into from
Jun 26, 2024
Merged
Show file tree
Hide file tree
Changes from 15 commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,7 @@ class EuroShortTermRateData(Data):
)
volume: Optional[float] = Field(
default=None,
description=DATA_DESCRIPTIONS.get("volume", "")+ " (Millions of €EUR).",
description=DATA_DESCRIPTIONS.get("volume", "") + " (Millions of €EUR).",
json_schema_extra={
"x-unit_measurement": "currency",
"x-frontend_multiply": 1e6,
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
"""Views for the Derivatives Extension."""

from typing import Any, Dict, Tuple

from openbb_charting.charts.price_historical import price_historical
from openbb_charting.core.openbb_figure import OpenBBFigure


class DerivativesViews:
"""Derivatives Views."""

@staticmethod
def derivatives_futures_historical( # noqa: PLR0912
**kwargs,
) -> Tuple[OpenBBFigure, Dict[str, Any]]:
"""Get Derivatives Price Historical Chart."""
return price_historical(**kwargs)
3 changes: 3 additions & 0 deletions openbb_platform/extensions/derivatives/pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -17,3 +17,6 @@ build-backend = "poetry.core.masonry.api"

[tool.poetry.plugins."openbb_core_extension"]
derivatives = "openbb_derivatives.derivatives_router:router"

[tool.poetry.plugins."openbb_charting_extension"]
derivatives = "openbb_derivatives.derivatives_views:DerivativesViews"
2 changes: 1 addition & 1 deletion openbb_platform/providers/nasdaq/openbb_nasdaq/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -7,8 +7,8 @@
from openbb_nasdaq.models.cot import NasdaqCotFetcher
from openbb_nasdaq.models.cot_search import NasdaqCotSearchFetcher
from openbb_nasdaq.models.economic_calendar import NasdaqEconomicCalendarFetcher
from openbb_nasdaq.models.equity_search import NasdaqEquitySearchFetcher
from openbb_nasdaq.models.equity_screener import NasdaqEquityScreenerFetcher
from openbb_nasdaq.models.equity_search import NasdaqEquitySearchFetcher
from openbb_nasdaq.models.historical_dividends import NasdaqHistoricalDividendsFetcher
from openbb_nasdaq.models.lbma_fixing import NasdaqLbmaFixingFetcher
from openbb_nasdaq.models.sp500_multiples import NasdaqSP500MultiplesFetcher
Expand Down
Loading