Terminal stock ticker with live updates and position tracking

Latest Release Build Status Coverage Status Report Card

Ticker

Terminal stock watcher and stock position tracker

Features

  • Live stock price quotes
  • Track value of your stock positions
  • Support for multiple cost basis lots
  • Support for pre and post market price quotes

Install

Download the pre-compiled binaries from the releases page and copy to a location in PATH or see quick installs below

mac

brew install achannarasappa/tap/ticker

linux

curl -Ls https://api.github.com/repos/achannarasappa/ticker/releases/latest \
| grep -wo "https.*linux-amd64*.tar.gz" \
| wget -qi - \
&& tar -xf ticker*.tar.gz \
&& chmod +x ./ticker \
&& sudo mv ticker /usr/local/bin/

Quick Start

ticker -w NET,AAPL,TSLA

Usage

Alias Flag Default Description
--config ~/.ticker.yaml config with watchlist and positions
-i --interval 5 Refresh interval in seconds
-w --watchlist comma separated list of symbols to watch
--show-tags display currency, exchange name, and quote delay for each quote
--show-fundamentals display open price, previous close, and day range
--show-separator layout with separators between each quote
--show-summary show total day change, total value, and total value change
--proxy proxy URL for requests (default is none)

Configuration

Configuration is not required to watch stock price but is helpful when always watching the same stocks. Configuration can also be used to set cost basis lots which will in turn be used to show daily gain or loss on any position.

# ~/.ticker.yaml
show-tags: true
show-fundamentals: true
show-separator: true
interval: 10
proxy: http://localhost:3128
watchlist:
  - NET
  - TEAM
  - ESTC
  - BTC-USD
lots:
  - symbol: "ABNB"
    quantity: 35.0
    unit_cost: 146.00
  - symbol: "ARKW"
    quantity: 20.0
    unit_cost: 152.25
  - symbol: "ARKW"
    quantity: 20.0
    unit_cost: 145.35
  • Symbols not on the watchlist that exists in lots will automatically be watched
  • All properties in .ticker.yaml are optional
  • .ticker.yaml can be set in user home directory, the current directory, or XDG config home

Display Options

With --show-summary, --show-tags, --show-fundamentals, and --show-separator options set, the layout and information displayed expands:

Notes

  • Real-time quotes - Quotes are pulled from Yahoo finance which may provide delayed stock quotes depending on the exchange. The major US exchanges (NYSE, NASDAQ) have real-time quotes however other exchanges may not. Consult the help article on exchange delays to determine which exchanges you can expect delays for or use the --show-tags flag to include timeliness of data alongside quotes in ticker.
  • Cryptocurrencies - ticker supports any cryptocurrency Yahoo / CoinMarketCap supports. A full list can be found here
  • Non-US Symbols, Forex, ETFs - The names for there may differ from their common name/symbols. Try searching the native name in Yahoo finance to determine the symbol to use in ticker
  • Terminal fonts - Font with support for the HORIZONTAL LINE SEPARATOR unicode character is required to properly render separators (--show-separator option)

Related Tools

  • tickrs - real-time terminal stock ticker with support for graphing, options, and other analysis information
  • cointop - terminal UI tracking cryptocurrencies
