-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #5 from SeisSerenata/main
feat: update aisec api to 0.1.0
- Loading branch information
Showing
36 changed files
with
1,848 additions
and
409 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -27,40 +27,73 @@ Please reach out at [email protected] for an API key. | |
```python | ||
import os | ||
import sec_agent_sdk | ||
from sec_agent_sdk import FormType, FilingTable | ||
from sec_agent_sdk import ApiClient, DefaultApi, FilingTable, FormType | ||
from sec_agent_sdk.rest import ApiException | ||
from pprint import pprint | ||
|
||
configuration = sec_agent_sdk.Configuration() | ||
|
||
# Configure API key authorization: APIKeyHeader | ||
configuration.api_key['APIKeyHeader'] = os.environ["API_KEY"] | ||
configuration.api_key["APIKeyHeader"] = "YOUR-API-KEY" | ||
|
||
# Enter a context with an instance of the API client | ||
with sec_agent_sdk.ApiClient(configuration) as api_client: | ||
with ApiClient(configuration) as api_client: | ||
# Create an instance of the API class | ||
api_instance = sec_agent_sdk.DefaultApi(api_client) | ||
form_type = FormType.EIGHT_K # FormType | 10-K | 10-Q | 8-K | 6-K | ||
company = 'AA' # ticker | ||
table = FilingTable.BALANCE_SHEET # FilingTable | 'cash-flow-statement' | 'income-statement' | 'balance-sheet' | 'business-segments-and-kpis' | ||
date_filed = '2024-04-17' # optional str (date string in YYYY-mm-dd) or None(the latest filing will be retrieved) | ||
api_instance = DefaultApi(api_client) | ||
form_type = FormType.EIGHT_K # FormType | 10-K | 10-Q | 8-K | 6-K | ||
company = "AAPL" # ticker | ||
table = ( | ||
FilingTable.BALANCE_SHEET | ||
) # FilingTable | 'cash-flow-statement' | 'income-statement' | 'balance-sheet' | ||
# date_filed = '2024-04-17' # optional str (date string in YYYY-mm-dd) or None(the latest filing will be retrieved) | ||
|
||
try: | ||
# Search sec filing | ||
api_response = api_instance.search_sec_filing(form_type, company, table, date_filed) | ||
api_response = api_instance.search_sec_filing_get(form_type, company, table) | ||
print("The response of DefaultApi->search_sec_filing:\n") | ||
pprint(api_response) | ||
|
||
# Search sec filing v2 | ||
api_response = api_instance.search_sec_filing_v2_get(form_type, company, table) | ||
print("The response of DefaultApi->search_sec_filing_v2:\n") | ||
pprint(api_response) | ||
except ApiException as e: | ||
print("Exception when calling DefaultApi->search_sec_filing: %s\n" % e) | ||
|
||
``` | ||
|
||
## Documentation for API Endpoints | ||
|
||
All URIs are relative to *https://c11yrich0c.execute-api.us-west-2.amazonaws.com* | ||
|
||
Class | Method | HTTP request | Description | ||
------------ | ------------- | ------------- | ------------- | ||
*DefaultApi* | [**health_check_health_get**](docs/DefaultApi.md#health_check_health_get) | **GET** /health | Health Check | ||
*DefaultApi* | [**search_filing_v1_sec_filing_get**](docs/DefaultApi.md#search_filing_v1_sec_filing_get) | **GET** /v1/sec-filing | Search Filing | ||
*DefaultApi* | [**search_filing_v2_v1_sec_filing_v2_get**](docs/DefaultApi.md#search_filing_v2_v1_sec_filing_v2_get) | **GET** /v1/sec-filing-v2 | Search Filing V2 | ||
|
||
|
||
## Documentation For Models | ||
|
||
- [CreateFiling](docs/CreateFiling.md) | ||
- [Filing](docs/Filing.md) | ||
- [FilingTable](docs/FilingTable.md) | ||
- [FilingV2](docs/FilingV2.md) | ||
- [FormType](docs/FormType.md) | ||
- [HTTPValidationError](docs/HTTPValidationError.md) | ||
- [LocationInner](docs/LocationInner.md) | ||
- [PatchFiling](docs/PatchFiling.md) | ||
- [ValidationError](docs/ValidationError.md) | ||
- [ValidationErrorLocInner](docs/ValidationErrorLocInner.md) | ||
|
||
|
||
<a id="documentation-for-authorization"></a> | ||
## Documentation For Authorization | ||
|
||
Endpoints do not require authorization. | ||
|
||
|
||
## Author | ||
|
||
|
||
|
||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,36 @@ | ||
# CreateFiling | ||
|
||
|
||
## Properties | ||
|
||
Name | Type | Description | Notes | ||
------------ | ------------- | ------------- | ------------- | ||
**company** | **str** | | | ||
**cik** | **str** | | [optional] [default to ''] | ||
**quarter** | **str** | | [optional] [default to ''] | ||
**date_filed** | **str** | | | ||
**url** | **str** | | [optional] [default to ''] | ||
**form_type** | **str** | | | ||
**table** | [**FilingTable**](FilingTable.md) | | | ||
**parsed** | **str** | | | ||
|
||
## Example | ||
|
||
```python | ||
from sec_agent_sdk.models.create_filing import CreateFiling | ||
|
||
# TODO update the JSON string below | ||
json = "{}" | ||
# create an instance of CreateFiling from a JSON string | ||
create_filing_instance = CreateFiling.from_json(json) | ||
# print the JSON string representation of the object | ||
print(CreateFiling.to_json()) | ||
|
||
# convert the object into a dict | ||
create_filing_dict = create_filing_instance.to_dict() | ||
# create an instance of CreateFiling from a dict | ||
create_filing_from_dict = CreateFiling.from_dict(create_filing_dict) | ||
``` | ||
[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) | ||
|
||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,41 @@ | ||
# FilingV2 | ||
|
||
FilingV2(*, company: str, cik: str, quarter: str, form_type: str, date_filed: datetime.date, url: str, table: str, parsed: str | None, accession_number: str, html_s3_url: str | None, image_s3_url: str | None, id: int = None) | ||
|
||
## Properties | ||
|
||
Name | Type | Description | Notes | ||
------------ | ------------- | ------------- | ------------- | ||
**company** | **str** | | | ||
**cik** | **str** | | | ||
**quarter** | **str** | | | ||
**form_type** | **str** | | | ||
**date_filed** | **date** | | | ||
**url** | **str** | | | ||
**table** | **str** | | | ||
**parsed** | **str** | | | ||
**accession_number** | **str** | | | ||
**html_s3_url** | **str** | | | ||
**image_s3_url** | **str** | | | ||
**id** | **int** | | [optional] | ||
|
||
## Example | ||
|
||
```python | ||
from sec_agent_sdk.models.filing_v2 import FilingV2 | ||
|
||
# TODO update the JSON string below | ||
json = "{}" | ||
# create an instance of FilingV2 from a JSON string | ||
filing_v2_instance = FilingV2.from_json(json) | ||
# print the JSON string representation of the object | ||
print(FilingV2.to_json()) | ||
|
||
# convert the object into a dict | ||
filing_v2_dict = filing_v2_instance.to_dict() | ||
# create an instance of FilingV2 from a dict | ||
filing_v2_from_dict = FilingV2.from_dict(filing_v2_dict) | ||
``` | ||
[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) | ||
|
||
|
Oops, something went wrong.