New Intrinio Endpoints (#5789)

* redefined CalendarDividend standard model

* fix nasdaq calendar dividend model

* removed Filings standard model

* add DiscoveryFilings standard model

* fix fmp calendar dividend and discovery filing models

* add cik description in standard model utils

* redefine CompanyFilings standard model

* fix fmp company filings model

* fix sec company filings model

* remove regulators/sec/filings command

* redefine InsiderTrading standard model

* fix fmp insider trading model

* redefine InstitutionalOwnership standard model

* fix fmp institutional ownership model

* redefine KeyMetrics standard model

* fix fmp key metrics model

* fix fmp market snapshots model

* add attributes standard model and commands

* redefine EquityInfo standard model

* remove SearchFinancialAttributes standard model file

* add new intrinio endpoints

* linting

* pass standard model description test

* fix tests? w/@montezdesousa

* pass fmp fetcher tests

* re-record sec company filings test

* pass intrinio fetcher tests

* re-record intrinio insider trading test

* index integration test

* regulators integration test

* equity integration test

* fix same owner name in intrinio instituional ownership

* re-record intrinio insider training

* crypto price historical integration test reduce end_date
This commit is contained in:
Pratyush Shukla
2023-11-27 18:05:19 +05:30
committed by GitHub
parent a31df4b300
commit 9219a63c00
79 changed files with 12630 additions and 6085 deletions

View File

@@ -96,6 +96,15 @@ def test_equity_fundamental_balance_growth(params, obb):
[
({"start_date": "2023-11-05", "end_date": "2023-11-10", "provider": "fmp"}),
({"start_date": "2023-11-05", "end_date": "2023-11-10", "provider": "nasdaq"}),
(
{
"start_date": "2023-11-05",
"end_date": "2023-11-10",
"symbol": "AAPL",
"limit": 100,
"provider": "intrinio",
}
),
],
)
@pytest.mark.integration
@@ -357,10 +366,28 @@ def test_equity_fundamental_income_growth(params, obb):
(
{
"symbol": "AAPL",
"transaction_type": ["P-Purchase"],
"limit": 10,
}
),
(
{
"provider": "fmp",
"symbol": "AAPL",
"limit": 10,
"transaction_type": ["P-Purchase"],
}
),
(
{
"provider": "intrinio",
"symbol": "AAPL",
"limit": 10,
"start_date": "2021-01-01",
"end_date": "2023-06-06",
"ownership_type": None,
"sort_by": "updated_on",
}
),
],
)
@pytest.mark.integration
@@ -379,6 +406,14 @@ def test_equity_ownership_insider_trading(params, obb):
"symbol": "AAPL",
"include_current_quarter": True,
"date": "2021-09-30",
"provider": "fmp",
}
),
(
{
"provider": "intrinio",
"symbol": "AAPL",
"limit": 100,
}
),
],
@@ -426,6 +461,16 @@ def test_equity_calendar_ipo(params, obb):
"params",
[
({"symbol": "AAPL", "period": "annual", "limit": 100}),
(
{
"provider": "fmp",
"symbol": "AAPL",
"period": "annual",
"limit": 100,
"with_ttm": False,
}
),
({"provider": "intrinio", "symbol": "AAPL", "period": "annual", "limit": 100}),
],
)
@pytest.mark.integration
@@ -546,15 +591,36 @@ def test_equity_fundamental_revenue_per_segment(params, obb):
@pytest.mark.parametrize(
"params",
[
({"symbol": "AAPL", "type": "1", "page": 1, "limit": 100, "provider": "fmp"}),
({"symbol": "AAPL", "form_type": "1", "limit": 100, "provider": "fmp"}),
(
{
"provider": "intrinio",
"symbol": "AAPL",
"start_date": "2021-01-01",
"end_date": "2023-11-01",
"form_type": None,
"limit": 100,
"thea_enabled": None,
}
),
(
{
"symbol": "AAPL",
"type": "10-K",
"limit": 100,
"limit": 3,
"type": "8-K",
"cik": None,
"use_cache": False,
"provider": "sec",
"use_cache": False,
}
),
(
{
"cik": "0001067983",
"limit": 3,
"type": "10-Q",
"symbol": None,
"provider": "sec",
"use_cache": False,
}
),
],
@@ -571,6 +637,8 @@ def test_equity_fundamental_filings(params, obb):
"params",
[
({"symbol": "AAPL"}),
({"symbol": "AAPL", "provider": "fmp"}),
({"symbol": "AAPL", "provider": "intrinio"}),
],
)
@pytest.mark.integration
@@ -813,8 +881,8 @@ def test_equity_fundamental_multiples(params, obb):
],
)
@pytest.mark.integration
def test_equity_fundamental_search_financial_attributes(params, obb):
result = obb.equity.fundamental.search_financial_attributes(**params)
def test_equity_fundamental_search_attributes(params, obb):
result = obb.equity.fundamental.search_attributes(**params)
assert result
assert isinstance(result, OBBject)
assert len(result.results) > 0
@@ -828,7 +896,7 @@ def test_equity_fundamental_search_financial_attributes(params, obb):
"provider": "intrinio",
"symbol": "AAPL",
"tag": "ebit",
"period": "annual",
"frequency": "yearly",
"limit": 1000,
"type": None,
"start_date": "2013-01-01",
@@ -839,8 +907,41 @@ def test_equity_fundamental_search_financial_attributes(params, obb):
],
)
@pytest.mark.integration
def test_equity_fundamental_financial_attributes(params, obb):
result = obb.equity.fundamental.financial_attributes(**params)
def test_equity_fundamental_historical_attributes(params, obb):
result = obb.equity.fundamental.historical_attributes(**params)
assert result
assert isinstance(result, OBBject)
assert len(result.results) > 0
@pytest.mark.parametrize(
"params",
[
(
{
"symbol": "AAPL",
"tag": "ceo",
}
),
(
{
"provider": "intrinio",
"symbol": "AAPL",
"tag": "ceo",
}
),
(
{
"provider": "intrinio",
"symbol": "MSFT",
"tag": "ebitda",
}
),
],
)
@pytest.mark.integration
def test_equity_fundamental_latest_attributes(params, obb):
result = obb.equity.fundamental.latest_attributes(**params)
assert result
assert isinstance(result, OBBject)
assert len(result.results) > 0
@@ -915,6 +1016,7 @@ def test_equity_price_quote(params, obb):
"params",
[
({"symbol": "AAPL", "provider": "cboe"}),
({"provider": "intrinio", "symbol": "AAPL"}),
],
)
@pytest.mark.integration
@@ -1088,6 +1190,17 @@ def test_equity_discovery_upcoming_release_days(params, obb):
"provider": "fmp",
}
),
(
{
"provider": "intrinio",
"symbol": "AAPL",
"thea_enabled": None,
"start_date": "2023-11-06",
"end_date": "2023-11-07",
"limit": 50,
"form_type": "10-Q",
}
),
],
)
@pytest.mark.integration