Skip to main content

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

Project description

https://img.shields.io/pypi/v/tiingo_prices.svg https://img.shields.io/travis/robren/tiingo_prices.svg 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.

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

tiingo_prices-0.3.1.tar.gz (16.2 kB view hashes)

Uploaded Source

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