• Stars
    star
    540
  • Rank 79,262 (Top 2 %)
  • Language
    Go
  • License
    GNU General Publi...
  • Created almost 4 years ago
  • Updated 12 months ago

Reviews

There are no reviews yet. Be the first to send feedback to the community and the maintainers!

Repository Details

Stonks is a terminal based stock visualizer and tracker that displays realtime stocks in graph format in a terminal. See how fast your stonks will crash.

Stonks

GitHub GitHub contributors GitHub last commit GitHub release (latest by date) AUR version

Stonks is a terminal based stock visualizer and tracker.

Installation

Requirements: golang >= 1.13

Manual

  1. Clone the repo
  2. Run make && make install

Packages

Stonks is available on:

  • The AUR. You can install it on arch linux with my other project yup: $ yup -S stonks

  • HomeBrew: brew install ericm/stonks/stonks

Binaries

Binaries are now available for Windows, MacOSX and Linux under each release

Online installationless usage (via curl)

You can now access basic stock graphs for passed stock tickers via the stonks HTTPS client (https://stonks.icu).

Try it:

$ curl -L stonks.icu/amd/ba

Usage

It uses Yahoo Finance as a backend so use the ticker format as seen on their website.

Displays realtime stocks in graph format in a terminal

Usage:
  stonks [flags]

Flags:
  -d, --days int          24 hour period of stocks from X of days ago.
  -e, --extra             Include extra pre + post time. (Only works for day)
  -h, --help              help for stonks
  -i, --interval string   stonks -i X[m|h] (eg 15m, 5m, 1h, 1d) (default "15m")
  -n, --name string       Optional name for a stonk save
  -r, --remove string     Remove an item from favourites
  -s, --save string       Add an item to the default stonks command. (Eg: -s AMD -n "Advanced Micro Devices")
  -t, --theme string      Display theme for the chart (Options: "line", "dot", "icon")
  -v, --version           stonks version
  -w, --week              Display the last week (will set interval to 1d)
  -y, --year              Display the last year (will set interval to 5d)
      --ytd               Display the year to date (will set interval to 5d)

$ stonks

Gives graphs and current value/change of saved stocks. Stonks

$ stonks -s AMD -n "Advanced Micro Devices"

Add a favourite stock to be tracked with $ stonks

$ stonks -r AMD

Remove a favourite stock

$ stonks AMD

Gives the current stock for each ticker passed that day

Stonks

$ stonks -w AMD

Gives the current stock for each ticker passed for the past week

Stonks

$ stonks -d 4 AMD

Gives the current stock for each ticker passed X days ago

Stonks

Configuration

The config file is located at ~/.config/stonks.yml

You can change the following options:

config:
  default_theme: 0 # 0: Line, 1: Dots, 2: Icons
  favourites_height: 12 # Height of the chart in each info panel
  standalone_height: 12

Usage with wtfutil

You can use a program such as wtfutil (On Arch Linux: yup -S wtfutil) to make stonks refresh automatically. See the sample ~/.config/wtf/config.yml provided by Gideon Wolfe :

wtf:
  colors:
    background: black
    border:
      focusable: darkslateblue
      focused: blue
      normal: gray
    checked: yellow
    highlight:
      fore: black
      back: gray
    rows:
      even: yellow
      odd: white
  grid:
    # How _wide_ the columns are, in terminal characters. In this case we have
    # four columns, each of which are 35 characters wide.
    columns: [33, 33, 33]
    # How _high_ the rows are, in terminal lines. In this case we have four rows
    # that support ten line of text and one of four.
    rows: [20, 20, 20, 20, 20, 20, 20, 20]
  refreshInterval: 1

  mods:
    tech:
      type: cmdrunner
      args: ["tsla", "intc", "--theme", "dot"]
      cmd: "stonks"
      enabled: true
      position:
        top: 0
        left: 0
        height: 2
        width: 3
      refreshInterval: 10
      title: "🤖 Tech"
    financial:
      type: cmdrunner
      args: ["jpm", "v", "--theme", "dot"]
      cmd: "stonks"
      enabled: true
      position:
        top: 2
        left: 0
        height: 2
        width: 3
      refreshInterval: 10

More Repositories

1

yup

Arch Linux AUR Helper with ncurses functionality and better searching and sorting
Go
135
star
2

vscode-github-status

An extension that will sync your current workspace name and time spent on it to your GitHub status
TypeScript
34
star
3

newlogic

Circuit Builder Desktop Application (like mmlogic) made with Electron + React Typescript. Compatible with Windows, Mac and Linux.
TypeScript
33
star
4

pandit

My Final Year Project. A distributed proxy that converts applications into gRPC Services. Provides powerful user-defined caching strategies.
Rust
14
star
5

uniui

Uniui is a React UI library currently in beta. It has a growing list of components as well as easy context based theming.
TypeScript
8
star
6

homebrew-stonks

Ruby
3
star
7

amd-ml-dev-env

Machine learning developer environment template for using a tensorflow backend on AMD GPUs
Shell
2
star
8

healscript

Docker image that runs a user-defined script whenever a specific container becomes unhealthy
Shell
2
star
9

notes

UCC Computer Science CK401 Lecture notes
JavaScript
2
star
10

RSS-Feed-Reader-Plus

Advanced Multi-Platform Desktop RSS Feed Reader with support for: Rules and Cloud Sync.
JavaScript
2
star
11

eric.vim

My vim setup
Vim Script
1
star
12

pandit-packages

1
star
13

photography

Repository for photography @
1
star
14

history-of-computing

Talk I did for UCC Netsoc
JavaScript
1
star
15

deploy

Docker Compose deployment for my personal projects hosted on Netsoc Cloud
1
star
16

ts-lang-talk

JavaScript
1
star
17

cv

My CV. Made with Fancy CV in XeLaTeX.
CSS
1
star
18

dotfiles

Some of my dotfiles for arch linux
Vim Script
1
star
19

moynihan.io

Personal website containing projects, CV and Photography.
HTML
1
star
20

webdev-project

My CS1115 (UCC) website. (Got 100% in Derek Bridge's Web Dev 1)
HTML
1
star
21

calpal

TypeScript
1
star
22

projects

List of projects I've worked on
1
star
23

ericm

1
star
24

devlpcode

Real time coding webapp
TypeScript
1
star
25

coderdojoManager

*IN DEVELOPMENT* Angular 4 app for students + mentors to track attendance
TypeScript
1
star
26

spooky

A web horror game
JavaScript
1
star
27

react-globules

React JS component that gives your project a cool interactive background
JavaScript
1
star