Giter VIP home page Giter VIP logo

tstock's Introduction

Gbox4

  • I'm currently working on tstock, a command line tool for generating graphs in the terminal
  • I'm also trying to learn Rust ๐Ÿฆ€
  • I'm going to try and build a TUI interface for paper trading next.
  • Feel free to check out my website for more info! https://gabebanks.net
  • Buy me a coffee: https://www.buymeacoffee.com/Gbox4

Most used languages

tstock's People

Contributors

ahplummer avatar gbox4 avatar paul2048 avatar samuel3k avatar ueiwang avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar

tstock's Issues

Price on Chart 10% lower

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)

Add support for currencies besides USD

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.

Error in launching tstock - no module name 'numpy'

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

Terminal window with command closes immediately

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.

Cannot print the graph in Windows Bash

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

image

Put API key in a configuration file?

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.

Support -c [lower case ticker]

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'

Unable to detect the screen size if wrapped with 'watch'?

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

tstock command returns "Error: The API did not return data." when using non-premium AlphaVantage api key

The simple command format tstock {stock name abbreviation} no longer works as AlphaVantage has made the TIME_SERIES_DAILYfunction 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'

Add a .clang-format

To keep a consistent style in the code, it'd be nice to have a clang format config in this project.

Dockerfile for make

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.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.