All Projects β†’ Gbox4 β†’ tstock

Gbox4 / tstock

Licence: GPL-3.0 license
πŸ“ˆA command line tool to view stock charts in the terminal.

Programming Languages

python
139335 projects - #7 most used programming language

Projects that are alternatives of or similar to tstock

Sumzerotrading
A Java API for Developing Automated Trading Applications for the Equity, Futures, and Currency Markets
Stars: ✭ 128 (-74.3%)
Mutual labels:  trading, stock-market, stocks
cira
Cira algorithmic trading made easy. A Façade library for simpler interaction with alpaca-trade-API from Alpaca Markets.
Stars: ✭ 21 (-95.78%)
Mutual labels:  trading, stock-market, stocks
TradeByte
πŸ’Έ TradeByte - Stocks Trading Simulation WebApp
Stars: ✭ 30 (-93.98%)
Mutual labels:  trading, stock-market, stocks
TerminalStocks
Pure terminal stock ticker for Windows.
Stars: ✭ 88 (-82.33%)
Mutual labels:  trading, stock-market, stocks
Mop
Stock market tracker for hackers.
Stars: ✭ 1,534 (+208.03%)
Mutual labels:  trading, stock-market, stocks
tuneta
Intelligently optimizes technical indicators and optionally selects the least intercorrelated for use in machine learning models
Stars: ✭ 77 (-84.54%)
Mutual labels:  trading, stock-market, stocks
Ta Rs
Technical analysis library for Rust language
Stars: ✭ 248 (-50.2%)
Mutual labels:  trading, stock-market, stocks
Tradestation
EasyLanguage indicators and systems for TradeStation
Stars: ✭ 65 (-86.95%)
Mutual labels:  trading, stock-market, stocks
Robinhood On Rails
A web dashboard for the free trading platform Robinhood using Ruby on Rails and a private API
Stars: ✭ 134 (-73.09%)
Mutual labels:  trading, stock-market, stocks
NSE-Stock-Scanner
National Stock Exchange (NSE), India based Stock screener program. Supports Live Data, Swing / Momentum Trading, Intraday Trading, Connect to online brokers as Zerodha Kite, Risk Management, Emotion Control, Screening, Strategies, Backtesting, Automatic Stock Downloading after closing, live free day trading data and much more
Stars: ✭ 78 (-84.34%)
Mutual labels:  stock-market, stocks
pair-trading-view
Pair Trading View - .NET application for visual analysis of synthetic financial instruments based on statistical models.
Stars: ✭ 45 (-90.96%)
Mutual labels:  stock-market, stocks
Blankly
πŸš€ πŸ’Έ Easily build, backtest and deploy your algo in just a few lines of code. Trade stocks, cryptos, and forex across exchanges w/ one package.
Stars: ✭ 1,456 (+192.37%)
Mutual labels:  trading, stocks
intrinio-realtime-java-sdk
Intrinio Java SDK for Real-Time Stock Prices
Stars: ✭ 22 (-95.58%)
Mutual labels:  stock-market, stocks
capm shiny
Demo project of creating an interactive analytical tool for stock market using CAPM.
Stars: ✭ 31 (-93.78%)
Mutual labels:  stock-market, stocks
Alpaca Backtrader Api
Alpaca Trading API integrated with backtrader
Stars: ✭ 246 (-50.6%)
Mutual labels:  trading, stock-market
short-fork
Stock market helper: financial data, multipliers (PE, PS, PEG etc), insider selling, debt and short volume charts from various sources. All in one place!
Stars: ✭ 41 (-91.77%)
Mutual labels:  stock-market, stocks
gym-mtsim
A general-purpose, flexible, and easy-to-use simulator alongside an OpenAI Gym trading environment for MetaTrader 5 trading platform (Approved by OpenAI Gym)
Stars: ✭ 196 (-60.64%)
Mutual labels:  trading, stocks
market-monitor
Interactive app to monitor market using Python
Stars: ✭ 20 (-95.98%)
Mutual labels:  stock-market, stocks
fundamentos
Download Bovespa Stock Market fundamentals with Python.
Stars: ✭ 80 (-83.94%)
Mutual labels:  stock-market, stocks
SierraChartZorroPlugin
A Zorro broker API plugin for Sierra Chart, written in Win32 C++.
Stars: ✭ 22 (-95.58%)
Mutual labels:  trading, stocks

tstock - Generate stock charts in the terminal! πŸš€πŸš€πŸš€

Downloads GitHub code size in bytes PyPI

πŸ“ˆ tstock is a tool to easily generate stock charts from the command line.

Just type tstock aapl to get a 3 month candlestick chart of $AAPL in your terminal!

tstock-demo

Features

  • Stocks for most global exchanges
  • Support for major cryptocurrencies
  • Forex markets and currency exchange rates
  • Different time intervals, including intraday trading
  • "Wisdom"?!

Dependencies

  • Python 3.6 or greater
  • Docker, if using the Docker version

Installation

PyPI

tstock is available as a Python 3 package. You can install it using pip:

pip install tstock # use pip3 on Ubuntu 18.04 and older

