hey, that works. thanks.
$ ledger -f test.j --args-only bal assets:broker --limit
'commodity(market(amount)) == "EUR"'
1000 BAYN.DE
100 EUR assets:broker
$ ledger -f test.j --args-only bal assets:broker --limit
'commodity(market(amount)) == "EUR"' -X EUR
26340 EUR assets:broker
$ ledger -f test.j --args-only bal assets:broker --group-by
'commodity(market(amount))'
CAD
100 CAD
1000 CNR.TO assets:broker
EUR
1000 BAYN.DE
100 EUR assets:broker
USD
1000 AAPL
100 USD assets:broker
On Saturday, March 16, 2024 at 5:53:41 PM UTC-4 Tavis Ormandy wrote:
> On 2024-03-16, Tavis Ormandy wrote:
> > On 2024-03-16, lipp f wrote:
> >> not what was expected.
> >
> > However you're not *recording* that - you didn't record the lot price
> (i.e. the
> > cost basis), so ledger doesn't know what currency you paid with.
> >
> > For example, which exchange did this transaction occur on?
> >
> > assets:broker 1000 "AAPL"
> >
> > I think you just "know" that AAPL trades on the NASDAQ, but ledger
> > doesn't know that. You could tell ledger that with tags, like this:
> >
> > assets:broker 1000 "AAPL" ; exchange: US
> >
> > Or record them with cost basis, like this:
> >
> > assets:broker 1000 "AAPL" @ $10
> >
> > Then it will work... shrug.
> >
>
> Oh, I guess if you only ever record the price history in one currency
> and don't want to log cost basis, maybe you can do
> commodity(market(amount)) instead of commodity(lot_price(amount))...
> kinda hacky, but might work.
>
> Tavis.
>
> --
> _o) $ lynx lock.cmpxchg8b.com
> /\\ _o) _o) $ finger [email protected]
> _\_V _( ) _( ) @taviso
>
>
--
---
You received this message because you are subscribed to the Google Groups
"Ledger" 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/ledger-cli/45aca474-18e4-4fd0-af77-69a6ac6f7d2fn%40googlegroups.com.