Giter Club home page Giter Club logo

barchart's Introduction

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%', 'Delta': '50', 'Last Trade': '13:19 ET'},
]

#Create CSV file

uoa.to_csv()

#Options

uoa = UOA(timeout=100, user_agent='whatever user agent you want to use')


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.

You have the option to pass in your own user in UOA(user_agent='Chrome...') Sometimes barchart will limit the amount of results based on what type of user agent you are using.

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, look at the above exception which ouputs the html in text. If the html response looks correct and the exception is still persisting, please create a issue ticket. Parsing exceptions barchart.helpers.errors.ParsingError: Parsing error: Index error on table headers, check html response above

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

barchart's People

Contributors

tke578 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.