summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorDiogo Sousa <montezdesousa@gmail.com>2024-03-11 17:48:32 +0000
committerDiogo Sousa <montezdesousa@gmail.com>2024-03-11 17:48:32 +0000
commitaa0335a383e320f39e02f3fe59f09814df324be8 (patch)
tree7b0d0f9a896a570b2cb2d35007319fa138765c8c
parent3621e2728a94312c3e581703722f96b25f47ce71 (diff)
parent9341b800e593c528a9a3d09ba985c13f4075d2fa (diff)
Merge branch 'develop' into bugfix/generator-new-examples
-rw-r--r--.github/labeler.yml6
-rw-r--r--.github/release-drafter.yml3
-rw-r--r--openbb_platform/core/openbb_core/provider/standard_models/key_metrics.py10
-rw-r--r--openbb_platform/dev_install.py1
-rw-r--r--openbb_platform/extensions/derivatives/integration/test_derivatives_api.py1
-rw-r--r--openbb_platform/extensions/derivatives/integration/test_derivatives_python.py1
-rw-r--r--openbb_platform/extensions/equity/integration/test_equity_api.py22
-rw-r--r--openbb_platform/extensions/equity/integration/test_equity_python.py22
-rw-r--r--openbb_platform/extensions/etf/integration/test_etf_api.py20
-rw-r--r--openbb_platform/extensions/etf/integration/test_etf_python.py20
-rw-r--r--openbb_platform/openbb/package/equity_fundamental.py99
-rw-r--r--openbb_platform/poetry.lock398
-rw-r--r--openbb_platform/providers/alpha_vantage/openbb_alpha_vantage/models/equity_historical.py141
-rw-r--r--openbb_platform/providers/intrinio/openbb_intrinio/models/key_metrics.py332
-rw-r--r--openbb_platform/providers/intrinio/tests/record/http/test_intrinio_fetchers/test_intrinio_key_metrics_fetcher.yaml1025
-rw-r--r--openbb_platform/providers/tmx/openbb_tmx/models/equity_historical.py15
-rw-r--r--openbb_platform/providers/tradier/README.md22
-rw-r--r--openbb_platform/providers/tradier/__init__.py0
-rw-r--r--openbb_platform/providers/tradier/openbb_tradier/__init__.py27
-rw-r--r--openbb_platform/providers/tradier/openbb_tradier/models/__init__.py0
-rw-r--r--openbb_platform/providers/tradier/openbb_tradier/models/equity_historical.py184
-rw-r--r--openbb_platform/providers/tradier/openbb_tradier/models/equity_quote.py289
-rw-r--r--openbb_platform/providers/tradier/openbb_tradier/models/equity_search.py129
-rw-r--r--openbb_platform/providers/tradier/openbb_tradier/models/options_chains.py291
-rw-r--r--openbb_platform/providers/tradier/openbb_tradier/py.typed0
-rw-r--r--openbb_platform/providers/tradier/openbb_tradier/utils/__init__.py0
-rw-r--r--openbb_platform/providers/tradier/openbb_tradier/utils/constants.py53
-rw-r--r--openbb_platform/providers/tradier/poetry.lock1412
-rw-r--r--openbb_platform/providers/tradier/pyproject.toml18
-rw-r--r--openbb_platform/providers/tradier/tests/__init__.py0
-rw-r--r--openbb_platform/providers/tradier/tests/record/http/test_tradier_fetchers/test_tradier_derivatives_options_chains_fetcher.yaml3004
-rw-r--r--openbb_platform/providers/tradier/tests/record/http/test_tradier_fetchers/test_tradier_equity_historical_fetcher.yaml40
-rw-r--r--openbb_platform/providers/tradier/tests/record/http/test_tradier_fetchers/test_tradier_equity_quote_fetcher.yaml42
-rw-r--r--openbb_platform/providers/tradier/tests/record/http/test_tradier_fetchers/test_tradier_equity_search_fetcher.yaml124
-rw-r--r--openbb_platform/providers/tradier/tests/test_tradier_fetchers.py69
-rw-r--r--openbb_platform/pyproject.toml3
-rw-r--r--openbb_platform/tests/test_extension_map.py6
-rw-r--r--openbb_platform/tests/test_pyproject_toml.py39
-rw-r--r--website/content/platform/extensions/data_extensions.md1
39 files changed, 7504 insertions, 365 deletions
diff --git a/.github/labeler.yml b/.github/labeler.yml
index c785bb7c01e..d48d518f4fc 100644
--- a/.github/labeler.yml
+++ b/.github/labeler.yml
@@ -23,4 +23,8 @@ labels:
- label: "excel"
files:
- - "website/content/excel/.*" \ No newline at end of file
+ - "website/content/excel/.*"
+
+ - label: "breaking_change"
+ files:
+ - "openbb_platform/core/openbb_core/provider/standard_models/.*"
diff --git a/.github/release-drafter.yml b/.github/release-drafter.yml
index 296b6e15ba7..eab4af1c80a 100644
--- a/.github/release-drafter.yml
+++ b/.github/release-drafter.yml
@@ -8,6 +8,9 @@ categories:
- title: 🐛 OpenBB Platform Bug Fixes
labels:
- 'bug'
+ - title: 🚨 OpenBB Platform Breaking Changes
+ labels:
+ - 'breaking_change'
- title: 📚 OpenBB Documentation Changes
labels:
- 'docs'
diff --git a/openbb_platform/core/openbb_core/provider/standard_models/key_metrics.py b/openbb_platform/core/openbb_core/provider/standard_models/key_metrics.py
index 80158688dc8..d2580e481cf 100644
--- a/openbb_platform/core/openbb_core/provider/standard_models/key_metrics.py
+++ b/openbb_platform/core/openbb_core/provider/standard_models/key_metrics.py
@@ -1,6 +1,6 @@
"""Key Metrics Standard Model."""
-from typing import List, Literal, Optional, Set, Union
+from typing import Literal, Optional
from pydantic import Field, field_validator
@@ -48,11 +48,3 @@ class KeyMetricsData(Data):
pe_ratio: Optional[float] = Field(
default=None, description="Price-to-earnings ratio (P/E ratio)"
)
-
- @field_validator("symbol", mode="before", check_fields=False)
- @classmethod
- def to_upper(cls, v: Union[str, List[str], Set[str]]):
- """Convert field to uppercase."""
- if isinstance(v, str):
- return v.upper()
- return ",".join([symbol.upper() for symbol in list(v)]) if v else None
diff --git a/openbb_platform/dev_install.py b/openbb_platform/dev_install.py
index b8f84f25ebf..1f157976b5b 100644
--- a/openbb_platform/dev_install.py
+++ b/openbb_platform/dev_install.py
@@ -53,6 +53,7 @@ openbb-nasdaq = { path = "./providers/nasdaq", optional = true, develop = true }
openbb-seeking-alpha = { path = "./providers/seeking_alpha", optional = true, develop = true }
openbb-stockgrid = { path = "./providers/stockgrid" , optional = true, develop = true }
openbb_tmx = { path = "./providers/tmx", optional = true, develop = true }
+openbb_tradier = { path = "./providers/tradier", optional = true, develop = true }
openbb-wsj = { path = "./providers/wsj", optional = true, develop = true }
openbb-charting = { path = "./obbject_extensions/charting", optional = true, develop = true }
diff --git a/openbb_platform/extensions/derivatives/integration/test_derivatives_api.py b/openbb_platform/extensions/derivatives/integration/test_derivatives_api.py
index 0ac622a8f4d..aa8103f2cf0 100644
--- a/openbb_platform/extensions/derivatives/integration/test_derivatives_api.py
+++ b/openbb_platform/extensions/derivatives/integration/test_derivatives_api.py
@@ -25,6 +25,7 @@ def headers():
[
({"provider": "intrinio", "symbol": "AAPL", "date": "2023-01-25"}),
({"provider": "cboe", "symbol": "AAPL", "use_cache": False}),
+ ({"provider": "tradier", "symbol": "AAPL"}),
(
{
"provider": "tmx",
diff --git a/openbb_platform/extensions/derivatives/integration/test_derivatives_python.py b/openbb_platform/extensions/derivatives/integration/test_derivatives_python.py
index fd4a5587f23..8a961c6f652 100644
--- a/openbb_platform/extensions/derivatives/integration/test_derivatives_python.py
+++ b/openbb_platform/extensions/derivatives/integration/test_derivatives_python.py
@@ -22,6 +22,7 @@ def obb(pytestconfig):
[
({"provider": "intrinio", "symbol": "AAPL", "date": "2023-01-25"}),
({"provider": "cboe", "symbol": "AAPL", "use_cache": False}),
+ ({"provider": "tradier", "symbol": "AAPL"}),
(
{
"provider": "tmx",
diff --git a/openbb_platform/extensions/equity/integration/test_equity_api.py b/openbb_platform/extensions/equity/integration/test_equity_api.py
index 76d0602f955..afe8fdeb22d 100644
--- a/openbb_platform/extensions/equity/integration/test_equity_api.py
+++ b/openbb_platform/extensions/equity/integration/test_equity_api.py
@@ -1039,6 +1039,26 @@ def test_equity_compare_groups(params, headers):
),
(
{
+ "provider": "tradier",
+ "symbol": "AAPL,MSFT",
+ "start_date": "2023-01-01",
+ "end_date": "2023-06-06",
+ "interval": "1M",
+ "extended_hours": False,
+ }
+ ),
+ (
+ {
+ "provider": "tradier",
+ "symbol": "AAPL,MSFT",
+ "start_date": None,
+ "end_date": None,
+ "interval": "15m",
+ "extended_hours": False,
+ }
+ ),
+ (
+ {
"provider": "tmx",
"symbol": "AAPL:US",
"start_date": "2023-01-01",
@@ -1239,6 +1259,7 @@ def test_equity_fundamental_latest_attributes(params, headers):
({"query": "Apple", "provider": "sec", "use_cache": False, "is_fund": False}),
({"query": "", "provider": "nasdaq", "use_cache": False, "is_etf": True}),
({"query": "gold", "provider": "tmx", "use_cache": False}),
+ ({"query": "gold", "provider": "tradier", "is_symbol": False}),
(
{
"query": "gold",
@@ -1307,6 +1328,7 @@ def test_equity_screener(params, headers):
({"symbol": "AAPL", "provider": "cboe", "use_cache": False}),
({"symbol": "AAPL", "provider": "yfinance"}),
({"symbol": "AAPL:US", "provider": "tmx"}),
+ ({"symbol": "AAPL,MSFT", "provider": "tradier"}),
],
)
@pytest.mark.integration
diff --git a/openbb_platform/extensions/equity/integration/test_equity_python.py b/openbb_platform/extensions/equity/integration/test_equity_python.py
index 7182c1f249e..71400e8409a 100644
--- a/openbb_platform/extensions/equity/integration/test_equity_python.py
+++ b/openbb_platform/extensions/equity/integration/test_equity_python.py
@@ -978,6 +978,26 @@ def test_equity_compare_groups(params, obb):
),
(
{
+ "provider": "tradier",
+ "symbol": "AAPL,MSFT",
+ "start_date": "2023-01-01",
+ "end_date": "2023-06-06",
+ "interval": "1M",
+ "extended_hours": False,
+ }
+ ),
+ (
+ {
+ "provider": "tradier",
+ "symbol": "AAPL,MSFT",
+ "start_date": None,
+ "end_date": None,
+ "interval": "15m",
+ "extended_hours": False,
+ }
+ ),
+ (
+ {
"provider": "tmx",
"symbol": "AAPL:US",
"start_date": "2023-01-01",
@@ -1167,6 +1187,7 @@ def test_equity_fundamental_latest_attributes(params, obb):
({"query": "Apple", "provider": "sec", "use_cache": False, "is_fund": False}),
({"query": "", "provider": "nasdaq", "use_cache": False, "is_etf": True}),
({"query": "gold", "provider": "tmx", "use_cache": False}),
+ ({"query": "gold", "provider": "tradier", "is_symbol": False}),
(
{
"query": "gold",
@@ -1230,6 +1251,7 @@ def test_equity_screener(params, obb):
({"symbol": "AAPL", "provider": "cboe", "use_cache": False}),
({"symbol": "AAPL", "provider": "yfinance"}),
({"symbol": "AAPL:US", "provider": "tmx"}),
+ ({"symbol": "AAPL,MSFT", "provider": "tradier"}),
],
)
@pytest.mark.integration
diff --git a/openbb_platform/extensions/etf/integration/test_etf_api.py b/openbb_platform/extensions/etf/integration/test_etf_api.py
index 4c6e7b33d3a..1e3271ae6b1 100644
--- a/openbb_platform/extensions/etf/integration/test_etf_api.py
+++ b/openbb_platform/extensions/etf/integration/test_etf_api.py
@@ -188,6 +188,26 @@ def test_etf_search(params, headers):
),
(
{
+ "provider": "tradier",
+ "symbol": "AAPL,MSFT",
+ "start_date": "2023-01-01",
+ "end_date": "2023-06-06",
+ "interval": "1M",
+ "extended_hours": False,
+ }
+ ),
+ (
+ {
+ "provider": "tradier",
+ "symbol": "AAPL,MSFT",
+ "start_date": None,
+ "end_date": None,
+ "interval": "15m",
+ "extended_hours": False,
+ }
+ ),
+ (
+ {
"provider": "tmx",
"symbol": "SPY:US",
"start_date": "2023-01-01",
diff --git a/openbb_platform/extensions/etf/integration/test_etf_python.py b/openbb_platform/extensions/etf/integration/test_etf_python.py
index c54c53737d4..0498e2e2f72 100644
--- a/openbb_platform/extensions/etf/integration/test_etf_python.py
+++ b/openbb_platform/extensions/etf/integration/test_etf_python.py
@@ -186,6 +186,26 @@ def test_etf_search(params, obb):
),
(
{
+ "provider": "tradier",
+ "symbol": "AAPL,MSFT",
+ "start_date": "2023-01-01",
+ "end_date": "2023-06-06",
+ "interval": "1M",
+ "extended_hours": False,
+ }
+ ),
+ (
+ {
+ "provider": "tradier",
+ "symbol": "AAPL,MSFT",
+ "start_date": None,
+ "end_date": None,
+ "interval": "15m",
+ "extended_hours": False,
+ }
+ ),
+ (
+ {
"provider": "tmx",
"symbol": "SPY:US",
"start_date": "2023-01-01",
diff --git a/openbb_platform/openbb/package/equity_fundamental.py b/openbb_platform/openbb/package/equity_fundamental.py
index c0c6f810ecb..e0b087c5cfa 100644
--- a/openbb_platform/openbb/package/equity_fundamental.py
+++ b/openbb_platform/openbb/package/equity_fundamental.py
@@ -2412,7 +2412,7 @@ class ROUTER_equity_fundamental(Container):
symbol: Annotated[
Union[str, List[str]],
OpenBBCustomParameter(
- description="Symbol to get data for. Multiple items allowed for provider(s): fmp, yfinance."
+ description="Symbol to get data for. Multiple items allowed for provider(s): fmp, intrinio, yfinance."
),
],
period: Annotated[
@@ -2436,7 +2436,7 @@ class ROUTER_equity_fundamental(Container):
Parameters
----------
symbol : Union[str, List[str]]
- Symbol to get data for. Multiple items allowed for provider(s): fmp, yfinance.
+ Symbol to get data for. Multiple items allowed for provider(s): fmp, intrinio, yfinance.
period : Optional[Literal['annual', 'quarter']]
Time period of the data to return.
limit : Optional[int]
@@ -2494,8 +2494,8 @@ class ROUTER_equity_fundamental(Container):
Shareholders equity per share (provider: fmp)
interest_debt_per_share : Optional[float]
Interest debt per share (provider: fmp)
- enterprise_value : Optional[Union[float, int]]
- Enterprise value (provider: fmp, yfinance)
+ enterprise_value : Optional[int]
+ Enterprise value (provider: fmp, intrinio, yfinance)
price_to_sales_ratio : Optional[float]
Price-to-sales ratio (provider: fmp)
pocf_ratio : Optional[float]
@@ -2515,7 +2515,8 @@ class ROUTER_equity_fundamental(Container):
ev_to_free_cash_flow : Optional[float]
Enterprise value-to-free cash flow ratio (provider: fmp)
earnings_yield : Optional[float]
- Earnings yield (provider: fmp)
+ Earnings yield (provider: fmp);
+ Earnings yield, as a normalized percent. (provider: intrinio)
free_cash_flow_yield : Optional[float]
Free cash flow yield (provider: fmp)
debt_to_equity : Optional[float]
@@ -2586,15 +2587,73 @@ class ROUTER_equity_fundamental(Container):
Return on equity (provider: fmp)
capex_per_share : Optional[float]
Capital expenditures per share (provider: fmp)
+ price_to_book : Optional[float]
+ Price to book ratio. (provider: intrinio, yfinance)
+ price_to_tangible_book : Optional[float]
+ Price to tangible book ratio. (provider: intrinio)
+ price_to_revenue : Optional[float]
+ Price to revenue ratio. (provider: intrinio)
+ quick_ratio : Optional[float]
+ Quick ratio. (provider: intrinio, yfinance)
+ gross_margin : Optional[float]
+ Gross margin, as a normalized percent. (provider: intrinio, yfinance)
+ ebit_margin : Optional[float]
+ EBIT margin, as a normalized percent. (provider: intrinio)
+ profit_margin : Optional[float]
+ Profit margin, as a normalized percent. (provider: intrinio, yfinance)
+ eps : Optional[float]
+ Basic earnings per share. (provider: intrinio)
+ eps_growth : Optional[float]
+ EPS growth, as a normalized percent. (provider: intrinio)
+ revenue_growth : Optional[float]
+ Revenue growth, as a normalized percent. (provider: intrinio, yfinance)
+ ebitda_growth : Optional[float]
+ EBITDA growth, as a normalized percent. (provider: intrinio)
+ ebit_growth : Optional[float]
+ EBIT growth, as a normalized percent. (provider: intrinio)
+ net_income_growth : Optional[float]
+ Net income growth, as a normalized percent. (provider: intrinio)
+ free_cash_flow_to_firm_growth : Optional[float]
+ Free cash flow to firm growth, as a normalized percent. (provider: intrinio)
+ invested_capital_growth : Optional[float]
+ Invested capital growth, as a normalized percent. (provider: intrinio)
+ return_on_assets : Optional[float]
+ Return on assets, as a normalized percent. (provider: intrinio, yfinance)
+ return_on_equity : Optional[float]
+ Return on equity, as a normalized percent. (provider: intrinio, yfinance)
+ return_on_invested_capital : Optional[float]
+ Return on invested capital, as a normalized percent. (provider: intrinio)
+ ebitda : Optional[int]
+ Earnings before interest, taxes, depreciation, and amortization. (provider: intrinio)
+ ebit : Optional[int]
+ Earnings before interest and taxes. (provider: intrinio)
+ long_term_debt : Optional[int]
+ Long-term debt. (provider: intrinio)
+ total_debt : Optional[int]
+ Total debt. (provider: intrinio)
+ total_capital : Optional[int]
+ The sum of long-term debt and total shareholder equity. (provider: intrinio)
+ free_cash_flow_to_firm : Optional[int]
+ Free cash flow to firm. (provider: intrinio)
+ altman_z_score : Optional[float]
+ Altman Z-score. (provider: intrinio)
beta : Optional[float]
- Beta relative to the broad market calculated on a rolling three-year basis. (provider: intrinio);
+ Beta relative to the broad market (rolling three-year). (provider: intrinio);
Beta relative to the broad market (5-year monthly). (provider: yfinance)
- volume : Optional[float]
- Volume (provider: intrinio)
- fifty_two_week_high : Optional[float]
+ last_price : Optional[float]
+ Last price of the stock. (provider: intrinio)
+ year_high : Optional[float]
52 week high (provider: intrinio)
- fifty_two_week_low : Optional[float]
+ year_low : Optional[float]
52 week low (provider: intrinio)
+ volume_avg : Optional[int]
+ Average daily volume. (provider: intrinio)
+ short_interest : Optional[int]
+ Number of shares reported as sold short. (provider: intrinio)