Skip to content

Commit e8f2780

Browse files
added Form 144 API - restricted stock sales notifications
1 parent ce591f9 commit e8f2780

File tree

5 files changed

+75
-1
lines changed

5 files changed

+75
-1
lines changed

README.md

Lines changed: 24 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -23,6 +23,7 @@
2323
**Ownership Data APIs**
2424

2525
- [Form 3/4/5 API - Insider Trading Disclosures](#insider-trading-data-api)
26+
- [Form 144 API - Restricted Stock Sales by Insiders](#form-144-api)
2627
- [Form 13F API - Institutional Investment Manager Holdings & Cover Pages](#form-13f-institutional-holdings-database)
2728
- [Form 13D/13G API - Activist and Passive Investor Holdings](#form-13d-13g-api)
2829
- [Form N-PORT API - Mutual Funds, ETFs and Closed-End Fund Holdings](#form-n-port-api)
@@ -700,6 +701,29 @@ print(insider_trades["transactions"])
700701
]
701702
```
702703

704+
## Form 144 API
705+
706+
The Form 144 API allows you to search and access all Form 144 filings from 2022 to present. Form 144 filings are filed with the SEC by corporate insiders who intend to sell restricted securities, such as vested stocks. The database includes information about the CIK and name of the insider, the issuer name and trading symbol, number of shares intended to be sold, the date of the transaction, the total value of the transaction, and more.
707+
708+
```python
709+
from sec_api import Form144Api
710+
711+
form144Api = Form144Api("YOUR_API_KEY")
712+
713+
search_params = {
714+
"query": "entities.ticker:TSLA",
715+
"from": "0",
716+
"size": "50",
717+
"sort": [{"filedAt": {"order": "desc"}}],
718+
}
719+
720+
response = form144Api.get_data(search_params)
721+
722+
print(response["data"])
723+
```
724+
725+
> See the documentation for more details: https://sec-api.io/docs/form-144-restricted-sales-api
726+
703727
## Form 13F Institutional Holdings Database
704728

705729
Access Form 13F holdings in structured JSON format, including information on current and historical portfolio holdings of SEC-registered funds and investment managers, including issuer name, title of the securities class, CUSIP, CIK and ticker of the holding, value of the position in dollar, the number of shares held, investment discretion, voting authority, and more.

examples.py

Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,7 @@
77
FormAdvApi,
88
#
99
InsiderTradingApi,
10+
Form144Api,
1011
Form13FHoldingsApi,
1112
Form13FCoverPagesApi,
1213
FormNportApi,
@@ -219,6 +220,25 @@
219220
# """
220221

221222

223+
#
224+
# Form 144 API Example
225+
#
226+
"""
227+
form144Api = Form144Api("YOUR_API_KEY")
228+
229+
search_params = {
230+
"query": "entities.ticker:TSLA",
231+
"from": "0",
232+
"size": "1",
233+
"sort": [{"filedAt": {"order": "desc"}}],
234+
}
235+
236+
response = form144Api.get_data(search_params)
237+
238+
print(response["data"])
239+
# """
240+
241+
222242
#
223243
# Form 13F Holdings API Example
224244
#

sec_api/__init__.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,7 @@
1010

1111
# Ownership APIs
1212
from sec_api.index import InsiderTradingApi
13+
from sec_api.index import Form144Api
1314
from sec_api.index import Form13FHoldingsApi
1415
from sec_api.index import Form13FCoverPagesApi
1516
from sec_api.index import FormNportApi

sec_api/index.py

Lines changed: 29 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,7 @@
1313
form_adv_endpoint = "https://api.sec-api.io/form-adv"
1414
#
1515
insider_api_endpoint = "https://api.sec-api.io/insider-trading"
16+
form_144_api_endpoint = "https://api.sec-api.io/form-144"
1617
form_13F_holdings_endpoint = "https://api.sec-api.io/form-13f/holdings"
1718
form_13F_cover_pages_endpoint = "https://api.sec-api.io/form-13f/cover-pages"
1819
form_nport_api_endpoint = "https://api.sec-api.io/form-nport"
@@ -434,6 +435,34 @@ def get_data(self, query):
434435
handle_api_error(response)
435436

436437

438+
class Form144Api:
439+
"""
440+
Base class for Form 144 API
441+
https://sec-api.io/docs/form-144-restricted-sales-api
442+
"""
443+
444+
def __init__(self, api_key, proxies=None):
445+
self.api_key = api_key
446+
self.api_endpoint = form_144_api_endpoint + "?token=" + api_key
447+
self.proxies = proxies if proxies else {}
448+
449+
def get_data(self, query):
450+
response = {}
451+
452+
for x in range(3):
453+
response = requests.post(
454+
self.api_endpoint, json=query, proxies=self.proxies
455+
)
456+
if response.status_code == 200:
457+
return response.json()
458+
elif response.status_code == 429:
459+
time.sleep(0.5 * (x + 1))
460+
else:
461+
handle_api_error(response)
462+
else:
463+
handle_api_error(response)
464+
465+
437466
class Form13FHoldingsApi:
438467
"""
439468
Base class for Form 13F Holdings API

setup.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@
55

66
setup(
77
name="sec-api",
8-
version="1.0.30",
8+
version="1.0.31",
99
author="SEC API",
1010
author_email="support@sec-api.io",
1111
description="SEC EDGAR Filings API",

0 commit comments

Comments
 (0)