Repository navigation
v1.3.0
Summary
Major chart overhaul for terminal trading visualization. Replaces the broken asciigraph-based renderer with a custom ASCII chart engine featuring proper axes, OHLC stats, and candlestick support.
New Features
Charts
- Line charts with aligned Y-axis price ticks and X-axis date labels
- Candlestick charts (
--candles) with bullish (█) / bearish (░) bodies and wicks - Period OHLC stats — Open, High, Low, Close, absolute and percentage change
- Custom date range —
--fromand--toflags (YYYY-MM-DD or YYYY-MM-DD HH:MM) - Chart sizing —
--widthand--heightflags (terminal character units) - Interval presets — 1d, 7d, 14d, 30d, 90d, 180d, 1y, max (unchanged)
CLI Flags
--from string Chart start date
--to string Chart end date
--width int Chart width (default 80)
--height int Chart height (default 20)
--candles Candlestick mode
--interval Time interval preset
--graph Enable chart view
Bug Fixes
- Fixed Y-axis showing thousands of raw price values alongside chart output
- Fixed missing X-axis date labels on line charts
- Fixed inverted Y-axis on candlestick charts
- Fixed X-axis line overwriting bottom candle bodies
Cleanup
- Removed
github.com/guptarohit/asciigraphdependency - New
utils/chart.gomodule with dedicated rendering and tests - README updated with v1.3.0 chart examples
Tests
go test ./... -count=1Chart unit tests cover date parsing, filtering, OHLC stats, axis rendering, and Y-axis orientation.
Installation
go install github.com/mrcnserkan/crypto@v1.3.0Examples
crypto bitcoin --graph
crypto bitcoin --graph --candles
crypto bitcoin --graph --interval 30d
crypto bitcoin --graph --from 2026-06-01 --to 2026-06-30
crypto bitcoin --graph --width 100 --height 24