AlphaVantage

class pandas_datareader.av.forex.AVForexReader(symbols=None, retry_count=3, pause=0.1, session=None, api_key=None)

Returns DataFrame of the Alpha Vantage Foreign Exchange (FX) Exchange Rates data.

New in version 0.7.0.

Parameters
  • symbols (string, array-like object (list, tuple, Series)) – Single currency pair (formatted ‘FROM/TO’) or list of the same.

  • retry_count (int, default 3) – Number of times to retry query request.

  • pause (int, default 0.1) – Time, in seconds, to pause between consecutive queries of chunks. If single value given for symbol, represents the pause between retries.

  • session (Session, default None) – requests.sessions.Session instance to be used

  • api_key (str, optional) – Alpha Vantage API key . If not provided the environmental variable ALPHAVANTAGE_API_KEY is read. The API key is required.

close()

Close network session

property data_key

Key of data returned from Alpha Vantage

property default_start_date

Default start date for reader. Defaults to 5 years before current date

property function

Alpha Vantage endpoint function

property params

Parameters to use in API calls

read()

Read data from connector

property url

API URL

class pandas_datareader.av.time_series.AVTimeSeriesReader(symbols=None, function='TIME_SERIES_DAILY', start=None, end=None, retry_count=3, pause=0.1, session=None, chunksize=25, api_key=None)

Returns DataFrame of the Alpha Vantage Stock Time Series endpoints

New in version 0.7.0.

Parameters
  • symbols (string) – Single stock symbol (ticker)

  • start (string, int, date, datetime, Timestamp) – Starting date. Parses many different kind of date representations (e.g., ‘JAN-01-2010’, ‘1/1/10’, ‘Jan, 1, 1980’). Defaults to 20 years before current date.

  • end (string, int, date, datetime, Timestamp) – Ending date

  • retry_count (int, default 3) – Number of times to retry query request.

  • pause (int, default 0.1) – Time, in seconds, to pause between consecutive queries of chunks. If single value given for symbol, represents the pause between retries.

  • session (Session, default None) – requests.sessions.Session instance to be used

  • api_key (str, optional) – AlphaVantage API key . If not provided the environmental variable ALPHAVANTAGE_API_KEY is read. The API key is required.

close()

Close network session

property data_key

Key of data returned from Alpha Vantage

property default_start_date

Default start date for reader. Defaults to 5 years before current date

property function

Alpha Vantage endpoint function

property output_size

Used to limit the size of the Alpha Vantage query when possible.

property params

Parameters to use in API calls

read()

Read data from connector

property url

API URL

class pandas_datareader.av.sector.AVSectorPerformanceReader(symbols=None, start=None, end=None, retry_count=3, pause=0.1, session=None, api_key=None)

Returns DataFrame of the Alpha Vantage Sector Performances SECTOR data.

New in version 0.7.0.

Parameters
  • symbols (string, array-like object (list, tuple, Series)) – Single currency pair (formatted ‘FROM/TO’) or list of the same.

  • retry_count (int, default 3) – Number of times to retry query request.

  • pause (int, default 0.1) – Time, in seconds, to pause between consecutive queries of chunks. If single value given for symbol, represents the pause between retries.

  • session (Session, default None) – requests.sessions.Session instance to be used

  • api_key (str, optional) – Alpha Vantage API key . If not provided the environmental variable ALPHAVANTAGE_API_KEY is read. The API key is required.

close()

Close network session

property data_key

Key of data returned from Alpha Vantage

property default_start_date

Default start date for reader. Defaults to 5 years before current date

property function

Alpha Vantage endpoint function

property params

Parameters to use in API calls

read()

Read data from connector

property url

API URL

class pandas_datareader.av.quotes.AVQuotesReader(symbols=None, retry_count=3, pause=0.1, session=None, api_key=None)

Returns DataFrame of Alpha Vantage Realtime Stock quotes for a symbol or list of symbols.

Parameters
  • symbols (string, array-like object (list, tuple, Series), or DataFrame) – Single stock symbol (ticker), array-like object of symbols or DataFrame with index containing stock symbols.

  • retry_count (int, default 3) – Number of times to retry query request.

  • pause (int, default 0.1) – Time, in seconds, to pause between consecutive queries of chunks. If single value given for symbol, represents the pause between retries.

  • session (Session, default None) – requests.sessions.Session instance to be used

close()

Close network session

property data_key

Key of data returned from Alpha Vantage

property default_start_date

Default start date for reader. Defaults to 5 years before current date

property function

Alpha Vantage endpoint function

property params

Parameters to use in API calls

read()

Read data from connector

property url

API URL