Skip to content
Permalink
Browse files

csv: another coinbase example, contributed

  • Loading branch information
simonmichael committed Mar 16, 2020
1 parent 04931bb commit 8011e4e0c1a147e01435d89dfb3331889e5492f6
Showing with 51 additions and 0 deletions.
  1. +7 −0 examples/csv/coinbase2.csv
  2. +44 −0 examples/csv/coinbase2.csv.rules
@@ -0,0 +1,7 @@
Timestamp,Balance,Amount,Currency,To,Notes,Instantly Exchanged,Transfer Total,Transfer Total Currency,Transfer Fee,Transfer Fee Currency,Transfer Payment Method,Transfer ID,Order Price,Order Currency,Order BTC,Order Tracking Code,Order Custom Parameter,Order Paid Out,Recurring Payment ID,Coinbase ID (visit https://www.coinbase.com/transactions/[ID] in your browser),Bitcoin Hash (visit https://www.coinbase.com/tx/[HASH] in your browser for more info)
2017-09-29 15:40:00 -0700,0.00314664,0.00314664,BTC,12345.0,Bought 0.00314664 BTC for £10.99 GBP.,false,10.00,GBP,0.99,GBP,Visa debit ********1234,1111.0,,,,,,,,1111.0,
2017-09-29 15:40:00 -0700,,,,12345.0,Coinbase Fee,false,0.99,GBP,,,Visa debit ********1234,1111.0,,,,,,,,1111.0,
2017-10-04 16:20:00 -0700,0.00621194,0.0030653,BTC,12345.0,Bought 0.0030653 BTC for £10.99 GBP.,false,10.00,GBP,0.99,GBP,Visa debit ********1234,2222.0,,,,,,,,2222.0,
2017-10-04 16:20:00 -0700,,,,12345.0,Coinbase Fee,false,0.99,GBP,,,Visa debit ********1234,2222.0,,,,,,,,2222.0,
2017-11-01 16:00:00 -0700,0.00797348,0.00176154,BTC,12345.0,Bought 0.00176154 BTC for £10.00 GBP.,false,9.01,GBP,0.99,GBP,Visa debit ********1234,3333.0,,,,,,,,3333.0,
2017-11-01 16:00:00 -0700,,,,12345.0,Coinbase Fee,false,0.99,GBP,,,Visa debit ********1234,3333.0,,,,,,,,3333.0,
@@ -0,0 +1,44 @@
# Another coinbase example

skip 1

fields date,balance,amt,currency,to,desc,inst_exch,transfer_total,transfer_total_currency,transfer_fee,transfer_fee_currency,transfer_payment_method,transfer_id,order_price,order_currency,order_btc,order_tracking_code,order_custom_parameter,order_paid_out,recurring_payment_id,coinbase_id,bitcoin_hash

description %desc %bitcoin_hash
date-format %Y-%m-%d %H:%M:%S %z
amount %amt
account1 assets:crypto:Coinbase:%currency

if
Bought
amount %amt @@ £%transfer_total
account2 assets:crypto:Coinbase:top-up


# Output:
#
# $ hledger print -f coinbase2.csv
# 2017-09-29 Bought 0.00314664 BTC for £10.99 GBP.
# assets:crypto:Coinbase:BTC BTC0.00314664 @@ £10.00 = BTC0.00314664
# assets:crypto:Coinbase:top-up £-10.00
#
# 2017-09-29 Coinbase Fee
# assets:crypto:Coinbase:top-up £-0.99
# expenses:fees £0.99
#
# 2017-10-04 Bought 0.0030653 BTC for £10.99 GBP.
# assets:crypto:Coinbase:BTC BTC0.00306530 @@ £10.00 = BTC0.00621194
# assets:crypto:Coinbase:top-up £-10.00
#
# 2017-10-04 Coinbase Fee
# assets:crypto:Coinbase:top-up £-0.99
# expenses:fees £0.99
#
# 2017-11-01 Bought 0.00176154 BTC for £10.00 GBP.
# assets:crypto:Coinbase:BTC BTC0.00176154 @@ £9.01 = BTC0.00797348
# assets:crypto:Coinbase:top-up £-9.01
#
# 2017-11-01 Coinbase Fee
# assets:crypto:Coinbase:top-up £-0.99
# expenses:fees £0.99
#

0 comments on commit 8011e4e

Please sign in to comment.
You can’t perform that action at this time.