Skip to main content

A Python library for scraping financial data from various sources.

Project description

MarketMiner

MarketMiner is a Python library for scraping finance-related information — from market news to company fundamentals — in an easy and structured way.

It is designed for analysts, traders, and developers who want quick programmatic access to financial data without relying on expensive APIs.

Features

  • News Scraper: Get historical news articles from various sources.
  • Company Fundamentals: Access financial statements and key metrics for public companies.
  • Macroeconomic Data: Fetch macroeconomic indicators.

Installation

pip install marketminer

Usage

1. Scraping News Articles

from marketminer import scrape_economic_times

df = scrape_economic_times(start_date='2023-01-01', end_date='2023-10-01')
print(df.head())

2. Fetching Company Fundamentals

from marketminer import scrape_fundamentals
financial_data = scrape_fundamentals("TCS")

print("Profit & Loss Statement:")
print(financial_data['profit_loss'].head())
print("Balance Sheet:")
print(financial_data['balance_sheet'].head())

3. Scraping Macroeconomic Data

from marketminer import scrape_macro_india
macro_data = scrape_macro_india(start_date='2023-01-01', end_date='2023-10-01')
for time_control, data in macro_data.items():
    print(f"{time_control} Data:")
    print(data.head())

Dependencies

  • requests: For making HTTP requests.
  • pandas: For data manipulation and analysis.
  • beautifulsoup4: For parsing HTML content.
  • selenium: For web scraping dynamic content.
  • openpyxl: For reading Excel files.'

Note: For fundamentals and macroeconomic scraping, ensure you have Google Chrome + ChromeDriver installed.

License

MIT License. Free to use and modify.

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

marketminer-0.5.0.tar.gz (8.9 kB view details)

Uploaded Source

Built Distribution

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

marketminer-0.5.0-py3-none-any.whl (9.1 kB view details)

Uploaded Python 3

File details

Details for the file marketminer-0.5.0.tar.gz.

File metadata

  • Download URL: marketminer-0.5.0.tar.gz
  • Upload date:
  • Size: 8.9 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.1.0 CPython/3.12.3

File hashes

Hashes for marketminer-0.5.0.tar.gz
Algorithm Hash digest
SHA256 d267ded3b1cd00144b1660c3676ef3373f55807dc334a8ca78484d0fad8f2fee
MD5 24d827352315132a02785a205fe3943a
BLAKE2b-256 9a5052faed49265b7f2bd7a025541cac29409829e40538ad7cc8caecce66dca0

See more details on using hashes here.

File details

Details for the file marketminer-0.5.0-py3-none-any.whl.

File metadata

  • Download URL: marketminer-0.5.0-py3-none-any.whl
  • Upload date:
  • Size: 9.1 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.1.0 CPython/3.12.3

File hashes

Hashes for marketminer-0.5.0-py3-none-any.whl
Algorithm Hash digest
SHA256 1c7915080bd327171c87b924146e9c5158a26bb4cec7e4dccdca3bf6553be33a
MD5 e46f13edf124153b0709337d4cdbf36d
BLAKE2b-256 558680efe5446340ecdf5aa7c4900c7615350030b89b9efe6eed8b7f9975a4b9

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