Terminal stock ticker with live updates and position tracking

Related tags

Command Line ticker
Overview

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
Issues
  • 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]
    
    [email protected]:~$ 
    
    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()
    
    
    
    bug 
    opened by viperperidot 19
  • 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.

    bug good first issue Stale 
    opened by metalsp0rk 13
  • 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).

    feature request 
    opened by 097115 10
  • 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

    opened by adupuis2 9
  • 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

    opened by nikcorg 8
  • 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.

    feature request 
    opened by danaspiegel 8
  • 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).

    bug 
    opened by 097115 8
  • 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

    bug 
    opened by tmack8080 7
  • 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

    bug 
    opened by achannarasappa 7
  • 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]

    Stale 
    opened by cwarden 7
  • Auto-reload config file

    Auto-reload config file

    Describe the solution you'd like Automatically reload the configuration file when it changes.

    Describe alternatives you've considered Using inotifywait or entr.

    Additional context Using inotify on linux should be relatively easy?

    feature request Stale 
    opened by Rudedog9d 7
  • Add GPL disclaimer

    Add GPL disclaimer

    It would be nice is this repo had a disclaimer included in the README. Like "This program is free software, you are free to ..." . This would improve the documentation of this project.

    opened by CountOmega 0
  • currency-summary-only=true -> holdingSummary.DayChange.Amount is not converted

    currency-summary-only=true -> holdingSummary.DayChange.Amount is not converted

    Hi if you set currency-summary-only to true and a currency to e.g. EUR and add lots in different currencies, the holdingSummary.Value and holdingSummary.Cost is well converted, but not the holdingSummary.DayChange.Amount

    imho in asset.go -> func addHoldingToHoldingSummary, this line should be changed from: dayChange := holdingSummary.DayChange.Amount + holding.DayChange.Amount to probably this one, then it looks fine: dayChange := holdingSummary.DayChange.Amount + (holding.DayChange.Amount * currencyRateByUse.SummaryValue)

    br Bohuslav

    bug 
    opened by spatnynick 0
  • currency-summary-only=true -> dayChange in summary is not converted

    currency-summary-only=true -> dayChange in summary is not converted

    Hi if you set currency-summary-only to true and a currency to e.g. EUR and add lots in different currencies, the holdingSummary.Value and holdingSummary.Cost is well converted, but not the holdingSummary.DayChange.Amount

    imho in asset.go -> func addHoldingToHoldingSummary, this line should be changed from: dayChange := holdingSummary.DayChange.Amount + holding.DayChange.Amount to probably this one, then it looks fine: dayChange := holdingSummary.DayChange.Amount + (holding.DayChange.Amount * currencyRateByUse.SummaryValue)

    br Bohuslav

    bug 
    opened by spatnynick 0
  • Crypto issure - open and close prices are the same

    Crypto issure - open and close prices are the same

    Describe the bug Prev. Close and Open are the same for crypto

    To Reproduce Steps to reproduce the behavior: config file: show-summary: true show-tags: true show-fundamentals: true show-separator: true show-holdings: true interval: 5 currency: USD currency-summary-only: false watchlist:

    • FIL.X
    • ETC.X
    • BTC.X
    • LTC.X
    • ETH.X
    • XMR.X
    • ADA.X
    • FSR groups:
    • name: crypto watchlist:
      • SHIB-USD
      • DOGE-USD colors: text: "#f49118" text-light: "#0087ff" text-label: "#A9A9A9" text-line: "#00ffff" text-tag: "#AFEEEE" background-tag: "#696969"

    Expected behavior the open and close should be diffrent

    Screenshots Screenshot from 2022-06-25 01-51-36

    Environment (please complete the following information):

    • OS: [Linux]
    • Terminal: [ fedora teminal]
    • Terminal Version: [ fedora 35]

    Additional context When adding stocks, it works fine

    bug 
    opened by brolal 0
  • Non-USD lot currency confuses valuation logic

    Non-USD lot currency confuses valuation logic

    Describe the bug When lot currency is not USD (but USD selected as a base display currency), valuation logic still thinks it's USD.

    To Reproduce Steps to reproduce the behavior:

    1. Add any non-USD lot

    Expected behavior Take into account lot currency.

    Screenshots image

    Environment (please complete the following information):

    • OS: Mac
    • Terminal: iTerm
    • Terminal Version: 3.4.15
    • ticker Version: 4.5.1
    bug 
    opened by yuriizinets 1
  • 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

    feature request 
    opened by joce 0
Releases(v4.5.2)
Owner
Ani Channarasappa
Ani Channarasappa
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

Eric Greer 803 Aug 1, 2022
☀️ 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

Simon Jürgensmeyer 24 Aug 6, 2022
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.

Reece Mercer 41 Apr 26, 2022
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

Quang Ngoc 221 Jul 1, 2022
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

Tushar Choudhari 2 Feb 4, 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

Jon Friesen 2 Sep 23, 2021
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

null 1 Apr 25, 2022
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

Tarun Koyalwar 23 Aug 8, 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

Prabandham Srinidhi 0 Jan 6, 2022
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-

Git Time Metric 901 Jul 25, 2022
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

Dominik Braun 509 Aug 5, 2022
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 Heuermann 359 Aug 12, 2022
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

Henning Dahlheim 3 Apr 25, 2022
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

Gruntwork 622 Aug 7, 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. You give git-xargs:

Maxar Infrastructure 1 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.

Kris Nóva 25 Jul 26, 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

Abhinav Raut 8 Jun 27, 2022
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

Zachary Yedidia 19.9k Aug 9, 2022