# Alpha Vantage

> Get stock quotes, daily to monthly price history, currency and crypto exchange rates, earnings and market movers.

App · 10 actions. Web page: https://docs.lodol.com/docs/integrations/alpha-vantage

## Actions

### Get a stock quote

Get the latest price of a stock, ETF or fund, with the day's open, high, low, volume and change since the previous close.

**Inputs**

- Symbol (`symbol`, text, required): The ticker symbol, such as `IBM`, or `TSCO.LON` for a London listing. Find one with **Search symbols**.

**Outputs**

- `data` (object): The response from Alpha Vantage.

**Example output**

```json
{
  "data": {
    "change": 1,
    "change_percent": 1,
    "high": 1,
    "latest_trading_day": "example",
    "low": 1,
    "open": 1,
    "previous_close": 1,
    "price": 1,
    "symbol": "example",
    "volume": 1
  }
}
```

### Get an exchange rate

Get the current exchange rate between two currencies, either of which can be a cryptocurrency such as Bitcoin.

**Inputs**

- From currency (`from_currency`, text, required): The currency to convert from, as its code: `USD`, `EUR`, or `BTC` for Bitcoin.
- To currency (`to_currency`, text, required): The currency to convert to, as its code, such as `JPY` or `EUR`.

**Outputs**

- `data` (object): The response from Alpha Vantage.

**Example output**

```json
{
  "data": {
    "ask_price": 1,
    "bid_price": 1,
    "exchange_rate": 1,
    "from_currency": "example",
    "from_currency_name": "example",
    "last_refreshed": "example",
    "time_zone": "example",
    "to_currency": "example",
    "to_currency_name": "example"
  }
}
```

### Get daily crypto prices

Get a cryptocurrency's open, high, low, close and volume for each day in a currency of your choice, newest first.

**Inputs**

- Cryptocurrency (`symbol`, text, required): The cryptocurrency's code, such as `BTC` for Bitcoin or `ETH` for Ether.
- Priced in (`market`, text, required): The currency to price it in, as its code, such as `USD` or `EUR`.
- Most recent (`limit`, number): How many of the most recent days to return. Leave empty for all of them. At least 1.

**Outputs**

- `data` (object): The response from Alpha Vantage.

**Example output**

```json
{
  "data": {
    "last_refreshed": "example",
    "market": "example",
    "market_name": "example",
    "name": "example",
    "prices": [
      {
        "close": 1,
        "date": "example",
        "high": 1,
        "low": 1,
        "open": 1,
        "volume": 1
      }
    ],
    "symbol": "example",
    "time_zone": "example"
  }
}
```

### Get daily prices

Get a stock's open, high, low, close and volume for each trading day, newest first, as traded (not adjusted for splits or dividends).

**Inputs**

- Symbol (`symbol`, text, required): The ticker symbol, such as `IBM`, or `TSCO.LON` for a London listing. Find one with **Search symbols**.
- History (`outputsize`, text): How much history to get. The full history needs a premium Alpha Vantage plan. One of: `compact` (Latest 100 trading days), `full` (Full history (premium plans)). Default: `compact`.
- Most recent (`limit`, number): How many of the most recent days to return. Leave empty for all of them. At least 1.

**Outputs**

- `data` (object): The response from Alpha Vantage.

**Example output**

```json
{
  "data": {
    "last_refreshed": "example",
    "prices": [
      {
        "close": 1,
        "date": "example",
        "high": 1,
        "low": 1,
        "open": 1,
        "volume": 1
      }
    ],
    "symbol": "example",
    "time_zone": "example"
  }
}
```

### Get earnings

Get a company's earnings per share for each year and quarter, newest first, with analysts' estimates and the surprise for each quarter.

**Inputs**

- Symbol (`symbol`, text, required): The ticker symbol, such as `IBM`, or `TSCO.LON` for a London listing. Find one with **Search symbols**.
- Most recent (`limit`, number): How many of the most recent years and quarters to return. Leave empty for all of them. At least 1.

**Outputs**

