zfin/docs/reference/cli/quote.md
Emil Lerch 74fc219afd
All checks were successful
Generic zig build / build (push) Successful in 5m48s
Generic zig build / publish-macos (push) Successful in 11s
Generic zig build / deploy (push) Successful in 23s
add docs/guides
2026-06-22 14:53:53 -07:00

46 lines
1.2 KiB
Markdown

# `zfin quote`
Show the latest quote for a symbol, with a price chart and recent
history.
```
Usage: zfin quote <SYMBOL>
```
Prints the last price, the day's open/high/low, volume, and the
day-over-day change, followed by a 20-day chart. Quotes come from Yahoo
(TwelveData fallback) and are **never cached** -- so this command needs
network access and does nothing useful in `--refresh-data=never` mode.
Supports `--export-chart <PATH>` to render the chart as a 1920x1080
PNG instead of text (see [export charts](../../guides/offline-and-refresh.md)
and the projections page).
## Example
```bash
ZFIN_HOME=examples/pre-retirement-both zfin quote SPY
```
```
SPY $746.74 (close)
========================================
Date: 2026-06-18
Open: $747.76
High: $748.23
Low: $743.86
Volume: 80,875,657
Change: +$5.78 (+0.78%)
... (20-day braille chart)
```
## See also
- [`perf`](perf.md) -- trailing returns instead of a spot price.
- [`history`](history.md) -- the last 30 days as a table.
- [Caching](../../explanation/caching.md#quotes-are-never-cached) -- why quotes need the network.
---
[CLI command reference](index.md)