gbox4 / tstock Goto Github PK
View Code? Open in Web Editor NEW๐A command line tool to view stock charts in the terminal.
License: GNU General Public License v3.0
๐A command line tool to view stock charts in the terminal.
License: GNU General Public License v3.0
The currency will always be displayed as USD, even if the data is from a foreign market of a different currency. Additionally, it will be displayed as USD even if it is a unitless measure, like an index.
this is a test
Line 416 in 964f879
For example, $ tstock btc -c UYU
works fine but $ tstock btc -c uyu
doesn't.
Output when trying to use the lowercase ticker:
File "/home/mcbruno712/.local/bin/tstock", line 8, in <module>
sys.exit(main())
File "/home/mcbruno712/.local/lib/python3.8/site-packages/tstock/core.py", line 427, in main
opts = parse_args(parser)
File "/home/mcbruno712/.local/lib/python3.8/site-packages/tstock/parse.py", line 75, in parse_args
opts['currency_symbol'] = currency_symbols[args.c]
KeyError: 'uyu'
To keep a consistent style in the code, it'd be nice to have a clang format config in this project.
The simple command format tstock {stock name abbreviation}
no longer works as AlphaVantage has made the TIME_SERIES_DAILY
function premium only. The TIME_SERIES_DAILY_ADJUSTED
function is not premium only and works fine as far as i can tell.
To make tstock use TIME_SERIES_DAILY_ADJUSTED
change line 148 of core.py from api_function = 'TIME_SERIES_DAILY'
to
api_function = 'TIME_SERIES_DAILY_ADJUSTED'
The candles on the chart seem to be about 10% lower on every stock.
Probably the prices are right, but the y-axis labeling is somehow off.
I have everything in USD, but it could also be that it somehow gets converted to EURO.(Cause the exchange is about 10% lower)
When I start something line alacritty -e tstock btc, new window with chart appears for half of a second and closes immediately. I use dwm + alalcritty. I did the same operation with st and got the same result.
Hey, could you make a Dockerfile that will run the make build? It would be much simpler for people to install without having to worry about required compiler, settings and libs.
Launching tstock would produce error as shown :
Traceback (most recent call last):
File "/usr/bin/tstock", line 33, in
sys.exit(load_entry_point('tstock==2.1.2', 'console_scripts', 'tstock')())
File "/usr/bin/tstock", line 25, in importlib_load_entry_point
return next(matches).load()
File "/usr/lib/python3.10/importlib/metadata/init.py", line 162, in load
module = import_module(match.group('module'))
File "/usr/lib/python3.10/importlib/init.py", line 126, in import_module
return _bootstrap._gcd_import(name[level:], package, level)
File "", line 1050, in _gcd_import
File "", line 1027, in _find_and_load
File "", line 1006, in _find_and_load_unlocked
File "", line 688, in _load_unlocked
File "", line 883, in exec_module
File "", line 241, in _call_with_frames_removed
File "/usr/lib/python3.10/site-packages/tstock/main.py", line 3, in
from .core import main
File "/usr/lib/python3.10/site-packages/tstock/core.py", line 7, in
import numpy as np
ModuleNotFoundError: No module named 'numpy'
Installed from AUR package
OS : EndeavourOS
Kernel: 5.16.4-arch1-1
Maybe it would be better to use a config file ~/.config/tstock/config to put in the API key. This way it would work from every shell and I think it is simpler to edit a config file than to add an environment variable. Also the config could be used for other things in the future.
hi, I am using Git Bash and after installing tstock
with pip and setting the Alphavantage API key (for anyone interested in how to do this see here) the program fails to print out the graph.
I am getting UnicodeEncodeError: 'charmap' codec can't encode characters in position 7-8: character maps to <undefined>
error. i have attached the screenshot below. Looks like the error is at line 379 from core.py
and it might need fixing by forcing UTF-8 encoding ( I am not sure).
When using with watch
, like watch --interval 20 tstock btc
, tstock
seems to fail while detecting the screen size:
Traceback (most recent call last):
File "/Library/Frameworks/Python.framework/Versions/3.9/bin/tstock", line 8, in <module>
sys.exit(main())
File "/Library/Frameworks/Python.framework/Versions/3.9/lib/python3.9/site-packages/tstock/core.py", line 428, in main
opts = parse_args(parser)
File "/Library/Frameworks/Python.framework/Versions/3.9/lib/python3.9/site-packages/tstock/parse.py", line 47, in parse_args
t = os.get_terminal_size()
OSError: [Errno 25] Inappropriate ioctl for device
If you view a many-month chart of a stock, say tstock aapl -t month
for example, the results show a massive drop in price when the stock was split.
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.