AUR

tstock is also available on the AUR. If you are on an Archlinux based system, you can just install it using your favorite AUR helper. Example using yay:

yay -S tstock

Docker

  1. Build Docker: docker build -t tstock .
  2. Run: docker run -e ALPHAVANTAGE_API_KEY=<yourkey> -it tstock:latest tstock aapl

Getting started

AlphaVantage API setup

After installing tstock, you will need a AlphaVantage API key to pull the market data.

  • Make a free AlphaVantage API account at https://www.alphavantage.co/support/#api-key
  • After creating the account, you will see your free API key
  • Run export ALPHAVANTAGE_API_KEY=<your access key>. You can make this permanent by adding this line to your .bashrc

NOTE: If you are on Windows, you can set your environment variable by running $env:ALPHAVANTAGE_API_KEY="<your access key>". You can make this permanent by adding this line to Microsoft.PowerShell_profile.ps1

Usage

$ tstock --help
usage: tstock [-h] [-t INTERVAL] [-b COUNT] [-w] [-s] [--chart] [-c CURRENCY] [-y LINES] [-a CLASS]
                   [--padx COLUMNS] [--pady LINES] [--short] [--nocolor] [-v] [--version]
                   [TICKER]

tstock - generate stock charts in the terminal.

positional arguments:
  TICKER          Which ticker's data to pull.

options:
  -h, --help      show this help message and exit
  -t INTERVAL     Time interval of each candlestick. Valid values are '1min', '5min', '15min', '30min', '60min', 'day', 'week', or 'month'. Defaults to 'day'.
  -b COUNT        Number of time intervals back to go back. The number of candlesticks generated. Defaults to fill the terminal.
  -w              Enables extra words of 'wisdom'.
  -s              Search for stock tickers. Useful for getting exchange codes.
  --chart         Print the chart only. Overrides -w.
  -c CURRENCY     Set the currency. Only works with '-a crypto'. Defaults to 'USD'.
  -y LINES        Height of the chart. Defaults to fill the terminal.
  -a CLASS        The asset class of TICKER. Valid values are 'stock', 'crypto', and 'forex'. Autodetects depending on input ticker.
  --padx COLUMNS  Horizontal padding of the chart. Defaults to 5.
  --pady LINES    Vertical padding of the chart. Defaults to 4.
  --short         Short output, prints the last price only.
  --nocolor       Prints chart with no color.
  --upcolor COLOR    Color of positive candlesticks. Valid values are 'green', 'red', or 'blue'. Defaults to green.
  --downcolor COLOR  Color of negative candlesticks. Valid values are 'green', 'red', or 'blue'. Defaults to red.
  -v              Toggle verbosity.
  --version       Print tstock version.

Examples:
    tstock aapl # chart of $AAPL
    tstock aapl -b 24 -t 60min # the past 24 60-minute-intervals of $AAPL, 20 lines high
    tstock -s shopify # search the API for keyword "shopify"
    tstock shop.trt # chart of $SHOP on the TRT exchange
    tstock btc -c GBP -w # chart of the price of Bitcoin in GBP with rockets
    tstock usd/eur # chart of the price of USD in euros

Run tstock TICKER to get the a chart of $TICKER. Use -b COUNT to specify the number of intervals back you want to pull. -t INTERVAL will specify the time interval of each candlestick. Use -y LINES to specify the length of the chart's y axis.

Use the search function tstock -s KEYWORD to search the AlphaVantage API for tickers.

You can get international markets by specifying a code after .. For example, to get SAIC Motor Corporation on the Shanghai Stock Exchange, run tstock 600104.SHH. The -s option is useful for finding the exchange codes for foreign exchanges. For example:

tstock tesco -s
The search returned the following results:
TSCO.LON (Tesco PLC)
        Reigon:         United Kingdom
        Type:           Equity
        Currency:       GBX

Now we know the ticker, we can get fetch the chart with tstock tsco.lon.

For more options, run tstock -h

More API information in AlphaVantage's docs: https://www.alphavantage.co/documentation

Notes

  • The free tier of the API is limited to 500 API calls per day, 5 calls per minute.
  • If you are using Windows, the ANSI escape codes will not display properly in the default cmd shell or PowerShell. Please use a terminal emulator that supports ANSI escape codes such as Windows Terminal.

Donate

I develop tstock for free in my spare time. If you like it, and want to buy me a coffee, I'd really appreciate it.

Donate: https://www.buymeacoffee.com/Gbox4

Bitcoin: (QR) bc1qusuztegpfuh7jk25l2dx5xyjvasgryrqg42d5n

BCH: (QR) qq0gedhne30lcr3253zz08sy4ryxukgx4gcrk6qzjg

Monero: (QR) 87wuCKbbchKV8Dz3JRoSN3jaqWBSiEShFXkFrYUaKT8Bew4P7dFvUJWVVR6RLr84J44QCdtNVyR6QC7aCSKYUWfnGK9y4K2

Nano: nano_15pqkfph8wfk4dbtkcrq88giff6xgqzs3znf44nfe1g8sgaixwaj6pbepsmn

Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].