Hi,

sure, first you have to provide the api key as an environment variable

e.g. something like

export ALPHAVANTAGE_API_KEY=demo

and then call it like

bean-price -e 'USD:alphavantage/price:AAPL:USD' -vv

Regards,
Patrick

On 17.09.2024 14:53, 'Aaron Axvig' via Beancount wrote:
Could someone provide an example of fetching a price using
Alphavantage?  It is non-obvious to me:

bean-price -e 'USD:alphavantage/AAPL' -vv

INFO    : Using price cache at "/tmp/bean-price.cache" (with indefinite
expiration)
INFO    : Processing at date: 2024-09-17
INFO    : Fetching: AAPL (time: None)
ERROR   : Error fetching AAPL: Invalid ticker. Use "price:SYMBOL:BASE"
or "fx:CCY:BASE" format.
ERROR   : Could not fetch for job: DatedPrice(base='AAPL', quote='USD',
date=None, sources=[PriceSource(module=<module
'beanprice.sources.alphavantage' from
'/home/aaron/beancount/venv/lib/python3.11/site-
packages/beanprice/sources/alphavantage.py'>, symbol='AAPL',
invert=False)])


--
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/74cd9006-f2d9-495d-85a9-2ece648429fc%40tario.org.

Reply via email to