stockfit-api 0.1.0__tar.gz
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- stockfit_api-0.1.0/.gitignore +9 -0
- stockfit_api-0.1.0/PKG-INFO +65 -0
- stockfit_api-0.1.0/README.md +48 -0
- stockfit_api-0.1.0/openapi.json +20768 -0
- stockfit_api-0.1.0/pyproject.toml +32 -0
|
@@ -0,0 +1,65 @@
|
|
|
1
|
+
Metadata-Version: 2.4
|
|
2
|
+
Name: stockfit-api
|
|
3
|
+
Version: 0.1.0
|
|
4
|
+
Summary: Official Python SDK for the StockFit API: SEC EDGAR financials, filings, fund and ETF data, ownership, insider transactions, and earnings.
|
|
5
|
+
Project-URL: Homepage, https://developer.stockfit.io
|
|
6
|
+
Project-URL: Repository, https://github.com/Second-Dot-LLC/stockfit-api
|
|
7
|
+
Author: Second Dot LLC
|
|
8
|
+
License-Expression: MIT
|
|
9
|
+
Keywords: api,edgar,etf,financials,fundamentals,sdk,sec,stockfit,stocks
|
|
10
|
+
Classifier: Operating System :: OS Independent
|
|
11
|
+
Classifier: Programming Language :: Python :: 3
|
|
12
|
+
Classifier: Typing :: Typed
|
|
13
|
+
Requires-Python: >=3.9
|
|
14
|
+
Requires-Dist: attrs>=22.2.0
|
|
15
|
+
Requires-Dist: httpx>=0.23.0
|
|
16
|
+
Description-Content-Type: text/markdown
|
|
17
|
+
|
|
18
|
+
# stockfit-api
|
|
19
|
+
|
|
20
|
+
Official Python SDK for the [StockFit API](https://developer.stockfit.io): SEC EDGAR financials, filings, fund and ETF data, ownership, insider transactions, and earnings.
|
|
21
|
+
|
|
22
|
+
Fully typed, generated from the StockFit OpenAPI spec. Sync and async, built on `httpx`.
|
|
23
|
+
|
|
24
|
+
## Install
|
|
25
|
+
|
|
26
|
+
```bash
|
|
27
|
+
pip install stockfit-api
|
|
28
|
+
```
|
|
29
|
+
|
|
30
|
+
Requires Python 3.9+.
|
|
31
|
+
|
|
32
|
+
## Usage
|
|
33
|
+
|
|
34
|
+
```python
|
|
35
|
+
from stockfit_api import AuthenticatedClient
|
|
36
|
+
from stockfit_api.api.company import company_details
|
|
37
|
+
from stockfit_api.api.financials import income_statement
|
|
38
|
+
from stockfit_api.models import IncomeStatementPeriod
|
|
39
|
+
|
|
40
|
+
client = AuthenticatedClient(base_url="https://api.stockfit.io/v1", token="fl_...")
|
|
41
|
+
|
|
42
|
+
profile = company_details.sync(client=client, symbol="AAPL")
|
|
43
|
+
print(profile.name)
|
|
44
|
+
|
|
45
|
+
income = income_statement.sync(client=client, symbol="AAPL", period=IncomeStatementPeriod.ANNUAL)
|
|
46
|
+
print(income)
|
|
47
|
+
```
|
|
48
|
+
|
|
49
|
+
Endpoint functions are grouped by area under `stockfit_api.api.*` (e.g. `company`, `financials`, `etfmf`, `sec_filings`, `ownership`, `earnings`, `price`). Query parameters are plain keyword arguments. Parameters with a fixed set of values (like `period`) are typed enums in `stockfit_api.models` (e.g. `IncomeStatementPeriod.ANNUAL`).
|
|
50
|
+
|
|
51
|
+
### Async
|
|
52
|
+
|
|
53
|
+
Every endpoint also exposes an async variant:
|
|
54
|
+
|
|
55
|
+
```python
|
|
56
|
+
profile = await company_details.asyncio(client=client, symbol="AAPL")
|
|
57
|
+
```
|
|
58
|
+
|
|
59
|
+
## Authentication
|
|
60
|
+
|
|
61
|
+
Get an API token from your [StockFit developer account](https://developer.stockfit.io). `AuthenticatedClient` sends it as a Bearer token automatically.
|
|
62
|
+
|
|
63
|
+
## License
|
|
64
|
+
|
|
65
|
+
MIT, Copyright Second Dot LLC. Use of the StockFit API itself is governed by the StockFit terms of service and your subscription.
|
|
@@ -0,0 +1,48 @@
|
|
|
1
|
+
# stockfit-api
|
|
2
|
+
|
|
3
|
+
Official Python SDK for the [StockFit API](https://developer.stockfit.io): SEC EDGAR financials, filings, fund and ETF data, ownership, insider transactions, and earnings.
|
|
4
|
+
|
|
5
|
+
Fully typed, generated from the StockFit OpenAPI spec. Sync and async, built on `httpx`.
|
|
6
|
+
|
|
7
|
+
## Install
|
|
8
|
+
|
|
9
|
+
```bash
|
|
10
|
+
pip install stockfit-api
|
|
11
|
+
```
|
|
12
|
+
|
|
13
|
+
Requires Python 3.9+.
|
|
14
|
+
|
|
15
|
+
## Usage
|
|
16
|
+
|
|
17
|
+
```python
|
|
18
|
+
from stockfit_api import AuthenticatedClient
|
|
19
|
+
from stockfit_api.api.company import company_details
|
|
20
|
+
from stockfit_api.api.financials import income_statement
|
|
21
|
+
from stockfit_api.models import IncomeStatementPeriod
|
|
22
|
+
|
|
23
|
+
client = AuthenticatedClient(base_url="https://api.stockfit.io/v1", token="fl_...")
|
|
24
|
+
|
|
25
|
+
profile = company_details.sync(client=client, symbol="AAPL")
|
|
26
|
+
print(profile.name)
|
|
27
|
+
|
|
28
|
+
income = income_statement.sync(client=client, symbol="AAPL", period=IncomeStatementPeriod.ANNUAL)
|
|
29
|
+
print(income)
|
|
30
|
+
```
|
|
31
|
+
|
|
32
|
+
Endpoint functions are grouped by area under `stockfit_api.api.*` (e.g. `company`, `financials`, `etfmf`, `sec_filings`, `ownership`, `earnings`, `price`). Query parameters are plain keyword arguments. Parameters with a fixed set of values (like `period`) are typed enums in `stockfit_api.models` (e.g. `IncomeStatementPeriod.ANNUAL`).
|
|
33
|
+
|
|
34
|
+
### Async
|
|
35
|
+
|
|
36
|
+
Every endpoint also exposes an async variant:
|
|
37
|
+
|
|
38
|
+
```python
|
|
39
|
+
profile = await company_details.asyncio(client=client, symbol="AAPL")
|
|
40
|
+
```
|
|
41
|
+
|
|
42
|
+
## Authentication
|
|
43
|
+
|
|
44
|
+
Get an API token from your [StockFit developer account](https://developer.stockfit.io). `AuthenticatedClient` sends it as a Bearer token automatically.
|
|
45
|
+
|
|
46
|
+
## License
|
|
47
|
+
|
|
48
|
+
MIT, Copyright Second Dot LLC. Use of the StockFit API itself is governed by the StockFit terms of service and your subscription.
|