Skip to content

Commit 79b4afd

Browse files
added Subsidiary API
added support for proxies added ADV Direct Owners (Sched A), Indirect Owners (Sched B), Private Funds (Sched D) APIs
1 parent 2392a3d commit 79b4afd

File tree

5 files changed

+242
-42
lines changed

5 files changed

+242
-42
lines changed

README.md

+84-4
Original file line numberDiff line numberDiff line change
@@ -18,6 +18,7 @@ It includes:
1818
- [Form ADV API](#form-adv-api)
1919
- [Form 13D/13G API](#form-13d-13g-api)
2020
- [Float (Outstanding Shares) API](#float-outstanding-shares-api)
21+
- [Subsidiary API](#subsidiary-api)
2122

2223
# Data Coverage
2324

@@ -763,7 +764,7 @@ Search the entire ADV filing database and find all ADV filings filed by firm adv
763764
individual advisers and firm brochures published in part 2 of ADV filings. The database comprises 41,000 ADV filings
764765
filed by advisory firms and 380,000 individual advisers and is updated daily.
765766
Search and find ADV filings by any filing property, such as CRD, assets under management,
766-
type of adviser (e.g. broker dealer) and more.
767+
type of adviser (e.g. broker dealer) and more. Direct owners from Schedule A, indirect owners from Schedule B as well as private funds from Schedule D are easily accessible.
767768

768769
```python
769770
from sec_api import FormAdvApi
@@ -778,9 +779,17 @@ response = formAdvApi.get_firms(
778779
"sort": [{"Info.FirmCrdNb": {"order": "desc"}}],
779780
}
780781
)
781-
782782
print(response["filings"])
783783

784+
direct_owners = formAdvApi.get_direct_owners(crd="793")
785+
print(direct_owners)
786+
787+
indirect_owners = formAdvApi.get_indirect_owners(crd="326262")
788+
print(indirect_owners)
789+
790+
private_funds = formAdvApi.get_private_funds(crd="793")
791+
print(private_funds)
792+
784793
response = formAdvApi.get_individuals(
785794
{
786795
"query": {"query_string": {"query": "CrntEmps.CrntEmp.orgPK:149777"}},
@@ -789,11 +798,9 @@ response = formAdvApi.get_individuals(
789798
"sort": [{"id": {"order": "desc"}}],
790799
}
791800
)
792-
793801
print(response["filings"])
794802

795803
response = formAdvApi.get_brochures(149777)
796-
797804
print(response["brochures"])
798805
```
799806

@@ -943,6 +950,79 @@ print(response["data"])
943950
}
944951
```
945952

953+
# Subsidiary API
954+
955+
```python
956+
from sec_api import SubsidiaryApi
957+
958+
subsidiaryApi = SubsidiaryApi("YOUR_API_KEY")
959+
960+
query = {
961+
"query": {"query_string": {"query": "ticker:TSLA"}},
962+
"from": "0",
963+
"size": "50",
964+
"sort": [{"filedAt": {"order": "desc"}}],
965+
}
966+
967+
response = subsidiaryApi.get_data(query)
968+
969+
print(response["data"])
970+
```
971+
972+
> See the documentation for more details: https://sec-api.io/docs/subsidiary-api
973+
974+
### Response Example | Subsidiary API
975+
976+
```json
977+
{
978+
"data": [
979+
{
980+
"id": "6838a63b29128e116bde65c885282667",
981+
"accessionNo": "0000950170-23-001409",
982+
"filedAt": "2023-01-30T21:29:15-05:00",
983+
"cik": "1318605",
984+
"ticker": "TSLA",
985+
"companyName": "Tesla, Inc.",
986+
"subsidiaries": [
987+
{
988+
"name": "Alabama Service LLC",
989+
"jurisdiction": "Delaware"
990+
}
991+
{
992+
"name": "Alset Warehouse GmbH",
993+
"jurisdiction": "Germany"
994+
},
995+
{
996+
"name": "BT Connolly Storage, LLC",
997+
"jurisdiction": "Texas"
998+
},
999+
{
1000+
"name": "Fotovoltaica GI 4, S. de R.L. de C.V.",
1001+
"jurisdiction": "Mexico"
1002+
},
1003+
// ... more subsidiaries
1004+
},
1005+
// ... more historical lists of subsidiaries
1006+
]
1007+
}
1008+
```
1009+
1010+
# Proxy Support
1011+
1012+
In certain cases, your corporate IT infrastructure may encounter issues with HTTPS requests, leading to SSL certificate errors. To resolve this, HTTP and HTTPS proxies can be passed into all API wrappers as shown in the example below. If you're unsure about which proxies to use, please consult your company's IT administrator.
1013+
1014+
```python
1015+
from sec_api import QueryApi, RenderApi, ...
1016+
1017+
proxies = {
1018+
"http": "http://your-proxy.com",
1019+
"https": "https://your-proxy.com",
1020+
}
1021+
1022+
queryApi = QueryApi(api_key="YOUR_API_KEY", proxies=proxies)
1023+
renderApi = RenderApi(api_key="YOUR_API_KEY", proxies=proxies)
1024+
```
1025+
9461026
# Query API Response Format
9471027

9481028
- `accessionNo` (string) - Accession number of filing, e.g. 0000028917-20-000033

examples.py

+30-3
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,7 @@
1010
FormAdvApi,
1111
FloatApi,
1212
Form13DGApi,
13+
SubsidiaryApi,
1314
)
1415

1516
#
@@ -182,9 +183,19 @@
182183
"sort": [{"Info.FirmCrdNb": {"order": "desc"}}],
183184
}
184185
)
185-
186186
print(response["filings"])
187187
188+
189+
direct_owners = formAdvApi.get_direct_owners(crd="793")
190+
print(direct_owners)
191+
192+
indirect_owners = formAdvApi.get_indirect_owners(crd="326262")
193+
print(indirect_owners)
194+
195+
private_funds = formAdvApi.get_private_funds(crd="793")
196+
print(private_funds)
197+
198+
188199
response = formAdvApi.get_individuals(
189200
{
190201
"query": {"query_string": {"query": "CrntEmps.CrntEmp.orgPK:149777"}},
@@ -193,11 +204,9 @@
193204
"sort": [{"id": {"order": "desc"}}],
194205
}
195206
)
196-
197207
print(response["filings"])
198208
199209
response = formAdvApi.get_brochures(149777)
200-
201210
print(response["brochures"])
202211
# """
203212

@@ -232,3 +241,21 @@
232241
response = form13DGApi.get_data(query)
233242
print(response["filings"])
234243
# """
244+
245+
246+
#
247+
# Subsidiary API Example
248+
#
249+
"""
250+
subsidiaryApi = SubsidiaryApi("YOUR_API_KEY")
251+
252+
query = {
253+
"query": {"query_string": {"query": "ticker:TSLA"}},
254+
"from": "0",
255+
"size": "50",
256+
"sort": [{"filedAt": {"order": "desc"}}],
257+
}
258+
259+
response = subsidiaryApi.get_data(query)
260+
print(response["data"])
261+
# """

sec_api/__init__.py

+1
Original file line numberDiff line numberDiff line change
@@ -12,3 +12,4 @@
1212
from sec_api.index import FormAdvApi
1313
from sec_api.index import Form13DGApi
1414
from sec_api.index import FloatApi
15+
from sec_api.index import SubsidiaryApi

0 commit comments

Comments
 (0)