From 6e3b9d41f10e6c84f64e0aec15d4543cc2d402b6 Mon Sep 17 00:00:00 2001 From: Miguel Mota Date: Sun, 18 Apr 2021 11:44:53 -0700 Subject: [PATCH] docs: Add portfolio examples --- docs/content/portfolio.md | 113 ++++++++++++++++++ .../partials/docs/inject/menu-before.html | 3 +- 2 files changed, 115 insertions(+), 1 deletion(-) create mode 100644 docs/content/portfolio.md diff --git a/docs/content/portfolio.md b/docs/content/portfolio.md new file mode 100644 index 0000000..49f4c31 --- /dev/null +++ b/docs/content/portfolio.md @@ -0,0 +1,113 @@ +--- +title: "Portfolio" +date: 2020-01-01T00:00:00-00:00 +draft: false +--- +# Portfolio + +portfolio screenshot + +## View portfolio + +To view your portfolio, press P (Shift+p) + +## Exit portfolio + +To exit out of the portfolio view press, P (Shift+p) again or q or ESC + +## Add entry + +To add a coin to your portfolio, press e on the highlighted coin, enter a value, and then press Enter + +## Edit entry + +To edit the holdings of coin in your portfolio, press e on the highlighted coin, enter the new value, and then press Enter + +## Remove Entry + +To remove an entry in your portfolio, press e on the highlighted coin and set the value to an empty value and press Enter + +## Changing chart + +To change the coin for the chart, press Enter on the highlighted coin. Pressing Enter again on the same highlighted row will show the global chart again. + +# CLI + +The portfolio holdings can be retrieved with the `holdings` command. + +### Default holdings table view + +```bash +$ cointop holdings + name symbol price holdings balance 24h% %holdings +Bitcoin BTC 11833.16 10 118331.6 -1.02 74.14 +Ethereum ETH 394.9 100 39490 0.02 24.74 +Dogecoin DOGE 0.00355861 500000 1779.3 1.46 1.11 +``` + +### Output as csv + +```bash +$ cointop holdings --format csv +name,symbol,price,holdings,balance,24h%,%holdings +Bitcoin,BTC,11833.16,10,118331.6,-1.02,74.16 +Ethereum,ETH,394.48,100,39448,-0.18,24.72 +Dogecoin,DOGE,0.00355861,500000,1779.3,1.46,1.12 +``` + +### Output as json + +```bash +$ cointop holdings --format json +[{"%holdings":"74.16","24h%":"-1.02","balance":"118331.6","holdings":"10","name":"Bitcoin","price":"11833.16","symbol":"BTC"},{"%holdings":"24.72","24h%":"-0.18","balance":"39448","holdings":"100","name":"Ethereum","price":"394.48","symbol":"ETH"},{"%holdings":"1.12","24h%":"1.46","balance":"1779.3","holdings":"500000","name":"Dogecoin","price":"0.00355861","symbol":"DOGE"}] +``` + +### Human readable numbers + +Adds comma and dollar signs: + +```bash +$ cointop holdings -h + name symbol price holdings balance 24h% %holdings +Bitcoin BTC $11,833.16 10 $118,331.6 -1.02% 74.14% +Ethereum ETH $394.9 100 $39,490 0.02% 24.74% +Dogecoin DOGE $0.00355861 500,000 $1,779.3 1.46% 1.11% +``` + +### Filter coins based on name or symbol + +```bash +$ cointop holdings --filter btc,eth + name symbol price holdings balance 24h% %holdings +Bitcoin BTC 11833.16 10 118331.6 -1.02 74.16 +Ethereum ETH 394.48 100 39448 -0.18 24.72 +``` + +### Filter columns + +```bash +$ cointop holdings --cols symbol,holdings,balance +``` + +### Convert to a different fiat currency + +```bash +$ cointop holdings -h --convert eur + name symbol price holdings balance 24h% %holdings +Ethereum ETH €278.49 100 €27,849 -15.87% 100.00% +``` + +### Combining flags + +```bash +$ cointop holdings --total --filter btc,doge --format json -h +{"total":"$120,298.37"} +``` + +### Help + +For all other options, see help command: + +```bash +$ cointop holdings --help +``` diff --git a/docs/themes/hugo-book/layouts/partials/docs/inject/menu-before.html b/docs/themes/hugo-book/layouts/partials/docs/inject/menu-before.html index bd0c0e4..a76fb46 100644 --- a/docs/themes/hugo-book/layouts/partials/docs/inject/menu-before.html +++ b/docs/themes/hugo-book/layouts/partials/docs/inject/menu-before.html @@ -3,8 +3,9 @@
  • Install
  • Update
  • Getting started
  • -
  • Shortcuts
  • +
  • Portfolio
  • Colorschemes
  • +
  • Shortcuts
  • Config
  • SSH
  • FAQ