Web scraper for ETF data from extraetf website.
Project description
extraetf-scraper
This is a web scraper for ETF (and stock) data from the extraetf website.
Extraetf is a German website, that provides information about ETFs, stocks, funds and crypto. It offers the ability to search, sort and filter ETFs and stocks by many metrics.
This Python package makes accessing the data from extraetf easier.
Usage
Install the package from PyPi
$ pip install extraetf-scraper
To import do
>>> from extraetf import etfs, stocks
Search for 100 stocks with highest performance last year and a marketcap > 10 billion EUR.
>>> response = stocks.search(sort_by="calculated_return_price_1y", ordering="desc", limit=100, filters={"ms_marketcap": {"gt": 10000000000}})
You can then show the top10 results like
>>> for entry in response[:10]:
... print(entry["year_1"], entry["isin"], entry["name"])
...
994.8275862 JP3236330001 Kioxia Holdings Corp
513.3682831 US7731221062 Rocket Lab USA Inc
495.1188986 US5017971046 L Brands Inc
435.3982301 CNE100001T72 Yangtze Optical Fibre and Cable Joint Stock Ltd Co
370.2093398 GB00B2QPKJ12 Fresnillo PLC
321.0526316 JP3148800000 Ibiden Co Ltd
306.25 US78392B1070 SK Hynix Inc
297.1493729 US5951121038 Micron Technology Inc.
283.9276323 IE00BKVD2N49 Seagate Technology Holdings PLC
274.3169399 US82575P1075 Sibanye Stillwater Ltd (ADR)
You can show all possible sort options for ETFs like
>>> etfs.show_sort_options()
['symbol', 'market_cap', 'return_year_to_date_real', 'ter', ...
Search for 500 ETFs with highest Sharpe ratio last year
>>> response = etfs.search(sort_by="sharpe_ratio_1_year", ordering="desc", limit=500)
>>> for entry in response[:10]:
... print(entry["sharpe_1"], entry["year_1"], entry["isin"], entry["name"])
...
18.42 None LU1190417599 Amundi Smart Overnight Return UCITS ETF C-EUR
18.37 None LU2082999306 Amundi Smart Overnight Return UCITS ETF D-EUR
12.34 2.44698 LU2898088419 Ossiam Serenity Euro
4.55 38.01092 LU1812092168 Amundi Stoxx Europe Select Dividend 30 UCITS ETF
4.54 2.50162 IE00BD9MMF62 JPMorgan EUR Ultra-Short Income Active UCITS ETF (Acc)
4.53 38.30012 DE0002635299 iShares STOXX Europe Select Dividend 30 UCITS ETF (DE)
4.47 2.56119 IE00BCRY6557 iShares € Ultrashort Bond UCITS ETF (Dist)
4.42 2.56116 IE000RHYOR04 iShares € Ultrashort Bond UCITS ETF (Acc)
4.36 45.89505 LU0592216393 Xtrackers Spain UCITS ETF (Acc)
4.36 45.93412 LU0994505336 Xtrackers Spain UCITS ETF (Dist)
For more examples have a look at the jupyter notebooks in the notebooks directory.
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file extraetf_scraper-0.1.3.tar.gz.
File metadata
- Download URL: extraetf_scraper-0.1.3.tar.gz
- Upload date:
- Size: 31.7 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: uv/0.9.7
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
5e3b96da0bd00065c61b75493d32dda802de590a9158fecf38c740ed3f6bdf15
|
|
| MD5 |
e132c40148d6bdb361369b219e3eb416
|
|
| BLAKE2b-256 |
2f141239bc75e2718b4d6e77d10afdfcf5459ebd727fbf99f62aea07c84ff34e
|
File details
Details for the file extraetf_scraper-0.1.3-py3-none-any.whl.
File metadata
- Download URL: extraetf_scraper-0.1.3-py3-none-any.whl
- Upload date:
- Size: 35.3 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: uv/0.9.7
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
e970a1fa37732e70f4da79fb06300f68f9e9d2b167435dd09f4b71b3020964e9
|
|
| MD5 |
dd30f17a6728a531c0d704ebed89c05c
|
|
| BLAKE2b-256 |
b9215491f0c718c4a60a3808844ff415b8dbcbb71a401d9e1e2cd1ce11304087
|