- `data` (object): The response from Alpha Vantage.

**Example output**

```json
{
  "data": {
    "annual": [
      {
        "fiscal_date_ending": "example",
        "reported_eps": 1
      }
    ],
    "quarterly": [
      {
        "estimated_eps": 1,
        "fiscal_date_ending": "example",
        "report_time": "example",
        "reported_date": "example",
        "reported_eps": 1,
        "surprise": 1,
        "surprise_percentage": 1
      }
    ],
    "symbol": "example"
  }
}
```

### Get market status

Find out whether the major stock, currency and crypto markets around the world are open or closed now, with their local trading hours.

**Inputs**: None.

**Outputs**

- `data` (object): The response from Alpha Vantage.

**Example output**

```json
{
  "data": {
    "markets": [
      {
        "current_status": "example",
        "is_open": true,
        "local_close": "example",
        "local_open": "example",
        "market_type": "example",
        "notes": "example",
        "primary_exchanges": "example",
        "region": "example"
      }
    ]
  }
}
```

### Get monthly prices

Get a stock's open, high, low, close and volume for each month, newest first, over its whole history. Each month is dated by its last trading day.

**Inputs**

- Symbol (`symbol`, text, required): The ticker symbol, such as `IBM`, or `TSCO.LON` for a London listing. Find one with **Search symbols**.
- Most recent (`limit`, number): How many of the most recent months to return. Leave empty for all of them. At least 1.

**Outputs**

- `data` (object): The response from Alpha Vantage.

**Example output**

```json
{
  "data": {
    "last_refreshed": "example",
    "prices": [
      {
        "close": 1,
        "date": "example",
        "high": 1,
        "low": 1,
        "open": 1,
        "volume": 1
      }
    ],
    "symbol": "example",
    "time_zone": "example"
  }
}
```

### Get top gainers and losers

Get the 20 US stocks that rose most, fell most and traded most at the end of the last trading day.

**Inputs**: None.

**Outputs**

- `data` (object): The response from Alpha Vantage.

**Example output**

```json
{
  "data": {
    "last_updated": "example",
    "most_actively_traded": [
      {
        "change_amount": 1,
        "change_percentage": 1,
        "price": 1,
        "ticker": "example",
        "volume": 1
      }
    ],
    "top_gainers": [
      {
        "change_amount": 1,
        "change_percentage": 1,
        "price": 1,
        "ticker": "example",
        "volume": 1
      }
    ],
    "top_losers": [
      {
        "change_amount": 1,
        "change_percentage": 1,
        "price": 1,
        "ticker": "example",
        "volume": 1
      }
    ]
  }
}
```

### Get weekly prices

Get a stock's open, high, low, close and volume for each week, newest first, over its whole history. Each week is dated by its last trading day.

**Inputs**

- Symbol (`symbol`, text, required): The ticker symbol, such as `IBM`, or `TSCO.LON` for a London listing. Find one with **Search symbols**.
- Most recent (`limit`, number): How many of the most recent weeks to return. Leave empty for all of them. At least 1.

**Outputs**

- `data` (object): The response from Alpha Vantage.

**Example output**

```json
{
  "data": {
    "last_refreshed": "example",
    "prices": [
      {
        "close": 1,
        "date": "example",
        "high": 1,
        "low": 1,
        "open": 1,
        "volume": 1
      }
    ],
    "symbol": "example",
    "time_zone": "example"
  }
}
```

### Search symbols

Find the ticker symbols of stocks, ETFs and funds worldwide by company name or part of a symbol, best match first.

**Inputs**

- Keywords (`keywords`, text, required): A company name or part of a symbol, such as `microsoft` or `tesco`.

**Outputs**

- `data` (object): The response from Alpha Vantage.

**Example output**

```json
{
  "data": {
    "matches": [
      {
        "currency": "example",
        "market_close": "example",
        "market_open": "example",
        "match_score": 1,
        "name": "example",
        "region": "example",
        "symbol": "example",
        "timezone": "example",
        "type": "example"
      }
    ]
  }
}
```