Comments
  • Panic when maximizing window

    Panic when maximizing window

    When I start ticker and then maximize the window I get this panic:

    Caught panic:
    
    runtime error: slice bounds out of range [:-1]
    
    mk@mk-Inspiron-15-3567:~$ 
    
    goroutine 1 [running]:
    runtime/debug.Stack(0x56, 0x0, 0x0)
    	/opt/hostedtoolcache/go/1.15.8/x64/src/runtime/debug/stack.go:24 +0x9f
    runtime/debug.PrintStack()
    	/opt/hostedtoolcache/go/1.15.8/x64/src/runtime/debug/stack.go:16 +0x25
    github.com/charmbracelet/bubbletea.(*Program).Start.func1(0xc0001dd290)
    	/home/runner/go/pkg/mod/github.com/charmbracelet/[email protected]/tea.go:119 +0xd3
    panic(0x960a40, 0xc000341420)
    	/opt/hostedtoolcache/go/1.15.8/x64/src/runtime/panic.go:969 +0x1b9
    github.com/achannarasappa/term-grid.getLineText(0x0, 0xc0003998a0, 0x1, 0x1, 0x1, 0xffffffffffffffff, 0x0, 0x1, 0x1)
    	/home/runner/go/pkg/mod/github.com/achannarasappa/[email protected]/cell.go:40 +0x251
    github.com/achannarasappa/term-grid.getLines(0x0, 0x0, 0xffffffffffffffff, 0x0, 0x0, 0x0, 0xc0002d83e0, 0x2, 0x2, 0x2, ...)
    	/home/runner/go/pkg/mod/github.com/achannarasappa/[email protected]/cell.go:74 +0x2d7
    github.com/achannarasappa/term-grid.renderRow(0x96, 0xc00024e000, 0xb, 0xc, 0x1, 0xc000046400, 0x0)
    	/home/runner/go/pkg/mod/github.com/achannarasappa/[email protected]/row.go:81 +0x1ad
    github.com/achannarasappa/term-grid.Render(0xc000258000, 0xf, 0x10, 0x0, 0x1, 0xc0001dcff0, 0x9c4b18)
    	/home/runner/go/pkg/mod/github.com/achannarasappa/[email protected]/grid.go:29 +0xcc
    github.com/achannarasappa/ticker/internal/ui/component/watchlist.Model.View(0x96, 0xc000155500, 0x5, 0x8, 0xc0001dd8c0, 0x10101, 0x9c4b00, 0x5, 0x0, 0x0, ...)
    	/home/runner/work/ticker/ticker/internal/ui/component/watchlist/watchlist.go:85 +0x33a
    github.com/achannarasappa/ticker/internal/ui.Model.Update(0x5, 0x0, 0x0, 0x0, 0xc000156900, 0x8, 0x8, 0x101010101, 0x0, 0x0, ...)
    	/home/runner/work/ticker/ticker/internal/ui/ui.go:114 +0x765
    github.com/charmbracelet/bubbletea.(*Program).Start(0xc0001dd290, 0x0, 0x0)
    	/home/runner/go/pkg/mod/github.com/charmbracelet/[email protected]/tea.go:214 +0x61c
    github.com/achannarasappa/ticker/internal/ui.Start.func1(0xc0001dcb70, 0xc0001dcc90)
    	/home/runner/work/ticker/ticker/internal/ui/start.go:14 +0x1a5
    github.com/achannarasappa/ticker/internal/cli.Run.func1(0xd00c40, 0xd3be70, 0x0, 0x0)
    	/home/runner/work/ticker/ticker/internal/cli/cli.go:36 +0x2a
    github.com/spf13/cobra.(*Command).execute(0xd00c40, 0xc00001e1d0, 0x0, 0x0, 0xd00c40, 0xc00001e1d0)
    	/home/runner/go/pkg/mod/github.com/spf13/[email protected]/command.go:854 +0x2c2
    github.com/spf13/cobra.(*Command).ExecuteC(0xd00c40, 0x44570a, 0xcb7dc0, 0xc000042778)
    	/home/runner/go/pkg/mod/github.com/spf13/[email protected]/command.go:958 +0x375
    github.com/spf13/cobra.(*Command).Execute(...)
    	/home/runner/go/pkg/mod/github.com/spf13/[email protected]/command.go:895
    github.com/achannarasappa/ticker/cmd.Execute()
    
    
    
  • Tags not showing on last entry.

    Tags not showing on last entry.

    Describe the bug Tags are not showing for the last entry in ticker, when scrolling is applicable.

    To Reproduce Steps to reproduce the behavior:

    1. launch with --show-tags
    2. Scroll to the bottom
    3. Observe that the last entry does not show the tags.

    Expected behavior The interface will allow you to scroll down to the very bottom.

    Screenshots image

    Environment (please complete the following information):

    • OS: Linux
    • Terminal: st
    • Terminal Version: 0.8.4
    • Font: (Optional) [e.g. Powerline]
    • ticker Version: 3.0.7

    Additional context If you resize the terminal window to increase the vertical size, the tags will show up, but if you scroll up one line, then try to scroll back down, it will not allow you to.

    I suspect the key-scroll method has a bounds-check error. I'll dig into it when I have a chance and if I can figure it out, I'll submit a PR. Just thought I'd submit an issue to share my findings.

  • Sorting?

    Sorting?

    As for now, as I understand, it sorts tickers by their growth. This leads to tickers constantly changing their positions. Can sorting by name be implemented?

    Or, better, sort according to the order in the configuration file if one's present (this could allow custom sorting, visually separating a group of unrelated tickers, and also other things, like putting "lots" on top, and the rest of the watchlist below).

  • No information displayed

    No information displayed

    Ticker is not showing any stock data at all. Here is the result for ticker -w NET,AAPL,TSLA image

    Here is ticker -w NET,AAPL,TSLA --show-tags --show-fundamentals --show-separator --show-summary image

    Installed via brew. No internet filtering/firewalls are enabled. Here is the computer's information: image

  • Hardcoded tab unicode character does not render

    Hardcoded tab unicode character does not render

    Describe the bug The hardcoded unicode character for "Tab" does not render within iTerm. Spefically, the character at https://github.com/achannarasappa/ticker/blob/master/internal/ui/ui.go#L202 shows up as:

    Screenshot 2022-02-23 at 12 09 32

    To Reproduce

    Terminal settings via Iterm2 and neofetch:

    kprinssu@kishor-blah ~ » neofetch
                        'c.          [email protected]
                     ,xNMM.          ----------------------------
                   .OMMMMo           OS: macOS 12.2.1 21D62 x86_64
                   OMMM0,            Host: Hackintosh (SMBIOS: MacPro7,1)
         .;loddo:' loolloddol;.      Kernel: 21.3.0
       cKMMMMMMMMMMNWMMMMMMMMMM0:    Uptime: 4 hours, 37 mins
     .KMMMMMMMMMMMMMMMMMMMMMMMWd.    Packages: 51 (brew)
     XMMMMMMMMMMMMMMMMMMMMMMMX.      Shell: zsh 5.8.1
    ;MMMMMMMMMMMMMMMMMMMMMMMM:       Resolution: 3440x1440
    :MMMMMMMMMMMMMMMMMMMMMMMM:       DE: Aqua
    .MMMMMMMMMMMMMMMMMMMMMMMMX.      WM: Quartz Compositor
     kMMMMMMMMMMMMMMMMMMMMMMMMWd.    WM Theme: Blue (Dark)
     .XMMMMMMMMMMMMMMMMMMMMMMMMMMk   Terminal: iTerm2
      .XMMMMMMMMMMMMMMMMMMMMMMMMK.   Terminal Font: SF-Mono-Powerline-Regular 13.5
        kMMMMMMMMMMMMMMMMMMMMMMd     CPU: AMD Ryzen 9 5950X
         ;KMMMMMMMWXXWMMMMMMMk.      GPU: AMD Radeon RX 6900 XT
           .cooc,.    .,coo:.        Memory: 17685MiB / 65536MiB
    

    Expected behavior The should render properly.

  • Feature request: Override config file watchlist from command line

    Feature request: Override config file watchlist from command line

    Problem Statement In my .ticker.yaml I have my portfolio and other long-term interest stocks configured. Sometimes I would just like to ad-hoc follow one or a few stocks on their own.

    Proposed Solution Give command line configuration higher precedence than that in a config file, or add a flag to ignore the config file.

    Alternatives Using a second config file is an option that is a working solution already today, but the command line alternative would be a lesser hassle than updating a configuration file and specifying it on the command line.

    Using an empty config file removes the need to edit the alternative config file, but doesn't remove the need to specify the alternative config.

    I've used shell aliases to satisfy the use case (in reverse) for now, which is ostensibly a good enough solution, but I still think the feature is worth considering.

    Use Cases Sometimes it would be useful to be able to follow one or a few stocks without obscuring them within your larger set of stocks on your watchlist or in your portfolio.

    Additional context None

  • Add option to change the colors of the various UI elements

    Add option to change the colors of the various UI elements

    Problem Statement I have a white background on my terminal screen. Yes, black is traditional, but I find a white background easier to read. :) With a white background, the display of information in the UI is mostly unreadable, either being too light (greens, grays) or being inverted gray with lighter gray foreground coloring.

    image

    Proposed Solution I would like the ability to configure in the ticker.yml colors for both background and foreground of the various elements or of whichever styles are being used, including the background color of the whole UI (I wouldn't mind having a way to make the background black while keeping the default terminal background white).

    Alternatives N/A

    Use Cases See above

    Additional context I use this tool on Mac OS X Terminal.app. I can provide the terminal color configuration if requested.

  • Latest version crashes if no internet connection

    Latest version crashes if no internet connection

    Describe the bug Crashes If launched w/o internet connection

    To Reproduce Steps to reproduce the behavior:

    1. disconnect your internet connection

    2. start ticker

    3. see error:

            panic: interface conversion: interface {} is nil, not []string
      
           goroutine 1 [running]:
           github.com/achannarasappa/ticker/internal/currency.transformResponseCurrencyPairs(0x0, 0x0, 0x0, 0xc00002af70, 0x3, 0xc000114eb0, 0x1637b00, 0xc000238810)
               /home/runner/work/ticker/ticker/internal/currency/currency.go:78 +0x2df
           github.com/achannarasappa/ticker/internal/currency.getCurrencyPairSymbols(0x0, 0x0, 0xc000069ef0, 0xc000069f20, 0xc000069f50, 0x0, 0x0, 0x0, 0x0, 0x0, ...)
               /home/runner/work/ticker/ticker/internal/currency/currency.go:89 +0x385
           github.com/achannarasappa/ticker/internal/currency.GetCurrencyRates(0x0, 0x0, 0xc000069ef0, 0xc000069f20, 0xc000069f50, 0x0, 0x0, 0x0, 0x0, 0x0, ...)
               /home/runner/work/ticker/ticker/internal/currency/currency.go:98 +0xbf
           github.com/achannarasappa/ticker/internal/cli.getReference(0xa, 0xc00000cd60, 0x2, 0x2, 0xc000152480, 0x4, 0x4, 0x10101, 0x0, 0x0, ...)
               /home/runner/work/ticker/ticker/internal/cli/cli.go:114 +0xf2
           github.com/achannarasappa/ticker/internal/cli.GetContext(0x16466c0, 0x1937a40, 0xc000000f00, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, ...)
               /home/runner/work/ticker/ticker/internal/cli/cli.go:72 +0x2a5
           github.com/achannarasappa/ticker/cmd.initConfig()
               /home/runner/work/ticker/ticker/cmd/root.go:57 +0x10a
           github.com/spf13/cobra.(*Command).preRun(0x18fcce0)
               /home/runner/go/pkg/mod/github.com/spf13/[email protected]/command.go:880 +0x49
           github.com/spf13/cobra.(*Command).execute(0x18fcce0, 0xc00001e1e0, 0x0, 0x0, 0x18fcce0, 0xc00001e1e0)
               /home/runner/go/pkg/mod/github.com/spf13/[email protected]/command.go:816 +0x14f
           github.com/spf13/cobra.(*Command).ExecuteC(0x18fcce0, 0x1044aaa, 0x18b4480, 0xc000048778)
               /home/runner/go/pkg/mod/github.com/spf13/[email protected]/command.go:958 +0x375
           github.com/spf13/cobra.(*Command).Execute(...)
               /home/runner/go/pkg/mod/github.com/spf13/[email protected]/command.go:895
           github.com/achannarasappa/ticker/cmd.Execute()
               /home/runner/work/ticker/ticker/cmd/root.go:32 +0x31
           main.main()
               /home/runner/work/ticker/ticker/main.go:6 +0x25
      

    Expected behavior Should not crash. Can't say about other versions but 3.1.3-3.1.0 do crash for me, and 3.0.6 does not

    • OS: macOS 10.11
    • ticker Version: 3.1.0-3.1.3, may be some older, too.

    Additional context Happens to me when waking up the laptop (which may be quite slow sometimes while re-connecting to the wireless).

  • Getting Permission Denied on .ticker.yaml file

    Getting Permission Denied on .ticker.yaml file

    Created a $HOME/.ticker.yaml file with the contents from the read me: show-summary: true show-tags: true show-fundamentals: true show-separator: true show-holdings: true interval: 5 currency: USD watchlist:

    • NET
    • TEAM
    • ESTC
    • BTC-USD

    Receive the following error from the CLI: ~$ ticker --config .ticker.yaml

    Invalid config: open .ticker.yaml: permission denied

    Permissions on the file: My user is the owner and group. The file has -rw-rw-r-- permissions set.

    Environment (please complete the following information):

    • OS: Ubuntu 20.04
    • Terminal: MobaXterm
    • Terminal Version: 20.6
    • ticker Version: 3.1.9

    ticker-permission-denied

  • panic when there's only one currency

    panic when there's only one currency

    @achannarasappa do you want a separate issue for this one? https://github.com/achannarasappa/ticker/commit/2f674085#r47140876

    Originally posted by @cwarden in https://github.com/achannarasappa/ticker/issues/112#issuecomment-780157077

  • Allow Sort Order To Be Changed

    Allow Sort Order To Be Changed

    Use key strokes to switch sort order between (t)icker, day's (c)hange, price-to-(e)arnings, and price-to-(b)ook, and to (r)everse the order.

    [Includes fundamentals changes in #54]

  • Adding to configure sorting order

    Adding to configure sorting order

    Problem Statement I tried to add a property in configure to substitute ticker --sort user command and failed.

    Proposed Solution Please adding sort property in .ticker.yaml to set sorting order.

    Alternatives N/A

    Use Cases N/A

    Additional context N/A

  • Adding to configure text colors for price changes

    Adding to configure text colors for price changes

    Problem Statement I want to configure the text colors for changes of each stock symbol brighter. But I can only change the colors of text for symbol name. If a terminal is deactivated, it's hardly identify whether it's increasing or decreasing by the color.

    Proposed Solution Please provide below properties in configure, for example. "text-increase", "text-decrease"

    Alternatives If it's impossible to support my request, please make the default colors brighter for change ratio/amount.

    Use Cases N/A

    Additional context N/A

  • Have shift+tab cycle groups backwards

    Have shift+tab cycle groups backwards

    Problem Statement Right now, pressing the tab key cycles the groups forward. However, there is no way to cycle them backwards.

    Proposed Solution Pressing shift+tab should cycle in the reverse order.

    Alternatives No alternatives provided

    Use Cases When having multiple groups (3 or more) and you want to just toggle between two adjacent ones, it would be quite useful to have a way to cycle in the reverse order.

    Additional context No additional context provided

  • ticker print - only does

    ticker print - only does "default" group

    Describe the bug Running ticker print only outputs items defined in the lots: section. It does not show anything from my groups: and holdings:

    Expected behavior Expect the output of ticker print to include all holdings defined in the yaml file.

Related tags
Idiomatic Go input parsing with subcommands, positional values, and flags at any position. No required project or package layout and no external dependencies.
Idiomatic Go input parsing with subcommands, positional values, and flags at any position. No required project or package layout and no external dependencies.

Sensible and fast command-line flag parsing with excellent support for subcommands and positional values. Flags can be at any position. Flaggy has no

Jan 1, 2023
☀️ Go calculations for the position of the sun and moon.
☀️ Go calculations for the position of the sun and moon.

Astral Calculations for the position of the sun and moon. This is a Go port of the Python astral package. The astral package provides the means to cal

Sep 28, 2022
A sample FaaS function that gets a stock quote and 30 day history by symbol and returns a HTML page with a generates SVG sparkline.

faas stonks This uses serverless technology to get a stock quote and 30 day sparkline from Yahoo Finance. Deployment Nimbella account Namespace with o

Sep 23, 2021
Pi-hole data right from your terminal. Live updating view, query history extraction and more!
Pi-hole data right from your terminal. Live updating view, query history extraction and more!

Pi-CLI Pi-CLI is a command line program used to view data from a Pi-Hole instance directly in your terminal.

Dec 12, 2022
Boss-Stock Fiber (Go) and MongoDB REST API

Boss-Stock Fiber (Go) and MongoDB REST API An API built with Fiber and MongoDB. Installation go mod init go get -u github.com/gofiber/fiber/v2 go get

Apr 25, 2022
Live streaming from your terminal
Live streaming from your terminal

TStream - Streaming from terminal ??‍♂️ Come stream at tstream.club How to start streaming Please refer to this link Upcoming features One command to

Jan 2, 2023
Get live cricket score right in your terminal.
Get live cricket score right in your terminal.

cric Get cricket score right in your terminal. How to use?! Make sure you have Node.js installed on your machine and just type the following command w

Feb 4, 2022
A Target Tracking , NoteTaking , CheckLists and Data Management GUI App for Bug Hunter's and Pentesters.
A Target Tracking , NoteTaking , CheckLists and Data Management GUI App for Bug Hunter's and Pentesters.

Screenshots Features • Installation • Usage • Features • Notes • Sandman A Target Tracking , NoteTaking , CheckLists and Data Management GUI App for B

Dec 25, 2022
Expense_tracker - A simple application that will help in tracking income and expense

Expense Tracker Is meant to be a simple application that will help in tracking i

Jan 6, 2022
Simple, seamless, lightweight time tracking for Git
Simple, seamless, lightweight time tracking for Git

Git Time Metric Seamless time tracking for all your Git projects $ gtm report -last-month $ gtm report -last-month -format summary $ gtm report -last-

Dec 27, 2022
Simple time tracking CLI
Simple time tracking CLI

⏰ timetrace timetrace is a simple CLI for tracking your working time. Installation Homebrew brew tap dominikbraun/timetrace brew install timetrace Do

Jan 8, 2023
Command line tool for time tracking in a human-readable file format.

klog klog is a plain-text file format and a command line tool for time tracking. ?? Documentation – Learn how to use klog ?? Download – Get the latest

Jan 4, 2023
Hakuna Go: an unofficial CLI for the time-tracking tool Hakuna

Hakuna Go Hakuna Go is an unofficial CLI for the time-tracking tool Hakuna. Inst

Apr 25, 2022
git-xargs is a command-line tool (CLI) for making updates across multiple Github repositories with a single command.
git-xargs is a command-line tool (CLI) for making updates across multiple Github repositories with a single command.

Table of contents Introduction Reference Contributing Introduction Overview git-xargs is a command-line tool (CLI) for making updates across multiple

Dec 31, 2022
git-xargs is a command-line tool (CLI) for making updates across multiple GitHub repositories with a single command
git-xargs is a command-line tool (CLI) for making updates across multiple GitHub repositories with a single command

git-xargs is a command-line tool (CLI) for making updates across multiple GitHub repositories with a single command. You give git-xargs:

Feb 5, 2022
A twitch focused command line tool for producing, archiving and managing live stream content. Built for Linux.

twinx is a live-streaming command line tool for Linux. It connects streaming services (like Twitch, OBS and YouTube) together via a common title and description.

Oct 17, 2022
🚀 Get Youtube Live stream chat feed without any authentication!

youtube-live-chat-downloader Fetches Youtube live chat messages with no authentication required. How does it work? The request for fetching live chat

Oct 17, 2022
A modern and intuitive terminal-based text editor
A modern and intuitive terminal-based text editor

micro is a terminal-based text editor that aims to be easy to use and intuitive, while also taking advantage of the capabilities of modern terminals

Jan 7, 2023