[Feature]try to add fmp senate trading data api (#6957)

* [Feature] Add Government Trades

* [BugFix] Supplement the missing files

* [Enhancement] Fix branch goverment_trades

* [Enhancement] Fix branch government_trades

* Capture test cassettes.

* [Enhancement] Fix branch government_trades

* some style things and prevent page from exceeding 30

* black

* linter again

* else None instead of Other

---------

Co-authored-by: Danglewood <85772166+deeleeramone@users.noreply.github.com>
This commit is contained in:
joshuaBri
2024-12-11 00:06:04 +08:00
committed by GitHub
parent 7d7456a938
commit d704de554e
12 changed files with 871 additions and 1 deletions

View File

@@ -2017,3 +2017,35 @@ def test_equity_discovery_latest_financial_reports(params, obb):
assert result
assert isinstance(result, OBBject)
assert len(result.results) > 0
@parametrize(
"params",
[
(
{
"chamber": "all",
"symbol": "AAPL",
"provider": "fmp",
"limit": None,
}
),
(
{
"symbol": None,
"chamber": "all",
"limit": 300,
"provider": "fmp",
}
),
],
)
@pytest.mark.integration
def test_equity_ownership_government_trades(params, obb):
"""Test the equity ownership government trades endpoint."""
params = {p: v for p, v in params.items() if v}
result = obb.equity.ownership.government_trades(**params)
assert result
assert isinstance(result, OBBject)
assert len(result.results) > 0