Skip to main content

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


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

extraetf_scraper-0.1.2.tar.gz (31.7 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

extraetf_scraper-0.1.2-py3-none-any.whl (35.3 kB view details)

Uploaded Python 3

File details

Details for the file extraetf_scraper-0.1.2.tar.gz.

File metadata

  • Download URL: extraetf_scraper-0.1.2.tar.gz
  • Upload date:
  • Size: 31.7 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: uv/0.9.7

File hashes

Hashes for extraetf_scraper-0.1.2.tar.gz
Algorithm Hash digest
SHA256 bd4817a68df1b6bf61de140fce8831f995eb555f1a4341fca64cdaf78e349434
MD5 f698ebdf9b8957a32e7cd6b52574911c
BLAKE2b-256 3d38f102c8080239cb9907420d9ce139d5d442bc4c5ca42b5d3648dc7baf1d7f

See more details on using hashes here.

File details

Details for the file extraetf_scraper-0.1.2-py3-none-any.whl.

File metadata

File hashes

Hashes for extraetf_scraper-0.1.2-py3-none-any.whl
Algorithm Hash digest
SHA256 53f7b209fc08171262604ae5ea2242657f58a64a8b3c90eaf3fe8fb87eedf784
MD5 86d50626b311c47f0080ff6231151075
BLAKE2b-256 fcd9ada75067028946c5ba6751f6077bc1d7546863d25d21d1bc1aa32294c5f1

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page