|
3 | 3 | **sec-api** is a Python package for querying the entire SEC filings corpus in real-time without the need to download filings. |
4 | 4 | It includes: |
5 | 5 |
|
6 | | -- Query and Full-Text Search API |
7 | | -- Real-Time Stream API |
8 | | -- XBRL-to-JSON Converter API + Financial Statements |
9 | | -- 10-K/10-Q/8-K Section Extraction API |
10 | | -- Filing Render & Download API |
11 | | -- Executive Compensation Data API |
| 6 | +- [Query and Full-Text Search API](#sec-edgar-filings-query-api) |
| 7 | +- [Real-Time Stream API](#sec-edgar-filings-real-time-stream-api) |
| 8 | +- [XBRL-to-JSON Converter API + Financial Statements](#xbrl-to-json-converter-api) |
| 9 | +- [10-K/10-Q/8-K Section Extraction API](#10-k-10-q-8-k-section-extractor-api) |
| 10 | +- [Filing Download & PDF Render API](#filing-render-download-api) |
| 11 | +- [Executive Compensation Data API](#executive-compensation-data-api) |
| 12 | +- [Insider Trading Data API](#insider-trading-data-api) |
| 13 | +- [13F Institutional Investor Database](#13f-institutional-investor-database) |
| 14 | +- [CUSIP/CIK/Ticker Mapping API](#cusip-cik-ticker-mapping-api) |
12 | 15 |
|
13 | 16 |
|
14 | 17 | # Data Coverage |
@@ -86,6 +89,7 @@ query = { |
86 | 89 | filings = queryApi.get_filings(query) |
87 | 90 | ``` |
88 | 91 |
|
| 92 | +## 13F Institutional Investor Database |
89 | 93 | Fetch most recent 13F filings that hold Tesla |
90 | 94 |
|
91 | 95 | ```python |
@@ -627,6 +631,77 @@ result_query = execCompApi.get_data(query) |
627 | 631 |
|
628 | 632 | > See the documentation for more details: https://sec-api.io/docs/executive-compensation-api |
629 | 633 |
|
| 634 | +# Insider Trading Data API |
| 635 | + |
| 636 | +The Insider Trading Data API allows you to search and list all insider buy and sell transactions of all publicly listed |
| 637 | +companies on US stock exchanges. Insider activities of company directors, officers, 10% owners and other executives are |
| 638 | +fully searchable. The insider trading database includes information about the CIK and name of the insider, |
| 639 | +her/his relationship to the company, the number of shares and securities purchased or sold, the purchase or selling price, |
| 640 | +the date of the transaction, the amount of securities held before and after the transaction occured, any footnotes such |
| 641 | +as the effect of Rule 10b-18 or 10b5-1 stock purchase plans and more. The full list of all data points is available below. |
| 642 | + |
| 643 | +```python |
| 644 | +from sec_api import InsiderTradingApi |
| 645 | + |
| 646 | +insiderTradingApi = InsiderTradingApi("YOUR_API_KEY") |
| 647 | + |
| 648 | +insider_trades = insiderTradingApi.get_data({ |
| 649 | + "query": {"query_string": {"query": "issuer.tradingSymbol:TSLA"}} |
| 650 | +}) |
| 651 | + |
| 652 | +print(insider_trades["transactions"]) |
| 653 | +``` |
| 654 | + |
| 655 | +### Response Example |
| 656 | +```json |
| 657 | +[ |
| 658 | + { |
| 659 | + "accessionNo": "0000899243-22-028189", |
| 660 | + "filedAt": "2022-08-09T21:23:00-04:00", |
| 661 | + "documentType": "4", |
| 662 | + "periodOfReport": "2022-08-09", |
| 663 | + "issuer": {"cik": "1318605", "name": "Tesla, Inc.", "tradingSymbol": "TSLA"}, |
| 664 | + "reportingOwner": { |
| 665 | + "cik": "1494730", |
| 666 | + "name": "Musk Elon", |
| 667 | + "address": { |
| 668 | + "street1": "C/O TESLA, INC.", |
| 669 | + "street2": "1 TESLA ROAD", |
| 670 | + "city": "AUSTIN", |
| 671 | + "state": "TX", |
| 672 | + "zipCode": "78725" |
| 673 | + }, |
| 674 | + "relationship": { |
| 675 | + "isDirector": true, |
| 676 | + "isOfficer": true, |
| 677 | + "officerTitle": "CEO", |
| 678 | + "isTenPercentOwner": true, |
| 679 | + "isOther": false |
| 680 | + } |
| 681 | + }, |
| 682 | + "nonDerivativeTable": { |
| 683 | + "transactions": [ |
| 684 | + { |
| 685 | + "securityTitle": "Common Stock", |
| 686 | + "transactionDate": "2022-08-09", |
| 687 | + "coding": { |
| 688 | + "formType": "4", |
| 689 | + "code": "S", |
| 690 | + "equitySwapInvolved": false |
| 691 | + }, |
| 692 | + "amounts": { |
| 693 | + "shares": 435, |
| 694 | + "pricePerShare": 872.469, |
| 695 | + "pricePerShareFootnoteId": ["F1"], |
| 696 | + "acquiredDisposedCode": "D" |
| 697 | + } |
| 698 | + } |
| 699 | + ] |
| 700 | + // and many more |
| 701 | + } |
| 702 | + } |
| 703 | +] |
| 704 | +``` |
630 | 705 |
|
631 | 706 | # Query API Response Format |
632 | 707 |
|
|
0 commit comments