Skip to main content

Morningstar fund scraper

Project description

Morningstar Fund Scraper

Morningstar Fund Scraper is a versatile Python package designed to extract financial fund data directly from the Morningstar website. It simplifies the process of accessing up-to-date fund information for financial analysis and research.

Installation

Install the package effortlessly using pip:

pip install morningstar-fund-scraper

Usage

To begin, locate your desired fund on the Morningstar website. For instance, navigate to Morningstar Fund Snapshot and note the fund ID.

In this example, the fund ID is F00000PYZ6. This ID will be used to fetch data for the specified fund.

from morningstar_fund_scraper import Fund

# Initialize the Fund object with an optional perfid parameter
fund = Fund(perfid="F00000PYZ6")

# Get the latest Net Asset Value (NAV) data for the fund
nav_data = fund.get_nav()

print(nav_data)

Example Output

The get_nav() method returns a dictionary containing the fund name, NAV, currency, and date:

{'fund': 'Länsförsäkringar Global Index', 'nav': '452,35', 'currency': 'SEK', 'date': '2024-04-29'}

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

morningstar_fund_scraper-0.1.0.tar.gz (3.2 kB view hashes)

Uploaded Source

Built Distribution

morningstar_fund_scraper-0.1.0-py3-none-any.whl (3.7 kB view hashes)

Uploaded Python 3

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