Package: tstock
tstock - Generate stock charts in the terminal! 🚀🚀🚀📈 tstock is a tool to easily generate stock charts from the command line.Just typetstock aaplto get a 3 month candlestick chart of $AAPL in your terminal!FeaturesStocks for most global exchangesSupport for major cryptocurrenciesForex markets and currency exchange ratesDifferent time intervals, including intraday trading"Wisdom"?!DependenciesPython 3.6 or greaterDocker, if using the Docker versionInstallationPyPItstockis available as a Python 3 package. You can install it usingpip:pipinstalltstock# use pip3 on Ubuntu 18.04 and olderAURtstockis also available on the AUR. If you are on an Archlinux based system, you can just install it using your favorite AUR helper. Example usingyay:yay-StstockDockerBuild Docker:docker build -t tstock .Run:docker run -e ALPHAVANTAGE_API_KEY=<yourkey> -it tstock:latest tstock aaplGetting startedAlphaVantage API setupAfter installingtstock, you will need a AlphaVantage API key to pull the market data.Make a free AlphaVantage API account athttps://www.alphavantage.co/support/#api-keyAfter creating the account, you will see your free API keyRunexport ALPHAVANTAGE_API_KEY=<your access key>. You can make this permanent by adding this line to your.bashrcNOTE: 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 toMicrosoft.PowerShell_profile.ps1Usage$ 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 eurosRuntstock TICKERto get the a chart of$TICKER. Use-b COUNTto specify the number of intervals back you want to pull.-t INTERVALwill specify the time interval of each candlestick. Use-y LINESto specify the length of the chart's y axis.Use the search functiontstock -s KEYWORDto 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, runtstock 600104.SHH. The-soption 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:       GBXNow we know the ticker, we can get fetch the chart withtstock tsco.lon.For more options, runtstock -hMore API information in AlphaVantage's docs:https://www.alphavantage.co/documentationNotesThe 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 asWindows Terminal.DonateI developtstockfor 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/Gbox4Bitcoin: (QR)bc1qusuztegpfuh7jk25l2dx5xyjvasgryrqg42d5nBCH: (QR)qq0gedhne30lcr3253zz08sy4ryxukgx4gcrk6qzjgMonero: (QR)87wuCKbbchKV8Dz3JRoSN3jaqWBSiEShFXkFrYUaKT8Bew4P7dFvUJWVVR6RLr84J44QCdtNVyR6QC7aCSKYUWfnGK9y4K2Nano:nano_15pqkfph8wfk4dbtkcrq88giff6xgqzs3znf44nfe1g8sgaixwaj6pbepsmn