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
Release history Release notifications | RSS feed
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
File details
Details for the file barchart_api-0.6.0-py2.py3-none-any.whl
.
File metadata
- Download URL: barchart_api-0.6.0-py2.py3-none-any.whl
- Upload date:
- Size: 5.7 kB
- Tags: Python 2, Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/4.0.2 CPython/3.10.6
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | c12c3891ce93895223ffc2e9a2f7bb214ceb9a88f914604931fd6b498d435965 |
|
MD5 | 9090b0280cd1544dd6aefb2505aac7cf |
|
BLAKE2b-256 | ed70bcdbaa6ad1275ef5058b6d598f6a1f23866e2251634a04379f05d6b689d3 |