Skip to main content

The Unofficial API for barchart.com

Project description

barchart

The Unofficial API for barchart.com

Build Status PyPI version Python version Downloads

Installation

pip install barchart

Unusual Options Activity

from barchart import UOA

uoa = UOA()
uoa.data 

[
  {'Symbol': 'TGT', 'Price': '153.78', 'Type': 'Call', 'Strike': '160.00', 'Exp Date': '08/28/20', 'DTE': '9', 'Bid': '1.53', 'Midpoint': '1.55', 'Ask': '1.56', 'Last': '1.40', 'Volume': '7,382', 'Open Int': '165', 'Vol/OI': '44.74', 'IV': '38.08%', 'Last Trade': '13:19 ET'},
]

#Create CSV file

uoa.to_csv()

Concerns

The first time you ever run the render() method, it will download Chromium into your home directory (e.g. ~/.pyppeteer/). This only happens once. Additional necessary linux packages may need to be installed.

Timeout issues do sometimes occur when fetching with asycnc since data is loaded onto the DOM asynchronous. A Timeout Exception will be raised barchart.helpers.errors.TimeoutError At the moment, it takes about 1 minute to fetch and parse 10-12 pages.

If a parsing exception is raised, create a issue ticket. Parsing exceptions barchart.helpers.errors.ParsingError: Parsing error: Index error on table headers, check response

Sometimes barchart likes to suppress most of their data at different times of day.

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

barchart-0.1.3.tar.gz (5.4 kB view hashes)

Uploaded Source

Built Distribution

barchart-0.1.3-py3-none-any.whl (6.4 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