I'm having trouble understanding how automatic price fetching works, and I think it's being additionally complicated by questions of price imputation and maybe PnL accounts. Let's start with the simplest case. Consider (commodity declarations omitted for brevity):
2020-01-01 * "Buy BTC (from USD)"
Assets:Coinbase:BTC 0.50000000 BTC
Assets:Coinbase:USD -4750.00000000 USD
I would have expected bean-price to fetch a price for BTC for 2020-01-01, but instead it fails, saying the transaction doesn't balance. Now, if I supply a price
2020-01-01 * "Buy BTC (from USD)"
Assets:Coinbase:BTC 0.50000000 BTC @ 9500.0 USD
Assets:Coinbase:USD -4750.00000000 USD
or supply a price spec with no number:
2020-01-01 * "Buy BTC (from USD)"
Assets:Coinbase:BTC 0.50000000 BTC @ USD
Assets:Coinbase:USDT -4750.00000000 USD
then there is no error, but bean-price fetches today's price.
Now let's consider a more complex example:
2020-02-01 * "Buy BTC (from USDT)"
Assets:Coinbase:BTC 0.50000000 BTC
Assets:Coinbase:USDT -4750.00000000 USDT
Income:PnL
Here, I'd like to fetch the USD prices of both BTC and USDT, which would allow PnL to be computed, but bean-price fetches nothing. Now, if I put "@ USD" at the end of the BTC posting (as above), instead of getting the price on 2020-01-01 (as I desire), or the price today (as in the earlier example), I get "Too many missing numbers for currency group 'USD'".
I can't quite figure out what bean-price is doing, or square it against
the documentation. Any tips to get me unblocked?
thanks,
eric