From 4dda0c69dd5fc8ada090eef0828c76f2f9aaa257 Mon Sep 17 00:00:00 2001 From: Kai Hu Date: Tue, 21 May 2024 02:49:07 +0800 Subject: [PATCH] feat: allow to skip date_filed query --- README.md | 7 ++++--- sec_agent_sdk/api/default_api.py | 2 +- 2 files changed, 5 insertions(+), 4 deletions(-) diff --git a/README.md b/README.md index ac76192..29de893 100644 --- a/README.md +++ b/README.md @@ -29,6 +29,7 @@ Please reach out at info@cambioml.com for an API key. ```python import sec_agent_sdk +from sec_agent_sdk import FormType, FilingTable from sec_agent_sdk.rest import ApiException from pprint import pprint @@ -43,12 +44,12 @@ with sec_agent_sdk.ApiClient(configuration) as api_client: 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 - date_filed = '2024-04-17' # str | date string in YYYY-mm-dd - table = FilingTable.INCOME_STATEMENT # FilingTable | 'cash-flow-statement' | 'income-statement' | 'balance-sheet' + table = FilingTable.BALANCE_SHEET # FilingTable | 'cash-flow-statement' | 'income-statement' | 'balance-sheet' + date_filed = '2024-04-17' # 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, date_filed, table) + api_response = api_instance.search_sec_filing(form_type, company, table, date_filed) print("The response of DefaultApi->search_sec_filing:\n") pprint(api_response) except ApiException as e: diff --git a/sec_agent_sdk/api/default_api.py b/sec_agent_sdk/api/default_api.py index d24c4ba..006e90f 100644 --- a/sec_agent_sdk/api/default_api.py +++ b/sec_agent_sdk/api/default_api.py @@ -208,8 +208,8 @@ def search_sec_filing_without_preload_content( self, form_type: FormType, company: StrictStr, - date_filed: StrictStr, table: FilingTable, + date_filed: Optional[StrictStr] = None, _request_timeout: Union[ None, Annotated[StrictFloat, Field(gt=0)],