Files
OpenBB/openbb_platform/openbb/package/regulators_sec.py
montezdesousa ddcd1e7b0f Squeeze build time (#5756)
* squeeze build time

* bug fix

* fix test

* typo?

* rebuild

* keep tradingeconomics
2023-11-18 20:03:02 +00:00

499 lines
19 KiB
Python

### THIS FILE IS AUTO-GENERATED. DO NOT EDIT. ###
from typing import List, Literal, Optional, Union
from openbb_core.app.model.custom_parameter import OpenBBCustomParameter
from openbb_core.app.model.obbject import OBBject
from openbb_core.app.static.container import Container
from openbb_core.app.static.decorators import validate
from openbb_core.app.static.filters import filter_inputs
from openbb_provider.abstract.data import Data
from typing_extensions import Annotated
class ROUTER_regulators_sec(Container):
"""/regulators/sec
cik_map
filings
institutions_search
rss_litigation
schema_files
sic_search
symbol_map
"""
def __repr__(self) -> str:
return self.__doc__ or ""
@validate
def cik_map(
self,
symbol: Annotated[
Union[str, List[str]],
OpenBBCustomParameter(description="Symbol to get data for."),
],
provider: Optional[Literal["sec"]] = None,
**kwargs
) -> OBBject[Data]:
"""Get the CIK number corresponding to a ticker symbol.
Parameters
----------
symbol : str
Symbol to get data for.
provider : Optional[Literal['sec']]
The provider to use for the query, by default None.
If None, the provider specified in defaults is selected or 'sec' if there is
no default.
Returns
-------
OBBject
results : CikMap
Serializable results.
provider : Optional[Literal['sec']]
Provider name.
warnings : Optional[List[Warning_]]
List of warnings.
chart : Optional[Chart]
Chart object.
extra: Dict[str, Any]
Extra info.
CikMap
------
cik : Optional[Union[str, int]]
Central Index Key (provider: sec)
Example
-------
>>> from openbb import obb
>>> obb.regulators.sec.cik_map(symbol="AAPL")
""" # noqa: E501
inputs = filter_inputs(
provider_choices={
"provider": provider,
},
standard_params={
"symbol": ",".join(symbol) if isinstance(symbol, list) else symbol,
},
extra_params=kwargs,
)
return self._run(
"/regulators/sec/cik_map",
**inputs,
)
@validate
def filings(
self,
symbol: Annotated[
Union[str, None, List[str]],
OpenBBCustomParameter(description="Symbol to get data for."),
] = None,
limit: Annotated[
Optional[int],
OpenBBCustomParameter(description="The number of data entries to return."),
] = 300,
provider: Optional[Literal["sec"]] = None,
**kwargs
) -> OBBject[List[Data]]:
"""Look up filings to the SEC by ticker symbol or CIK.
Parameters
----------
symbol : Optional[str]
Symbol to get data for.
limit : Optional[int]
The number of data entries to return.
provider : Optional[Literal['sec']]
The provider to use for the query, by default None.
If None, the provider specified in defaults is selected or 'sec' if there is
no default.
cik : Optional[Union[str, int]]
Lookup filings by Central Index Key (CIK) instead of by symbol. (provider: sec)
type : Optional[Literal['1', '1-A', '1-A POS', '1-A-W', '1-E', '1-E AD', '1-K', '1-SA', '1-U', '1-Z', '1-Z-W', '10-12B', '10-12G', '10-D', '10-K', '10-KT', '10-Q', '10-QT', '11-K', '11-KT', '13F-HR', '13F-NT', '13FCONP', '144', '15-12B', '15-12G', '15-15D', '15F-12B', '15F-12G', '15F-15D', '18-12B', '18-K', '19B-4E', '2-A', '2-AF', '2-E', '20-F', '20FR12B', '20FR12G', '24F-2NT', '25', '25-NSE', '253G1', '253G2', '253G3', '253G4', '3', '305B2', '34-12H', '4', '40-17F1', '40-17F2', '40-17G', '40-17GCS', '40-202A', '40-203A', '40-206A', '40-24B2', '40-33', '40-6B', '40-8B25', '40-8F-2', '40-APP', '40-F', '40-OIP', '40FR12B', '40FR12G', '424A', '424B1', '424B2', '424B3', '424B4', '424B5', '424B7', '424B8', '424H', '425', '485APOS', '485BPOS', '485BXT', '486APOS', '486BPOS', '486BXT', '487', '497', '497AD', '497H2', '497J', '497K', '497VPI', '497VPU', '5', '6-K', '6B NTC', '6B ORDR', '8-A12B', '8-A12G', '8-K', '8-K12B', '8-K12G3', '8-K15D5', '8-M', '8F-2 NTC', '8F-2 ORDR', '9-M', 'ABS-15G', 'ABS-EE', 'ADN-MTL', 'ADV-E', 'ADV-H-C', 'ADV-H-T', 'ADV-NR', 'ANNLRPT', 'APP NTC', 'APP ORDR', 'APP WD', 'APP WDG', 'ARS', 'ATS-N', 'ATS-N-C', 'ATS-N/UA', 'AW', 'AW WD', 'C', 'C-AR', 'C-AR-W', 'C-TR', 'C-TR-W', 'C-U', 'C-U-W', 'C-W', 'CB', 'CERT', 'CERTARCA', 'CERTBATS', 'CERTCBO', 'CERTNAS', 'CERTNYS', 'CERTPAC', 'CFPORTAL', 'CFPORTAL-W', 'CORRESP', 'CT ORDER', 'D', 'DEF 14A', 'DEF 14C', 'DEFA14A', 'DEFA14C', 'DEFC14A', 'DEFC14C', 'DEFM14A', 'DEFM14C', 'DEFN14A', 'DEFR14A', 'DEFR14C', 'DEL AM', 'DFAN14A', 'DFRN14A', 'DOS', 'DOSLTR', 'DRS', 'DRSLTR', 'DSTRBRPT', 'EFFECT', 'F-1', 'F-10', 'F-10EF', 'F-10POS', 'F-1MEF', 'F-3', 'F-3ASR', 'F-3D', 'F-3DPOS', 'F-3MEF', 'F-4', 'F-4 POS', 'F-4MEF', 'F-6', 'F-6 POS', 'F-6EF', 'F-7', 'F-7 POS', 'F-8', 'F-8 POS', 'F-80', 'F-80POS', 'F-9', 'F-9 POS', 'F-N', 'F-X', 'FOCUSN', 'FWP', 'G-405', 'G-405N', 'G-FIN', 'G-FINW', 'IRANNOTICE', 'MA', 'MA-A', 'MA-I', 'MA-W', 'MSD', 'MSDCO', 'MSDW', 'N-1', 'N-14', 'N-14 8C', 'N-14MEF', 'N-18F1', 'N-1A', 'N-2', 'N-2 POSASR', 'N-23C-2', 'N-23C3A', 'N-23C3B', 'N-23C3C', 'N-2ASR', 'N-2MEF', 'N-30B-2', 'N-30D', 'N-4', 'N-5', 'N-54A', 'N-54C', 'N-6', 'N-6F', 'N-8A', 'N-8B-2', 'N-8F', 'N-8F NTC', 'N-8F ORDR', 'N-CEN', 'N-CR', 'N-CSR', 'N-CSRS', 'N-MFP', 'N-MFP1', 'N-MFP2', 'N-PX', 'N-Q', 'N-VP', 'N-VPFS', 'NO ACT', 'NPORT-EX', 'NPORT-NP', 'NPORT-P', 'NRSRO-CE', 'NRSRO-UPD', 'NSAR-A', 'NSAR-AT', 'NSAR-B', 'NSAR-BT', 'NSAR-U', 'NT 10-D', 'NT 10-K', 'NT 10-Q', 'NT 11-K', 'NT 20-F', 'NT N-CEN', 'NT N-MFP', 'NT N-MFP1', 'NT N-MFP2', 'NT NPORT-EX', 'NT NPORT-P', 'NT-NCEN', 'NT-NCSR', 'NT-NSAR', 'NTFNCEN', 'NTFNCSR', 'NTFNSAR', 'NTN 10D', 'NTN 10K', 'NTN 10Q', 'NTN 20F', 'OIP NTC', 'OIP ORDR', 'POS 8C', 'POS AM', 'POS AMI', 'POS EX', 'POS462B', 'POS462C', 'POSASR', 'PRE 14A', 'PRE 14C', 'PREC14A', 'PREC14C', 'PREM14A', 'PREM14C', 'PREN14A', 'PRER14A', 'PRER14C', 'PRRN14A', 'PX14A6G', 'PX14A6N', 'QRTLYRPT', 'QUALIF', 'REG-NR', 'REVOKED', 'RW', 'RW WD', 'S-1', 'S-11', 'S-11MEF', 'S-1MEF', 'S-20', 'S-3', 'S-3ASR', 'S-3D', 'S-3DPOS', 'S-3MEF', 'S-4', 'S-4 POS', 'S-4EF', 'S-4MEF', 'S-6', 'S-8', 'S-8 POS', 'S-B', 'S-BMEF', 'SBSE', 'SBSE-A', 'SBSE-BD', 'SBSE-C', 'SBSE-W', 'SC 13D', 'SC 13E1', 'SC 13E3', 'SC 13G', 'SC 14D9', 'SC 14F1', 'SC 14N', 'SC TO-C', 'SC TO-I', 'SC TO-T', 'SC13E4F', 'SC14D1F', 'SC14D9C', 'SC14D9F', 'SD', 'SDR', 'SE', 'SEC ACTION', 'SEC STAFF ACTION', 'SEC STAFF LETTER', 'SF-1', 'SF-3', 'SL', 'SP 15D2', 'STOP ORDER', 'SUPPL', 'T-3', 'TA-1', 'TA-2', 'TA-W', 'TACO', 'TH', 'TTW', 'UNDER', 'UPLOAD', 'WDL-REQ', 'X-17A-5']]
Type of the SEC filing form. (provider: sec)
use_cache : bool
Whether or not to use cache. If True, cache will store for one day. (provider: sec)
Returns
-------
OBBject
results : List[Filings]
Serializable results.
provider : Optional[Literal['sec']]
Provider name.
warnings : Optional[List[Warning_]]
List of warnings.
chart : Optional[Chart]
Chart object.
extra: Dict[str, Any]
Extra info.
Filings
-------
date : date
The date of the data. In this case, it is the date of the filing.
type : str
Type of document.
link : str
URL to the document.
report_date : Optional[date]
The date of the filing. (provider: sec)
accepted_date : Optional[datetime]
Accepted date of the SEC filing. (provider: sec)
act : Optional[Union[str, int]]
The SEC Act number. (provider: sec)
items : Optional[Union[str, float]]
The SEC Item numbers. (provider: sec)
primary_doc_description : Optional[str]
The description of the primary document. (provider: sec)
primary_doc : Optional[str]
The filename of the primary document. (provider: sec)
accession_number : Optional[Union[str, int]]
The accession number. (provider: sec)
file_number : Optional[Union[str, int]]
The file number. (provider: sec)
film_number : Optional[Union[str, int]]
The film number. (provider: sec)
is_inline_xbrl : Optional[Union[str, int]]
Whether the filing is an inline XBRL filing. (provider: sec)
is_xbrl : Optional[Union[str, int]]
Whether the filing is an XBRL filing. (provider: sec)
size : Optional[Union[str, int]]
The size of the filing. (provider: sec)
complete_submission_url : Optional[str]
The URL to the complete filing submission. (provider: sec)
filing_detail_url : Optional[str]
The URL to the filing details. (provider: sec)
xml : Optional[str]
The URL to the primary XML document. (provider: sec)
Example
-------
>>> from openbb import obb
>>> obb.regulators.sec.filings(limit=300)
""" # noqa: E501
inputs = filter_inputs(
provider_choices={
"provider": provider,
},
standard_params={
"symbol": ",".join(symbol) if isinstance(symbol, list) else symbol,
"limit": limit,
},
extra_params=kwargs,
)
return self._run(
"/regulators/sec/filings",
**inputs,
)
@validate
def institutions_search(
self,
query: Annotated[str, OpenBBCustomParameter(description="Search query.")] = "",
provider: Optional[Literal["sec"]] = None,
**kwargs
) -> OBBject[List[Data]]:
"""Look up institutions regulated by the SEC.
Parameters
----------
query : str
Search query.
provider : Optional[Literal['sec']]
The provider to use for the query, by default None.
If None, the provider specified in defaults is selected or 'sec' if there is
no default.
use_cache : bool
Whether or not to use cache. If True, cache will store for seven days. (provider: sec)
Returns
-------
OBBject
results : List[InstitutionsSearch]
Serializable results.
provider : Optional[Literal['sec']]
Provider name.
warnings : Optional[List[Warning_]]
List of warnings.
chart : Optional[Chart]
Chart object.
extra: Dict[str, Any]
Extra info.
InstitutionsSearch
------------------
name : Optional[str]
The name of the institution. (provider: sec)
cik : Optional[Union[str, int]]
Central Index Key (CIK) (provider: sec)
Example
-------
>>> from openbb import obb
>>> obb.regulators.sec.institutions_search()
""" # noqa: E501
inputs = filter_inputs(
provider_choices={
"provider": provider,
},
standard_params={
"query": query,
},
extra_params=kwargs,
)
return self._run(
"/regulators/sec/institutions_search",
**inputs,
)
@validate
def rss_litigation(
self, provider: Optional[Literal["sec"]] = None, **kwargs
) -> OBBject[List[Data]]:
"""The RSS feed provides links to litigation releases concerning civil lawsuits brought by the Commission in federal court.
Parameters
----------
provider : Optional[Literal['sec']]
The provider to use for the query, by default None.
If None, the provider specified in defaults is selected or 'sec' if there is
no default.
Returns
-------
OBBject
results : List[RssLitigation]
Serializable results.
provider : Optional[Literal['sec']]
Provider name.
warnings : Optional[List[Warning_]]
List of warnings.
chart : Optional[Chart]
Chart object.
extra: Dict[str, Any]
Extra info.
RssLitigation
-------------
published : Optional[datetime]
The date of publication. (provider: sec)
title : Optional[str]
The title of the release. (provider: sec)
summary : Optional[str]
Short summary of the release. (provider: sec)
id : Optional[str]
The identifier associated with the release. (provider: sec)
link : Optional[str]
URL to the release. (provider: sec)
Example
-------
>>> from openbb import obb
>>> obb.regulators.sec.rss_litigation()
""" # noqa: E501
inputs = filter_inputs(
provider_choices={
"provider": provider,
},
standard_params={},
extra_params=kwargs,
)
return self._run(
"/regulators/sec/rss_litigation",
**inputs,
)
@validate
def schema_files(
self,
query: Annotated[str, OpenBBCustomParameter(description="Search query.")] = "",
provider: Optional[Literal["sec"]] = None,
**kwargs
) -> OBBject[Data]:
"""Get lists of SEC XML schema files by year.
Parameters
----------
query : str
Search query.
provider : Optional[Literal['sec']]
The provider to use for the query, by default None.
If None, the provider specified in defaults is selected or 'sec' if there is
no default.
url : Optional[str]
Enter an optional URL path to fetch the next level. (provider: sec)
Returns
-------
OBBject
results : SchemaFiles
Serializable results.
provider : Optional[Literal['sec']]
Provider name.
warnings : Optional[List[Warning_]]
List of warnings.
chart : Optional[Chart]
Chart object.
extra: Dict[str, Any]
Extra info.
SchemaFiles
-----------
files : Optional[List]
Dictionary of URLs to SEC Schema Files (provider: sec)
Example
-------
>>> from openbb import obb
>>> obb.regulators.sec.schema_files()
""" # noqa: E501
inputs = filter_inputs(
provider_choices={
"provider": provider,
},
standard_params={
"query": query,
},
extra_params=kwargs,
)
return self._run(
"/regulators/sec/schema_files",
**inputs,
)
@validate
def sic_search(
self,
query: Annotated[str, OpenBBCustomParameter(description="Search query.")] = "",
provider: Optional[Literal["sec"]] = None,
**kwargs
) -> OBBject[List[Data]]:
"""Fuzzy search for Industry Titles, Reporting Office, and SIC Codes.
Parameters
----------
query : str
Search query.
provider : Optional[Literal['sec']]
The provider to use for the query, by default None.
If None, the provider specified in defaults is selected or 'sec' if there is
no default.
use_cache : bool
Whether to use the cache or not. The full list will be cached for seven days if True. (provider: sec)
Returns
-------
OBBject
results : List[SicSearch]
Serializable results.
provider : Optional[Literal['sec']]
Provider name.
warnings : Optional[List[Warning_]]
List of warnings.
chart : Optional[Chart]
Chart object.
extra: Dict[str, Any]
Extra info.
SicSearch
---------
sic : Optional[int]
Sector Industrial Code (SIC) (provider: sec)
industry : Optional[str]
Industry title. (provider: sec)
office : Optional[str]
Reporting office within the Corporate Finance Office (provider: sec)
Example
-------
>>> from openbb import obb
>>> obb.regulators.sec.sic_search()
""" # noqa: E501
inputs = filter_inputs(
provider_choices={
"provider": provider,
},
standard_params={
"query": query,
},
extra_params=kwargs,
)
return self._run(
"/regulators/sec/sic_search",
**inputs,
)
@validate
def symbol_map(
self,
query: Annotated[str, OpenBBCustomParameter(description="Search query.")] = "",
provider: Optional[Literal["sec"]] = None,
**kwargs
) -> OBBject[Data]:
"""Get the ticker symbol corresponding to a company's CIK.
Parameters
----------
query : str
Search query.
provider : Optional[Literal['sec']]
The provider to use for the query, by default None.
If None, the provider specified in defaults is selected or 'sec' if there is
no default.
Returns
-------
OBBject
results : SymbolMap
Serializable results.
provider : Optional[Literal['sec']]
Provider name.
warnings : Optional[List[Warning_]]
List of warnings.
chart : Optional[Chart]
Chart object.
extra: Dict[str, Any]
Extra info.
SymbolMap
---------
symbol : Optional[str]
Symbol representing the entity requested in the data. (provider: sec)
Example
-------
>>> from openbb import obb
>>> obb.regulators.sec.symbol_map()
""" # noqa: E501
inputs = filter_inputs(
provider_choices={
"provider": provider,
},
standard_params={
"query": query,
},
extra_params=kwargs,
)
return self._run(
"/regulators/sec/symbol_map",
**inputs,
)