Skip to main content

Unofficial API for https://www.barchart.com/

Project description

Barchart API

Version: 0.7.0

Unofficial API for https://www.barchart.com/

API Calls:

  • Top Stocks to Own
  • Top ETFs to Own

Usage:

#!/usr/bin/python
# coding: utf-8
import barchart_api

barchart_client = barchart_api.Api(url="https://www.barchart.com/")
top_stocks_responses = barchart_client.get_top_stocks_top_own(max_pages=1)
top_stocks = []
for top_stocks_response in top_stocks_responses:
    try:
        top_stocks.append(top_stocks_response.json())
    except Exception as e:
        print(f"Top Stocks ERROR: {top_stocks_response}")
print(f"Top Stocks: {top_stocks}")

Install Instructions

Install Python Package

python -m pip install barchart-api

Build Instructions

Build Python Package

sudo chmod +x ./*.py
sudo pip install .
python3 setup.py bdist_wheel --universal
# Test Pypi
twine upload --repository-url https://test.pypi.org/legacy/ dist/* --verbose -u "Username" -p "Password"
# Prod Pypi
twine upload dist/* --verbose -u "Username" -p "Password"

Project details


Download files

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

Source Distributions

No source distribution files available for this release.See tutorial on generating distribution archives.

Built Distribution

barchart_api-0.7.0-py2.py3-none-any.whl (5.9 kB view details)

Uploaded Python 2 Python 3

File details

Details for the file barchart_api-0.7.0-py2.py3-none-any.whl.

File metadata

File hashes

Hashes for barchart_api-0.7.0-py2.py3-none-any.whl
Algorithm Hash digest
SHA256 6b1b5c9ca0c6b2e112de6248d3972192b370995158de5ba9f81a3d9851ff5cf0
MD5 9a99a33f6307338d9f83ebfb527b4679
BLAKE2b-256 93647f033170c34f8f632c03b55219d4e8c727f94dd4886741281da2464f902a

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