Giter Club home page Giter Club logo

yahoo-ticker-symbol-downloader's Introduction

Yahoo ticker downloader

Produces .csv, .json, .yaml, and .xls files (All files contain same data in a different format) for stocks, ETF, futures, indexes, mutual funds, currency, warrants and bonds. The ticker symbol, company name and exchange are saved. The category the symbol belongs to is only stored for stock symbols.

It gets its data from https://finance.yahoo.com/lookup/. Please note: it is not possible to get all the symbols due to limitations set by Yahoo. About 75%-90% of all symbols are gathered using this script depending on type.

Installation

From python package manager (preferred):

pip install Yahoo-ticker-downloader

From source:

python setup.py install

Running

The first param is one of the following types: stocks etf future index mutualfund currency warrant bond

YahooTickerDownloader.py stocks

The program takes several hours before any output is generated. The program supports suspending and resuming a download. Press CTRL+C to suspend download. Restart the program in the same working directory to resume downloading.

Example of output:

Ticker,Name,Exchange,categoryName,categoryNr
ENZ,"Enzo Biochem Inc.",NYQ,"Medical Laboratories & Research",525
ENZN,"Enzon Pharmaceuticals Inc.",NMS,Biotechnology,515
ENZR,"Energizer Resources Inc.",PNK,,0
EOAA.DE,"E.ON AG",GER,"Diversified Utilities",913
KMX,"CarMax Inc.",NYQ,"Auto Dealerships",744
KMY.MU,KIMBERLY-CLARK,MUN,"Personal Products",323
KN1.DU,ECOUNION,DUS,"Business Software & Services",826
KNCAY,"Konica Minolta Holdings Inc.",PNK,,0
KND,"Kindred Healthcare Inc.",NYQ,"Long-Term Care Facilities",523
KNDI,"Kandi Technologies, Corp",NGM,"Auto Manufacturers - Major",330
...ect

Depending on the type you are downloading, you will between 3.000 and 26.000 entries.

Further resources

Download history for symbols: ystockquote

Changelog

  • Version 0.7.0
    • Added --export option. It will transcode the .pickle file immediately to the desired output formats.
  • Version 0.6.0
    • Add 3 retries with an exponential back-off if HTTPError or ChunkedEncodingError is raised when processing _fetchHtml.
  • Version 0.5.0
    • Allows downloading using a insecure connection.
    • The temporarily download file-names now include the ticker type.
  • Version 0.4.0
    • Warrant symbols can now be downloaded.
    • Bond symbols can now be downloaded.
  • Version 0.3.0
    • Use https instead of http
    • Retry to fetch a page if it contains no symbols (A "fix" for issue #4)
    • Renamed all 'Curreny' to 'Currency'
    • Relative imports are used
    • Fix: .csv file it outputs is encoded in UTF-8 when using python2
    • Performance: Considerable reduced memory consumption
    • It now outputs .json, .yaml and .xls files in addition to .csv

yahoo-ticker-symbol-downloader's People

Contributors

benny- avatar revenazb avatar mgiustiniani avatar alanbertadev avatar totallybullshit avatar

Watchers

James Cloos avatar Francisco Godoy 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.