---
layout: page
title: "Alpha Vantage"
description: "Instructions on how to setup Alpha Vantage within Home Assistant."
date: 2017-12-02 12:00
sidebar: true
comments: false
sharing: true
footer: true
logo: alpha_vantage.png
ha_category: Finance
ha_iot_class: "Cloud Polling"
featured: false
ha_release: "0.60"
---

The `alpha_vantage` sensor platform uses [Alpha Vantage](https://www.alphavantage.co) to monitor the stock market. This platform also provides detail about exchange rates.

To enable the `alpha_vantage` platform, add the following lines to your `configuration.yaml` file:

```yaml
# Example configuration.yaml entry
sensor:
  - platform: alpha_vantage
    api_key: YOUR_API_KEY
    symbols:
    - symbol: GOOGL
      name: Google
    foreign_exchange:
    - name: USD_EUR
      from: USD
      to: EUR
```

Either a symbol or a foreign exchange must be configured, otherwise you will not get any data.

{% configuration %}
api_key:
  description: "The API Key from [Alpha Vantage](https://www.alphavantage.co)."
  required: true
  type: string
symbols:
  description: List of stock market symbols for given companies.
  required: false
  type: map
  keys:
    name:
      description: The name of the sensor to use for the frontend.
      required: false
      type: string
    currency:
      description: The name of the sensor to use for the frontend.
      required: false
      type: string
      default: USD
    symbol:
      description: The stock market symbol for the given company.
      required: required
      type: string
foreign_exchange:
  description: List of currencies.
  type: map
  required: false
  keys:
    name:
      description: The name of the sensor to use for the frontend.
      required: false
      type: string
    from:
      description: The source currency.
      required: required
      type: string
    to:
      description: The target currency.
      required: required
      type: string
{% endconfiguration %}

## {% linkable_title Examples %}

In this section you find some real life examples of how to use this sensor.

### {% linkable_title Google and the exchange rate for Bitcoin %}

```yaml
sensor:
  - platform: alpha_vantage
    api_key: YOUR_API_KEY
    symbols:
      - name: Google
        currency: USD
        symbol: GOOGL
    foreign_exchange:
      - from: BTC
        to: USD
        name: Bitcoin
```

