Thanks for that Red!
It works fine with "NONE". And I think I understand how I must track the
holding when converting from a currency to another.
On Saturday, 28 March 2020 07:46:27 UTC, Red S wrote:
>
> Makdisse,
> 1) Include this line in your earlier source:
> 2000-01-01 open Assets:Coinbase:ETH "NONE"
>
> and everything would work fine. However, you won't get strict lot
> reduction, but rather, a mix of positive and negative lots. The point here
> is to help you build your mental model of how beancount works. Read
> Martin's response above and see if it makes better sense now. Hint: your
> source makes beancount think you shorted ETH.
>
> 2) Assets:Coinbase:ETH {443.62 GBP} <-- ADDED PRICE
>
> That's not valid syntax. You'd have to specify the number you're reducing
> the lot by.along with the price.
>
> 3) try bean-doctor context on the *prior* transaction, and it shows you
> the state of things.
>
> On Friday, March 27, 2020 at 11:26:06 AM UTC-7, Makdisse wrote:
>>
>> I've tried adding the ETH price to make sure beancount knows against
>> which account it should match:
>>
>> 2018-03-22 * "Buy ETH"
>> Assets:Coinbase:ETH 2.13226701 ETH {443.62 GBP}
>> Assets:Coinbase:Fees 14.09 GBP
>> Equity:Opening-Balances
>>
>> 2018-03-22 * "Convert ETH to XLM"
>> Assets:Binance:XLM 2324 XLM @@ 1.025268 ETH
>> Assets:Coinbase:ETH {443.62 GBP} <-- ADDED PRICE
>>
>> 2018-03-22 * "Convert ETH to EOS"
>> Assets:Kraken:EOS 90 EOS @@ 1.098605 ETH
>> Assets:Coinbase:ETH {443.62 GBP} <-- ADDED PRICE
>>
>> 2018-04-03 * "Buy ETH"
>> Assets:Coinbase:ETH 4.81321544 ETH {339.82 GBP}
>> Assets:Coinbase:Fees 24.37 GBP
>> Equity:Opening-Balances
>>
>> Now I get a different error: 'Transaction does not balance'. Which
>> doesn't make sense to me because the math seems to be correct.
>>
>> I've read all documentation you wrote, can you see what mental model I'm
>> missing about how beancount works?
>>
>> I've tried a lot of different variations to these 4 transactions and
>> every time I get a different error.
>>
>>
>>
>> On Friday, 27 March 2020 12:36:55 UTC, Martin Blais wrote:
>>>
>>> Your balance has a mix of positive and negative values.
>>> See error message, it includes the balance it is trying to match against.
>>> Its not showing the context because the transaction failed to match,
>>> that's a catch-22 but that we need to fix, failing transactions aren't
>>> properly handled by the context command.
>>>
>>> On Fri, Mar 27, 2020, 05:06 Makdisse <[email protected]> wrote:
>>>
>>>> Hi Martin,
>>>> Thanks for your answer. But I still can't find a solution.
>>>>
>>>> The ETH account balance is 2.13226701 ETH before the 2 convert
>>>> transactions.
>>>>
>>>> I then deduct 1.025268+1.098605 == 2.12 from that account.
>>>>
>>>> And then on the erroring transaction I try to add more ETH to the
>>>> account: Assets:Coinbase:ETH 4.81321544 ETH {339.82 GBP}
>>>>
>>>> When I run bean-doctor I get an empty transaction:
>>>> Hash:bde2c9df7c3195dfa5bd9e4b68ed2261
>>>> Location: /example.beancount:31
>>>>
>>>>
>>>> ------------ Balances before transaction
>>>>
>>>>
>>>>
>>>>
>>>> ------------ Transaction
>>>>
>>>>
>>>> 2018-04-03 * "Buy ETH"
>>>>
>>>>
>>>>
>>>>
>>>>
>>>>
>>>> ------------ Balances after transaction
>>>>
>>>>
>>>> And if I try to add {443.62 GBP} to the ETH deduction of both
>>>> conversions (to specify that the conversion should deduct from the
>>>> `Assets:Coinbase:ETH 2.13226701 ETH {443.62 GBP}` account) I get a
>>>> 'Transaction does not balance' error.
>>>>
>>>>
>>>>
>>>> On Friday, 27 March 2020 04:06:41 UTC, Martin Blais wrote:
>>>>>
>>>>> You probably have other transactions before this one that make the
>>>>> balance of that account negative, and so it's trying to match that
>>>>> positive
>>>>> ETH posting against existing positions with a cost basis of 339.82.
>>>>>
>>>>> Run bean-doctor context with the filename and line number around that
>>>>> transaction to see the inventory of the Assets:Coinbase:ETH account just
>>>>> before the transaction gets applied.
>>>>>
>>>>>
>>>>>
>>>>>
>>>>> On Thu, Mar 26, 2020 at 7:58 PM Makdisse <[email protected]> wrote:
>>>>>
>>>>>> Hi there,
>>>>>>
>>>>>> I'm moving from Pocketsmith to beancount and I've hit a wall.
>>>>>> I've attached a file with just 4 transactions where I'm getting the
>>>>>> error:
>>>>>> >> bean-check example.beancount
>>>>>> example.beancount:32: No position matches
>>>>>> "Posting(account='Assets:Coinbase:ETH',
>>>>>> units=4.81321544 ETH, cost=CostSpec(number_per=Decimal('339.82'),
>>>>>> number_total=None, currency='GBP', date=None, label=None, merge=False),
>>>>>> price=None, flag=None, meta={'filename': 'example.beancount', 'lineno':
>>>>>> 33})" against balance (-2.123873000000000000000000000 ETH, 2.13226701
>>>>>> ETH {443.62 GBP, 2018-03-22})
>>>>>>
>>>>>>
>>>>>> 2018-04-03 * "Buy ETH"
>>>>>> Assets:Coinbase:ETH 4.81321544 ETH {339.82 GBP}
>>>>>> Assets:Coinbase:Fees 24.37 GBP
>>>>>> Equity:Opening-Balances
>>>>>>
>>>>>> I have read all documents on
>>>>>> https://docs.google.com/document/d/1RaondTJCS_IUPBHFNdT8oqFKJjVJDsfsn6JEjBG04eA/edit
>>>>>> and
>>>>>> I still can't understand what I'm doing wrong.
>>>>>>
>>>>>> I must be missing some major mental model.
>>>>>>
>>>>>> Can you guys please help understand what I'm doing wrong?
>>>>>>
>>>>>> Thanks
>>>>>>
>>>>>> --
>>>>>> 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 view this discussion on the web visit
>>>>>> https://groups.google.com/d/msgid/beancount/fdcd6381-f782-4a42-8f92-56050774086e%40googlegroups.com
>>>>>>
>>>>>> <https://groups.google.com/d/msgid/beancount/fdcd6381-f782-4a42-8f92-56050774086e%40googlegroups.com?utm_medium=email&utm_source=footer>
>>>>>> .
>>>>>>
>>>>> --
>>>> 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 view this discussion on the web visit
>>>> https://groups.google.com/d/msgid/beancount/f51ce28c-54c6-4097-b3df-69be98d90a09%40googlegroups.com
>>>>
>>>> <https://groups.google.com/d/msgid/beancount/f51ce28c-54c6-4097-b3df-69be98d90a09%40googlegroups.com?utm_medium=email&utm_source=footer>
>>>> .
>>>>
>>>
--
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 view this discussion on the web visit
https://groups.google.com/d/msgid/beancount/854b691c-1c80-4cdf-a327-6374b65bf18b%40googlegroups.com.