tiingo-prices

A CLI tool to get close of day price and annual dividends


Keywords
tiingo_prices, tiingo, finance
License
MIT
Install
pip install tiingo-prices==0.3.1

Documentation

tiingo_prices

Documentation Status Updates

A CLI tool to get a close of day price and annual dividends for a set of tickers. Uses the tiingo python API.

  • Free software: MIT license

Features

  • Uses the tiingo python API to obtain most recent closing prices for a number of tickers. The tickers being specified in a text file, one ticker per line.
  • Last years dividends are also obtained and calculated for each ticker.
  • Output is either written to stdout or to a specified file. Output is written in CSV format with Ticker,Price,Dividend on each line of the file.

Installation

pip install tiingo_prices

Usage

Set the environment variable TIINGO_API_KEY to the API key associated with your tiingo account.

export TIINGO_API_KEY='YourTiingoAPIKey'

For these close of day prices and divdends the API key provided with the free "starter" account will work.

$ tiingo_prices -h
usage: tiingo_prices [-h] [--output_file OUTPUT_FILE] [--nyse_pref][--version] ticker_file

Returns the most recent closing prices and last years dividends for stocks

positional arguments:
ticker_file           Ticker file name: One ticker per line

optional arguments:
-h, --help            Show this help message and exit.
--output_file OUTPUT_FILE
                      Output file name: Default writes to stdout.
--nyse_pref           Attempt to recognize NYSE Preferred ticker symbols
                      and convert to tiingo friendly format. Warning may
                      produce incorrect results for non NYSE stocks with PR
                      in their ticker name.
--version             Show program's version number and exit.

Credits

This package was created with Cookiecutter and the audreyr/cookiecutter-pypackage project template.