Very strange, it just sits and does nothing after starting the HTTPS
connection.  So that makes me wonder I have some other network problem,
because I was using the Yahoo source on a different machine and that
started hanging in a similar way a couple weeks ago.  I thought that
was just Yahoo cutting everyone off. :)

(venv):~/beancount/venv/bin$ ./bean-price -e
'USD:alphavantage/price:AAPL:USD' -vv --cache cache.db
INFO : Using price cache at "cache.db" (with indefinite expiration)
INFO : Processing at date: 2024-09-17
INFO : Fetching: price:AAPL:USD (time: None)
DEBUG : Starting new HTTPS connection (1): www.alphavantage.co:443

The API key is set:

(venv):~/beancount/venv/bin$ printenv | grep ALPHA
ALPHAVANTAGE_API_KEY=snipped



On Tue, 2024-09-17 at 18:30 +0200, 'Patrick Ruckstuhl' via Beancount
wrote:
> 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
> .

-- 
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/f9175b20f4665078660374d129d913de85450344.camel%40axvig.com.

Reply via email to