
Features
- Customizable
- Auto-fit to terminal size
- Shipped as library with simple API
- Shipped as binary for standalone usage
API Usage
Add this to your Cargo.toml
[]
= "0.3"
use ;
Binary Usage
Download the latest release for your platform here
USAGE:
cli-candlestick-chart.exe [OPTIONS] --mode <MODE>
FLAGS:
-h, --help Prints help information
-V, --version Prints version information
OPTIONS:
--bear-color <BEAR_COLOR> Sets the descending candles color in hexadecimal.
--bull-color <BULL_COLOR> Sets the ascending candles color in hexadecimal.
--chart-name <CHART_NAME> Sets the chart name.
-f, --file <FILE> [MODE:*-file] File to read candles from.`
-m, --mode <MODE> Select the method for retrieving the candles.
[possible values: stdin, csv-file, json-file]
When requesting the CSV file mode, the library expects a CSV file with open,high,low,close headers fields.
When requesting the JSON or stdin mode, the library expects a JSON with the following format :
[
{
"open": 28994.009766,
"high": 29600.626953,
"low": 28803.585938,
"close": 29374.152344
},
...
]
Examples
API
Basic example with CSV parsing : Run with cargo run --example basic-with-csv-parsing --features=serde,csv
Fetch candles from binance : Run with cargo run --example fetch-from-binance --features=serde,reqwest
Binary
- Read CSV from file :
- Read from stdin :
|