Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add new funds: ARK Venture + 21shares #243

Merged
merged 8 commits into from
Jan 11, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
44 changes: 31 additions & 13 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -14,34 +14,52 @@ Endpoint Status: https://status.arkfunds.io
Click here to see a list of ARK ETFs
</summary>

- Actively Managed
- Active ETFs
- **ARKK** - ARK Innovation ETF
- **ARKQ** - ARK Autonomous Tech. & Robotics ETF
- **ARKW** - ARK Next Generation Internet ETF
- **ARKG** - ARK Genomic Revolution ETF
- **ARKF** - ARK Fintech Innovation ETF
- **ARKX** - ARK Space Exploration & Innovation ETF

- Indexed
- Digital Asset ETFs
- **ARKA** - ARK 21Shares Active Bitcoin Futures Strategy ETF
- **ARKB** - ARK 21Shares Bitcoin ETF
- **ARKC** - ARK 21Shares Active On-Chain Bitcoin Futures Strategy ETF
- **ARKD** - ARK 21Shares Blockchain and Digital Economy Innovation ETF
- **ARKY** - ARK 21Shares Active Bitcoin Ethereum Futures Strategy ETF
- **ARKZ** - ARK 21Shares Active Ethereum Futures Strategy ETF

- Index ETFs
- **PRNT** - The 3D Printing ETF
- **IZRL** - ARK Israel Innovative Technology ETF
- ~~**CTRU** - ARK Transparency ETF~~

- Other Funds
- **ARKVX** - ARK Venture Fund
</details>

---
The API contains data for trades, holdings and news from the following dates:

| | Trades | Holdings | News |
| :------: | :--------: | :--------: | :--------: |
| ARKF | 2020-09-09 | 2020-11-24 | 2020-05-07 |
| ARKG | 2020-09-09 | 2020-11-24 | 2020-04-18 |
| ARKK | 2020-09-09 | 2020-11-24 | 2020-04-07 |
| ARKQ | 2020-09-11 | 2020-11-24 | 2020-04-18 |
| ARKW | 2020-09-09 | 2020-11-24 | 2020-04-19 |
| ARKX | 2021-04-07 | 2021-03-26 | 2021-02-07 |
| IZRL | | 2020-11-24 | 2020-04-24 |
| PRNT | | 2020-11-24 | 2020-08-20 |
| CTRU[^1] | | 2021-12-09 | 2021-12-09 |
| | Type | Trades | Holdings | News |
| :------: | :---------------- | :--------: | :--------: | :--------: |
| ARKF | Active ETF | 2020-09-09 | 2020-11-24 | 2020-05-07 |
| ARKG | Active ETF | 2020-09-09 | 2020-11-24 | 2020-04-18 |
| ARKK | Active ETF | 2020-09-09 | 2020-11-24 | 2020-04-07 |
| ARKQ | Active ETF | 2020-09-11 | 2020-11-24 | 2020-04-18 |
| ARKW | Active ETF | 2020-09-09 | 2020-11-24 | 2020-04-19 |
| ARKX | Active ETF | 2021-04-07 | 2021-03-26 | 2021-02-07 |
| IZRL | Index ETF | - | 2020-11-24 | 2020-04-24 |
| PRNT | Index ETF | - | 2020-11-24 | 2020-08-20 |
| CTRU[^1] | Index ETF | - | 2021-12-09 | 2021-12-09 |
| ARKA | Digital Asset ETF | - | 2023-11-24 | 2022-09-26 |
| ARKB | Digital Asset ETF | - | 2024-01-11 | |
| ARKC | Digital Asset ETF | - | 2023-11-29 | 2023-11-13 |
| ARKD | Digital Asset ETF | - | 2023-11-28 | 2023-12-05 |
| ARKY | Digital Asset ETF | - | 2023-11-29 | 2023-11-17 |
| ARKZ | Digital Asset ETF | - | 2023-11-29 | 2023-11-16 |
| ARKVX | Venture Fund | - | 2023-10-31 | - |

---

Expand Down
1 change: 1 addition & 0 deletions app/api/v1/crud.py
Original file line number Diff line number Diff line change
Expand Up @@ -73,6 +73,7 @@ def get_stock_fundownership(db: Session, symbol: str):
.join(subq, and_(Holding.fund == subq.c.fund, Holding.date == subq.c.maxdate))
.filter(Holding.ticker == symbol)
.filter(Holding.fund.in_(funds))
.filter(Holding.shares.isnot(None))
.all()
)

Expand Down
5 changes: 5 additions & 0 deletions app/api/v2/crud.py
Original file line number Diff line number Diff line change
Expand Up @@ -105,6 +105,11 @@ def get_etf_holdings_dates(db: Session, symbols: str):
def get_etf_trades(
db: Session, symbols: str, start_date: str, end_date: str, limit: int
):
if not start_date:
start_date = datetime.now().date()
if not end_date:
end_date = datetime.now().date()

q = (
db.query(
Trades.fund,
Expand Down
10 changes: 5 additions & 5 deletions app/api/v2/schemas.py
Original file line number Diff line number Diff line change
Expand Up @@ -28,12 +28,12 @@ class V2_FundHoldingData(BaseModel):
date: datetime.date
ticker: str | None = None
company: str
cusip: str
shares: int
market_value: float
share_price: float
cusip: str | None = None
shares: int | None = None
market_value: float | None = None
share_price: float | None = None
weight: float
weight_rank: int
weight_rank: int | None = None

class Config:
from_attributes = True
Expand Down
9 changes: 8 additions & 1 deletion app/config.py
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
# OpenAPI settings
OPENAPI_TITLE = "ARK Invest API"
OPENAPI_API_VERSION = "2.4.4"
OPENAPI_API_VERSION = "2.5.0"
OPENAPI_DESCRIPTION = "API for tracking ARK Invest fund holdings and trades. This site is not affiliated with Ark Invest."
OPENAPI_CONTACT = "[email protected]"
OPENAPI_SERVER_URL = "https://arkfunds.io/api"
Expand All @@ -9,12 +9,19 @@

# ARK settings
FUNDS = [
"ARKA",
"ARKB",
"ARKC",
"ARKD",
"ARKZ",
"ARKY",
"ARKK",
"ARKQ",
"ARKW",
"ARKG",
"ARKF",
"ARKX",
"ARKVX",
"PRNT",
"IZRL",
"CTRU",
Expand Down
Loading