Thanks for creating the issue for me.
book_conversions is probably a left-behind after some playing around… 
Thanks for the hint.

[email protected] schrieb am Montag, 28. Dezember 2020 um 20:19:34 UTC+1:

> BTW, I don't recommend using plugins.book_conversions, that was just a 
> POC, not supported. It's actually gone in v3.
>
>
> On Mon, Dec 28, 2020 at 2:16 PM Martin Blais <[email protected]> wrote:
>
>> Never mind; done
>> https://github.com/beancount/beancount/issues/598
>>
>>
>> On Mon, Dec 28, 2020 at 2:15 PM Martin Blais <[email protected]> wrote:
>>
>>> The inference code has limits.
>>> However, this is one which seems like it should have been 
>>> resolvable, since you declared FIFO (there are two lots matching).
>>> Can you file a ticket?
>>> Thx
>>>
>>>
>>> On Mon, Dec 28, 2020 at 11:32 AM Peter <[email protected]> wrote:
>>>
>>>> Hi,
>>>>
>>>> I'm still trying to figure out, how to account my crypto swaps and 
>>>> trades correctly.
>>>> I added the newly created (thanks a thousand times @Martin) 
>>>> transfer_lots plugin and created some transactions.
>>>>
>>>> Sadly, the last transaction yields the error:
>>>>
>>>> *$ bean-check Test.bean *
>>>> ~/00-Beancount/Test.bean:21:      Too many missing numbers for currency 
>>>> group 'EUR'
>>>>
>>>> *$ cat Test.bean*
>>>> option "booking_method" "FIFO"
>>>> plugin "beancount.plugins.book_conversions" 
>>>> "Assets:Bitcoin,Income:Bitcoin"
>>>> plugin "beancount.plugins.auto_accounts"
>>>>
>>>> option "insert_pythonpath" "True"
>>>> plugin "plugins.transfer_lots" "transfer"
>>>>
>>>> 2020-12-01 * "" "Buy BTC"
>>>>           Assets:Cash:Coinbase-Pro         -1500.00 EUR
>>>>           Assets:Crypto:BTC:Coinbase-Pro       0.15 BTC {10,000 EUR} @ 
>>>> 10,000 EUR
>>>>
>>>> 2020-12-17 * "" "Buy BTC"
>>>>           Assets:Cash:Coinbase-Pro        -6,000.00 EUR
>>>>           Assets:Crypto:BTC:Coinbase-Pro        0.3 BTC {20,000 EUR} @ 
>>>> 20,000 EUR
>>>>
>>>> 2020-12-18 * "" "Transfer BTC" #transfer
>>>>           Assets:Crypto:BTC:Coinbase-Pro     -0.175 BTC {}
>>>>           Assets:Crypto:BTC:Binance         
>>>>
>>>> 2020-12-20 * "" "Swap BTC => USDT (1/2)"
>>>> ; assumed BTC sell
>>>>           Assets:Crypto:BTC:Binance           -0.16 BTC {} @ 16,000 EUR
>>>>           Assets:Cash:Binance                 2,560 EUR
>>>>           Income:Trading
>>>>
>>>> The lots are just fine:
>>>>
>>>> $ bean-query Test.bean 
>>>> Input file: "Beancount"
>>>> Ready with 6 directives (8 postings in 3 transactions).
>>>> beancount> SELECT account, units(sum(position)) as units, cost_number 
>>>> as cost, cost_currency, cost(sum(position)) as book_value, cost_date as 
>>>> acquisition_date WHERE currency = 'BTC' ORDER BY units
>>>>            account               units   cost  cos book_val acquisitio
>>>> ------------------------------ --------- ----- --- -------- ----------
>>>> Assets:Crypto:BTC:Coinbase-Pro           10000 EUR          2020-12-01
>>>> Assets:Crypto:BTC:Binance      0.025 BTC 20000 EUR  500 EUR 2020-12-17
>>>> Assets:Crypto:BTC:Binance      0.15  BTC 10000 EUR 1500 EUR 2020-12-01
>>>> Assets:Crypto:BTC:Coinbase-Pro 0.275 BTC 20000 EUR 5500 EUR 2020-12-17
>>>>
>>>> Even trying to sell the entire position (following the manual's syntax) 
>>>> fails:
>>>>
>>>> 2020-12-20 * "" "Swap BTC => USDT (1/2)"
>>>>           Assets:Crypto:BTC:Binance           -0.175 BTC {} @ 16,000 EUR
>>>>           Assets:Cash:Binance                 2,560 EUR
>>>>           Income:Trading
>>>>
>>>>
>>>> I don't know if I didn't write the postings correctly (probably) or if 
>>>> it's related to the plugin (probably not). What's the problem here?
>>>>
>>>> Regards
>>>>
>>>> -- 
>>>> 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/9373ae5e-49e7-4cdd-affd-dd3f6401c97bn%40googlegroups.com
>>>>  
>>>> <https://groups.google.com/d/msgid/beancount/9373ae5e-49e7-4cdd-affd-dd3f6401c97bn%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/f41af8fc-ea81-4384-b29f-69657cc4c953n%40googlegroups.com.

Reply via email to