https://github.com/pstadler/ticker-rs
Real-time stock tickers from the command-line. Written in Rust.
https://github.com/pstadler/ticker-rs
bash cli equities quotes rust shell stock-prices stocks yahoo-finance-api
Last synced: 5 months ago
JSON representation
Real-time stock tickers from the command-line. Written in Rust.
- Host: GitHub
- URL: https://github.com/pstadler/ticker-rs
- Owner: pstadler
- Created: 2022-09-06T21:13:59.000Z (about 3 years ago)
- Default Branch: main
- Last Pushed: 2023-06-19T19:42:41.000Z (over 2 years ago)
- Last Synced: 2025-03-31T17:24:20.617Z (6 months ago)
- Topics: bash, cli, equities, quotes, rust, shell, stock-prices, stocks, yahoo-finance-api
- Language: Rust
- Homepage:
- Size: 45.9 KB
- Stars: 7
- Watchers: 2
- Forks: 0
- Open Issues: 1
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# ticker-rs
> Real-time stock tickers from the command-line written in Rust.
CLI tool using the Yahoo Finance API as a data source. It features colored output and is able to display pre- and post-market prices (denoted with `*`).
Its goal is to behave exactly like [ticker.sh](https://github.com/pstadler/ticker.sh) and is meant as an excerise to learn Rust.
## Install
```sh
$ cargo install --git https://github.com/pstadler/ticker-rs.git
```## Usage
```sh
# Single symbol:
$ ticker AAPL# Multiple symbols:
$ ticker AAPL MSFT GOOG BTC-USD# Read from file:
$ echo "AAPL MSFT GOOG BTC-USD" > ~/.ticker.conf
$ ticker $(cat ~/.ticker.conf)# Use different colors:
$ COLOR_BOLD="\e[38;5;248m" \
COLOR_GREEN="\e[38;5;154m" \
COLOR_RED="\e[38;5;202m" \
ticker AAPL# Disable colors:
$ NO_COLOR=1 ticker AAPL# Update every five seconds:
$ watch -n 5 -t -c ticker AAPL MSFT GOOG BTC-USD
# Or if `watch` is not available:
$ while true; do clear; ticker AAPL MSFT GOOG BTC-USD; sleep 5; done
```