# man > Finance::Quote::AlphaVantage

---
type: CommandReference
command: Finance::Quote::AlphaVantage
mode: perldoc
section: 3pm
source: perldoc
---

## Quick Reference

- `$q = Finance::Quote->new('AlphaVantage', alphavantage => {API_KEY => 'your-key'})` — create a new Finance::Quote object with AlphaVantage module
- `%info = $q->fetch("IBM", "AAPL")` — fetch stock quotes for given symbols
- `$ENV{ALPHAVANTAGE_API_KEY} = 'your-key'` — set API key via environment variable

## Name

Finance::Quote::AlphaVantage - Obtain quotes from https://www.alphavantage.co

## Synopsis

perl
use Finance::Quote;

$q = Finance::Quote->new('AlphaVantage', alphavantage => {API_KEY => 'your-alphavantage-api-key'});

%info = $q->fetch("IBM", "AAPL");
## API Key

AlphaVantage requires a registered API key (token). The key can be set via:

- a module-specific hash passed to `Finance::Quote->new()` as shown above
- the environment variable `ALPHAVANTAGE_API_KEY`

## Labels Returned

The following labels may be returned by `Finance::Quote::AlphaVantage`:

- `symbol`
- `open`
- `close`
- `high`
- `low`
- `last`
- `volume`
- `method`
- `isodate`
- `currency`

## Examples

**Fetch quotes for multiple symbols:**

perl
use Finance::Quote;
$q = Finance::Quote->new('AlphaVantage', alphavantage => {API_KEY => 'your-key'});
my %quotes = $q->fetch("IBM", "AAPL", "MSFT");
print "IBM last price: $quotes{IBM}{last}\n";
**Set API key via environment variable:**

perl
$ENV{ALPHAVANTAGE_API_KEY} = 'your-key';
$q = Finance::Quote->new('AlphaVantage');
## See Also

- [Finance::Quote](https://metacpan.org/pod/Finance::Quote) — base module
- [AlphaVantage API](https://www.alphavantage.co) — official documentation