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 details)

Uploaded Source

File details

Details for the file tiingo_prices-0.3.1.tar.gz.

File metadata

  • Download URL: tiingo_prices-0.3.1.tar.gz
  • Upload date:
  • Size: 16.2 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.2.0 pkginfo/1.5.0.1 requests/2.24.0 setuptools/41.2.0 requests-toolbelt/0.9.1 tqdm/4.48.2 CPython/3.8.2

File hashes

Hashes for tiingo_prices-0.3.1.tar.gz
Algorithm Hash digest
SHA256 2404106c6ad93ced118ab869e3b256f11acde7b33ef9e206f4781328d8cad8de
MD5 649ff8f2d5eb1577385359d9b54f5afd
BLAKE2b-256 f42ec8a0c094bc91c690c63dcc1b82642d501e7c4e33eae6161263990a342743

See more details on using hashes here.

Provenance

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