;doc: csv: align, tweak

This commit is contained in:
Simon Michael 2023-01-19 07:52:48 -10:00
parent 9c20d7955b
commit 363fc57207

View File

@ -3760,20 +3760,20 @@ are imported into a journal file.
### Coinbase ### Coinbase
A simple example with some CSV from Coinbase. The spot price is recorded using cost notation. A simple example with some CSV from Coinbase. The spot price is recorded using cost notation.
The legacy `amount` field name conveniently sets amount2 to the total cost. The legacy `amount` field name conveniently sets amount 2 (posting 2's amount) to the total cost.
```csv ```csv
# Timestamp,Transaction Type,Asset,Quantity Transacted,Spot Price Currency,Spot Price at Transaction,Subtotal,Total (inclusive of fees and/or spread),Fees and/or Spread,Notes # Timestamp,Transaction Type,Asset,Quantity Transacted,Spot Price Currency,Spot Price at Transaction,Subtotal,Total (inclusive of fees and/or spread),Fees and/or Spread,Notes
# 2021-12-30T06:57:59Z,Receive,USDC,100,GBP,0.740000,"","","","Received 100.00 USDC from an external account" # 2021-12-30T06:57:59Z,Receive,USDC,100,GBP,0.740000,"","","","Received 100.00 USDC from an external account"
``` ```
```rules ```rules
# coinbase.csv.rules # coinbase.csv.rules
skip 1 skip 1
fields Timestamp,Transaction_Type,Asset,Quantity_Transacted,Spot_Price_Currency,Spot_Price_at_Transaction,Subtotal,Total,Fees_Spread,Notes fields Timestamp,Transaction_Type,Asset,Quantity_Transacted,Spot_Price_Currency,Spot_Price_at_Transaction,Subtotal,Total,Fees_Spread,Notes
date %Timestamp date %Timestamp
date-format %Y-%m-%dT%T%Z date-format %Y-%m-%dT%T%Z
description %Notes description %Notes
account1 assets:coinbase:cc account1 assets:coinbase:cc
amount %Quantity_Transacted %Asset @ %Spot_Price_at_Transaction %Spot_Price_Currency amount %Quantity_Transacted %Asset @ %Spot_Price_at_Transaction %Spot_Price_Currency
``` ```
```shell ```shell
$ hledger print -f coinbase.csv $ hledger print -f coinbase.csv