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.
Metadata
Release files for tiingo-prices 0.3.1
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | |
|---|---|---|---|
| tiingo_prices-0.3.1.tar.gz | 16.2 kB | Details |
Release files / tiingo_prices-0.3.1.tar.gz
| Download URL | tiingo_prices-0.3.1.tar.gz |
|---|---|
| Size | 16.2 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
2404106c6ad93ced118ab869e3b256f11acde7b33ef9e206f4781328d8cad8de
|
|
BLAKE2b-256 checksum How to use checksums |
f42ec8a0c094bc91c690c63dcc1b82642d501e7c4e33eae6161263990a342743
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is 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
|