← 返回命令列表

Linux command

ticker 命令

文本

复制后可按需替换文件名、目录或参数。

常用示例

Watch stock prices

ticker -w [AAPL,MSFT,GOOG]

Track stocks

ticker

Show stock prices

ticker -w [AAPL,MSFT] --format json

Show stock prices

ticker -w [AAPL,MSFT] --format csv

Watch cryptocurrency prices

ticker -w [BTC-USD,ETH-USD]

Use a custom config file

ticker -c [path/to/config.yaml]

说明

ticker is a terminal-based stock and cryptocurrency tracker that displays live price updates and position tracking. Written in Go, it provides real-time quotes from Yahoo Finance and CoinMarketCap, supporting stocks, ETFs, mutual funds, and cryptocurrencies. The tool can track both current prices and your portfolio positions with support for multiple cost basis lots. It displays pre-market and post-market prices when available, making it useful for monitoring investments outside regular trading hours. Configuration is typically done through a YAML file (~/.ticker.yaml) where you can define watchlists, positions with cost basis, and display preferences. The config file supports grouping symbols with tags and setting up multiple portfolios.

参数

-w, --watchlist _symbols_
Comma-separated list of stock or crypto symbols to watch.
-c, --config _file_
Path to the configuration file. Default is ~/.ticker.yaml.
--format _format_
Output format: default, json, or csv.
--show-fundamentals
Show fundamental data like P/E ratio and market cap.
--show-tags
Display tags associated with symbols.
--show-separator
Show a separator between symbols in output.
--show-holdings
Display holdings and position values.
--sort _field_
Sort output by field (e.g., change, changePercent).
--proxy _url_
Proxy URL for API requests.
-i, --interval _seconds_
Refresh interval in seconds.

FAQ

What is the ticker command used for?

ticker is a terminal-based stock and cryptocurrency tracker that displays live price updates and position tracking. Written in Go, it provides real-time quotes from Yahoo Finance and CoinMarketCap, supporting stocks, ETFs, mutual funds, and cryptocurrencies. The tool can track both current prices and your portfolio positions with support for multiple cost basis lots. It displays pre-market and post-market prices when available, making it useful for monitoring investments outside regular trading hours. Configuration is typically done through a YAML file (~/.ticker.yaml) where you can define watchlists, positions with cost basis, and display preferences. The config file supports grouping symbols with tags and setting up multiple portfolios.

How do I run a basic ticker example?

Run `ticker -w [AAPL,MSFT,GOOG]` in a terminal, then adjust file names, paths, flags, or remote targets for your system.

What does -w, --watchlist _symbols_ do in ticker?

Comma-separated list of stock or crypto symbols to watch.