Skip to content

AlphaVantageTool

AlphaVantageTool connects an agent to Alpha Vantage, a financial data service. With it, the agent can look up a stock quote, its daily or weekly prices, find a company’s ticker symbol, or read the sentiment of the news about it.

It works as a tool: you connect its Tool output to the Tools input of an agent, and the agent decides when to use it based on what it is asked. The agent writes the symbol or search text for each lookup.

When to use it

  • An internal assistant answers questions like “What is Apple trading at today?”.
  • You want an agent to summarise how a stock moved over the week before an investment meeting.
  • You need the agent to find a company’s ticker symbol from its name.
  • You prepare a daily report with the top gainers and losers on the US market.

Configuration

You need an Alpha Vantage API credential with your Alpha Vantage key. See Credentials.

FieldWhat it does
Credential (required)The Alpha Vantage API credential used to query the service.
Information to requestWhat kind of data the tool returns. Defaults to Tiker Info. See the options below.

Information to request options:

OptionWhat the agent gets
Tiker InfoLatest price and volume of a stock.
Get time series daylyDaily prices of a stock.
Get time series weeklyWeekly prices of a stock.
Exchange rateCurrent rate between two currencies, written as EUR/USD, EUR to USD or EURUSD.
Search SymbolsTicker symbols that match a name or keyword.
Get Sentiment newsRecent news about a stock and the sentiment it conveys.
Top Gainers LosersThe top gainers, top losers and most traded stocks on the US market.

Each component offers one kind of data. If you want the agent to request several, add one AlphaVantageTool per kind and connect them all to the agent.

Output

The Tool output connects to an agent’s Tools input. When the agent uses it, it receives Alpha Vantage’s answer with the requested data and uses it in its reply.

Example

A finance team wants an assistant that answers quick questions about the portfolio.

  1. Add an AlphaVantageTool with Information to request set to Tiker Info.
  2. Add another one set to Search Symbols, so the agent can find the symbol when it only gets a company name.
  3. Connect the Tool output of both to the agent’s Tools input.
  4. Ask the agent “How is Microsoft trading today?”. The agent looks up the symbol and then its quote.

Good practices

  • In the agent’s instructions, explain which tool is for what, especially when you connect several.
  • Free Alpha Vantage accounts have a daily request limit. Check your plan if the agent uses it a lot.
  • YFinance Tool: another market data source for agents.
  • Agent: the agent this tool connects to.