Hello,
So, since I got the plugin for dealing with lots and capital gains running,
I'm attempting to import my balanced ledger journal files into beancount so
I can have the plugin deal with reducing my lots rather than doing it
manually. But I've a significant number of transactions that beancount says
aren't balanced, in spite of their balancing in ledger. Here's one example
(including my header incase I missed something there):
; -*- mode: org; mode: beancount; coding: utf-8; fill-column: 400; -*-
option "title" "My Personal Ledger"
option "operating_currency" "BTC"
option "operating_currency" "ETH"
plugin "beancount.plugins.book_conversions"
"Assets:Crypto:Ethereum,Income:Capital-gains"
* Equity
2015-01-01 open Equity:Opening-Balances
* Account declarations
2015-01-01 open Assets:Crypto:Bitcoin BTC
2015-01-01 open Assets:Crypto:Ethereum ETH
2015-01-01 open Expenses:Crypto:NetworkFees BTC
* Income
2015-01-01 open Income:Capital-gains
* Expenses
2015-01-01 open Expenses
* Transactions
2015-01-01 * ""Opening Bank balance""
Assets:Crypto:Bitcoin 0.05000000 BTC
Assets:Crypto:Ethereum 1.00000000 ETH
Equity:Opening-Balances
2016-08-13 * "Ethereum sale "
Assets:Crypto:Ethereum -0.84429 ETH {0.02055 BTC, 2016-08-09} @
0.01995 BTC
trades: "trade-570f1d77bece"
Income:Capital-gains
Assets:Crypto:Bitcoin 0.01684358 BTC
bean-check complains about a half a satoshi (which can't exist in the real
world, only in spreadsheets) not balancing:
/home/joel/beancount/temp2.bc:1333: Transaction does not balance: (-
0.0000000055 BTC)
2016-08-13 * "Ethereum sale "
Assets:Crypto:Ethereum -0.84429 ETH {0.02055 BTC, 2016-08-09} @
0.01995 BTC
trades: "trade-570f1d77bece"
Income:Capital-gains 0.0005065740 BTC
Assets:Crypto:Bitcoin 0.01684358 BTC
However, all the transaction in that file were balancing in ledger, before
I converted them to beancount format. I checked this one by running it
through ledger after commenting out the "trades" line
2016-08-13 * "Ethereum sale "
Assets:Crypto:Ethereum -0.84429 ETH {0.02055 BTC, 2016-08-09} @
0.01995 BTC
;trades: "trade-570f1d77bece"
Income:Capital-gains
Assets:Crypto:Bitcoin 0.01684358 BTC
and got the following result:
joel@bregalad:~/beancount$ ledger -f temp3.dat bal
0.01684358 BTC
-0.84429 ETH Assets:Crypto
0.01684358 BTC Bitcoin
-0.84429 ETH Ethereum
0.00050658 BTC Income:Capital-gains
--------------------
0.01735016 BTC
-0.84429 ETH
joel@bregalad:~/beancount$ nano temp3.dat
joel@bregalad:~/beancount$ ledger -f temp3.dat bal
0.01684358 BTC
-0.84429 ETH Assets:Crypto
0.01684358 BTC Bitcoin
-0.84429 ETH Ethereum
0.00050658 BTC Income:Capital-gains
--------------------
0.01735016 BTC
-0.84429 ETH
Any ideas what I'm missing in beancount? Or is there a way I can tell it to
force anything less than a satoshi(0.00000001 BTC) to balance?
And another issue I don't understand:
In the same file, I had four transactions that resulted in the following
output from bean-check:
Could not match position Posting(account='Assets:Crypto:Ethereum', units=-
44.08 ETH, cost=None, price=0.02439024 BTC, flag=None, meta={'filename':
'/home/joel/beancount/temp2.bc', 'lineno': 99})
The offending transaction here (same header as above, as its the in the
same beancount file) is:
2016-06-05 * "Sell ETH"
Assets:Crypto:Bitcoin 1.0751 BTC
Assets:Crypto:Ethereum -44.08 ETH @ 0.02439024 BTC
; CSV: 06-05-2016,10:45:13 AM,Sell ETH via Bitsquare,a4453750,,,1.0751
BTC,0.02439024 BTC,44.08 ETH,Completed
; Imported: 2017-07-15
; Price per coin: 0.02439024 BTC
; Time: 10:45:13 AM
; Trade Status: Completed
; UUID: 7d96c7ac8441d01fbfa81c64628b5b963180c3f7
Here again the transaction balances when I ran it through ledger, unchanged
from above. I don't understand why it could not match the position posting.
Does that mean that there's not enough ETH in the lots inventory and I'm
missing a transaction?
Thanks,
Joel
--
You received this message because you are subscribed to the Google Groups
"Beancount" group.
To unsubscribe from this group and stop receiving emails from it, send an email
to [email protected].
To post to this group, send email to [email protected].
To view this discussion on the web visit
https://groups.google.com/d/msgid/beancount/23f40716-a471-4bac-8c24-d33a7ee8f6aa%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.