Skip to main content

Scrape ETFs from ETFDB

Project description

pyetfdb_scraper

pyetfdb_scraper is a Python library for extracting ETF data directly from ETFDB, a website providing one of the largest ETF Databases containing ETFs from a vast range of asset classes, industries, issuers, and investment styles.

Quick Start

Install with pip as a package pip. See the pip package here https://pypi.org/project/pyetfdb-scraper/.

pip install pyetfdb-scraper
from pyetfdb_scraper import etf

Example Usage

from pyetfdb_scraper.etf import ETF,load_etfs 
# returns list of available ETFs.
etfs = load_etfs()
# load etf
vwo = ETF('VWO')
# Get basic ETF information
print(vwo.info)
>>> {
     '52 Week Hi': '$55.78',
     '52 Week Lo': '$47.65',
     'AUM': '$80,421.8 M',
     'Asset Class': 'Equity',
     'Asset Class Size': 'Large-Cap',
     'Asset Class Style': 'Blend',
     'Brand': 'https://etfdb.com/issuer/vanguard/',
     'Category': 'Size and Style',
     'Category:': 'Emerging Markets Equities',
     'Change:': '$0.25 (-0.0%)',
     'ETF Home Page': 'https://advisors.vanguard.com/investments/products/bnd/vanguard-total-bond-market-etf',
     'Expense Ratio': '0.10%',
     'Focus': 'Total Market',
     'Inception': 'Mar 04, 2005',
     'Index Tracked': 'https://etfdb.com/index/ftse-custom-emerging-markets-all-cap-china-a-inclusion-net-tax-us-ric-index/',
     'Issuer': 'https://etfdb.com/issuer/vanguard/',
     'Last Updated:': 'Dec 09, 2021',
     'Niche': 'Broad-based',
     'P/E Ratio': '7.00',
     'Price:': '$50.14',
     'Region (General)': 'Emerging Markets',
     'Region (Specific)': 'Broad',
     'Segment': 'Equity: Emerging Markets  -  Total Market',
     'Shares': '1,603.3 M',
     'Strategy': 'Vanilla',
     'Structure': 'ETF',
     'Weighting Scheme': 'Market Cap'
 }

print(vwo.technicals)

>>> {
     '20 Day MA': '$50.45',
     '60 Day MA': '$50.74',
     'Average Spread ($)': '1.00',
     'Average Spread (%)': '1.00',
     'Lower Bollinger (10 Day)': '$48.64',
     'Lower Bollinger (20 Day)': '$48.33',
     'Lower Bollinger (30 Day)': '$48.81',
     'MACD 100 Period': '-0.74',
     'MACD 15 Period': '0.20',
     'Maximum Premium Discount (%)': '0.82',
     'Median Premium Discount (%)': '0.27',
     'RSI 10 Day': '49',
     'RSI 20 Day': '47',
     'RSI 30 Day': '47',
     'Resistance Level 1': 'n/a',
     'Resistance Level 2': '$50.53',
     'Stochastic Oscillator %D (1 Day)': '53.54',
     'Stochastic Oscillator %D (5 Day)': '73.08',
     'Stochastic Oscillator %K (1 Day)': '55.09',
     'Stochastic Oscillator %K (5 Day)': '57.68',
     'Support Level 1': 'n/a',
     'Support Level 2': '$49.86',
     'Tracking Difference Max Downside (%)': '-0.87',
     'Tracking Difference Max Upside (%)': '0.16',
     'Tracking Difference Median (%)': '-0.36',
     'Ultimate Oscillator': '47',
     'Upper Bollinger (10 Day)': '$50.47',
     'Upper Bollinger (20 Day)': '$52.61',
     'Upper Bollinger (30 Day)': '$52.50',
     'Williams % Range 10 Day': '19.32',
     'Williams % Range 20 Day': '59.31'
}

Help Needed!

I am working full-time, and as such don't have much time to constantly push commits or updates. I will appreciate if some help can be provided, such as:

  • Unit tests for the current code
  • ETF Category has yet to be updated

Disclaimer

This package is built with some reference to the existing pyetf package creted by Jakub Pluta, which has since not been actively maintained.

Contributing

Pull requests are welcome.

License

MIT License

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

pyetfdb_scraper-0.1.3.tar.gz (23.1 kB view details)

Uploaded Source

Built Distribution

pyetfdb_scraper-0.1.3-py3-none-any.whl (24.9 kB view details)

Uploaded Python 3

File details

Details for the file pyetfdb_scraper-0.1.3.tar.gz.

File metadata

  • Download URL: pyetfdb_scraper-0.1.3.tar.gz
  • Upload date:
  • Size: 23.1 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/4.0.2 CPython/3.9.16

File hashes

Hashes for pyetfdb_scraper-0.1.3.tar.gz
Algorithm Hash digest
SHA256 8acbdbaf04fe6a6e3a4beae21c5a8ea4d087fdc4ddee44f6d0c915a07637bb45
MD5 16b995edbc693b0b85f3030e2b9763c0
BLAKE2b-256 f3d53c4e11f801fcb3e8a7ecd46f26c8a8987cde8e573f1e336ef474b59023b8

See more details on using hashes here.

File details

Details for the file pyetfdb_scraper-0.1.3-py3-none-any.whl.

File metadata

File hashes

Hashes for pyetfdb_scraper-0.1.3-py3-none-any.whl
Algorithm Hash digest
SHA256 bd3d30546446118d76a1c488816006f462bebc79c588a790a7d93c62c040d376
MD5 623912d7b850bba9673c23e57c66f92f
BLAKE2b-256 9d30ce5b83a4a1c7958cdf3e15ab04de548150236c2f084f37e454144fc541af

See more details on using hashes here.

Supported by

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