Skip to main content

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

Project description

Barchart API

Version: 0.6.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.6.0-py2.py3-none-any.whl (5.7 kB view details)

Uploaded Python 2 Python 3

File details

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

File metadata

File hashes

Hashes for barchart_api-0.6.0-py2.py3-none-any.whl
Algorithm Hash digest
SHA256 c12c3891ce93895223ffc2e9a2f7bb214ceb9a88f914604931fd6b498d435965
MD5 9090b0280cd1544dd6aefb2505aac7cf
BLAKE2b-256 ed70bcdbaa6ad1275ef5058b6d598f6a1f23866e2251634a04379f05d6b689d3

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