Re: How to transfer lots between accounts and how to query lot information?

2021-01-18 Thread Ben Blount
Beancount Precision & Tolerances Beancount can be smart about finding the original lot when reducing. If you do it by price it must be exact. If you do it by date, it must be exact. Either way it must be

Re: How to transfer lots between accounts and how to query lot information?

2021-01-18 Thread Ghanashyam Prabhu
I did note the precision from the error message Are you suggesting using something like option "inferred_tolerance_default" "USD:0.001" I have it already - with and without this makes no difference The alternative method of using only dates, is it something like this below? This too shows an

Re: How to transfer lots between accounts and how to query lot information?

2021-01-18 Thread Ben Blount
One more thing to add, if you want to match the lot with 2 digits of precision, try to specify it that way when you first create the lot. Unfortunately sometimes that means you can't use expressions that end up generating lots of digits or else you'll end up with a reduction like -0.20778508 BTC

Re: How to transfer lots between accounts and how to query lot information?

2021-01-18 Thread Ben Blount
Please carefully review the error message. It has been telling you precisely what is wrong each time, though it does require some understanding which I think you now have. This time the lot is not matching exactly. -0.20778508 BTC, cost=CostSpec(number_per=Decimal('18078.87' ... USD You can see

Re: How to transfer lots between accounts and how to query lot information?

2021-01-18 Thread Ghanashyam Prabhu
Hi Ben, Thanks for pointing out that we'd need {} at a minimum. Note that adding this to both the postings shows an error when I run bean-check Error message is here Failed to categorize posting 2 2021-01-04 * "CoinbasePro" "Tranfer BTC from Coinbase to CoinbasePro" #transfer

Re: How to transfer lots between accounts and how to query lot information?

2021-01-18 Thread Ben Blount
Beancount has two ways to track any kind of currency/commodity: at cost, or not at cost. Generally, currency like USD, EUR, etc are not tracked at cost. Stock, securities etc are tracked at cost so you can report capital gains. Beancounts infers what mode you are working in by the presence of a

Re: Requesting recommendation for tracking capital gains

2021-01-18 Thread Ghanashyam Prabhu
Got it, I have updated the changes. I now understand the capital gains recording concept. On Mon, 18 Jan 2021 at 18:55, Martin Blais wrote: > On Mon, Jan 18, 2021 at 7:23 PM Ghanashyam Prabhu > wrote: > >> I am currently maintaining a beancount ledger file for tracking my crypto >>

Re: How to transfer lots between accounts and how to query lot information?

2021-01-18 Thread Ghanashyam Prabhu
Hi Martin, Apologies if this was confusing. Can you elaborate on what is wrong? I have added comments to my transactions for your reference - Note the points till which bean-check shows no errors. Let me comment the individual transactions. ;; This transaction purchases BTC at Coinbase from Cash

Re: How to transfer lots between accounts and how to query lot information?

2021-01-18 Thread Martin Blais
This looks all wrong, see other thread. To buy BTC at Coinbase, the money all comes from your Coinbase:Cash account. Transfers from your bank are separate transactions. Reflect what's actually going on in the account On Mon, Jan 18, 2021 at 8:35 PM Ghanashyam Prabhu wrote: > I had a similar

Re: Recommendation on beancount for Crypto transactions

2021-01-18 Thread Martin Blais
+1 On Mon, Jan 18, 2021 at 7:33 PM Ben Blount wrote: > Income accounts are negative. Your transaction should be > 2020-11-26 * "Coinbase" "Sell BTC at Coinbase" > Assets:US:Crypto:Coinbase:BTC -0.22712412 BTC {} @ 16539.50 USD > Assets:US:Crypto:Coinbase:Cash 3756.53 USD >

Re: Requesting recommendation for tracking capital gains

2021-01-18 Thread Martin Blais
On Mon, Jan 18, 2021 at 7:23 PM Ghanashyam Prabhu wrote: > I am currently maintaining a beancount ledger file for tracking my crypto > transactions and I'd like to seek advice on the workflow especially when > recording capital gains from these transactions. Below is an example. > > Let's say I

Re: How to transfer lots between accounts and how to query lot information?

2021-01-18 Thread Ghanashyam Prabhu
I had a similar use case here and ended up using the plugin to report the transactions and then copied them manually into the transfer posting This is my entries list. However I see that when I run bean-check (v2), it errors out with an error No position matches

Re: Recommendation on beancount for Crypto transactions

2021-01-18 Thread Ben Blount
Income accounts are negative. Your transaction should be 2020-11-26 * "Coinbase" "Sell BTC at Coinbase" Assets:US:Crypto:Coinbase:BTC -0.22712412 BTC {} @ 16539.50 USD Assets:US:Crypto:Coinbase:Cash 3756.53 USD Income:Crypto:Capital-gains -256.52 USD And yes, your next transaction should draw

Requesting recommendation for tracking capital gains

2021-01-18 Thread Ghanashyam Prabhu
I am currently maintaining a beancount ledger file for tracking my crypto transactions and I'd like to seek advice on the workflow especially when recording capital gains from these transactions. Below is an example. Let's say I accumulated some BTC at some cost basis of 3500 and have a

Recommendation on beancount for Crypto transactions

2021-01-18 Thread Ghanashyam Prabhu
I am currently maintaining a beancount ledger file for tracking my crypto transactions and I'd like to seek advice on the workflow especially when recording capital gains from these transactions. Below is an example. Let's say I accumulated some BTC at some cost basis of 3500 and have a