Finance & Markets
Global OHLCV, intraday, technicals, fundamentals, dividends, splits, news, and macro on 60+ exchanges.
eodhd_market_dataFetches global market data from EODHD: deep historical end-of-day prices, intraday bars (1m/5m/1h), latest quotes, company fundamentals, dividend and split history, news, server-computed technical indicators, and macro economic series. Use it when the agent needs international tickers (LSE, XETRA, SW, TSE), long-window time series for backtesting, or pre-computed indicators that would otherwise have to be re-derived locally.
Wraps the EODHD REST API. Accepts a symbol with optional exchange suffix and endpoint selector — e.g. 'AAPL', 'BMW.XETRA', 'VOD.LSE:eod', 'AAPL.US:intraday:5m', 'AAPL.US:technical:rsi:14', or 'USA:macro:gdp_current_usd' (country code in the symbol slot for macro). Routes the request to the right endpoint (all, quote, eod, fundamentals, dividends, splits, news, intraday, technical, macro) and renders a markdown report whose every figure carries a [EODHD: <endpoint>, <period>] tag for downstream citation. Complements the Finnhub-backed financial_data tool with global coverage, long history, and server-computed indicators.
When a user asks:
Show me the RSI(14) trend for AAPL over the last month and the latest BMW XETRA close.
the agent calls the tool:
eodhd_market_data(input="AAPL.US:technical:rsi:14")and gets back: a markdown indicator table for AAPL tagged [EODHD: technical/rsi, last 30 points] for citation.
Set these before calling the tool. Values marked required must be present or the tool call will fail.
EODHD_API_KEY required EODHD API token used to authenticate every request (passed as ?api_token=...). Get one at https://eodhd.com/.
eodhd.api-key optional Spring property alternative to EODHD_API_KEY.
Wire this tool into a SwarmAI crew. Use the YAML DSL for declarative workflows, or the Java builder API when you want full programmatic control.
YAML DSL
# global-markets.yaml
name: global-markets-crew
process: SEQUENTIAL
agents:
- id: global-analyst
role: Global Markets Analyst
goal: Build OHLCV and fundamentals dossiers for international tickers
tools:
- eodhd_market_data
tasks:
- id: global-markets-task
agent: global-analyst
description: Fetch the last 30 days of EOD prices and current fundamentals for BMW.XETRA.Java
import ai.intelliswarm.swarmai.agent.Agent;
import ai.intelliswarm.swarmai.task.Task;
import ai.intelliswarm.swarmai.swarm.Swarm;
import ai.intelliswarm.swarmai.swarm.SwarmOutput;
import ai.intelliswarm.swarmai.process.ProcessType;
import ai.intelliswarm.swarmai.tool.common.EodhdMarketDataTool;
import org.springframework.ai.chat.client.ChatClient;
import org.springframework.beans.factory.annotation.Autowired;
@Autowired ChatClient chatClient;
@Autowired EodhdMarketDataTool eodhdMarketDataTool;
Agent globalAnalyst = Agent.builder()
.role("Global Markets Analyst")
.goal("Build OHLCV and fundamentals dossiers for international tickers")
.chatClient(chatClient)
.tool(eodhdMarketDataTool)
.build();
Task globalAnalystTask = Task.builder()
.description("Fetch the last 30 days of EOD prices and current fundamentals for BMW.XETRA.")
.agent(globalAnalyst)
.build();
SwarmOutput result = Swarm.builder()
.agent(globalAnalyst)
.task(globalAnalystTask)
.process(ProcessType.SEQUENTIAL)
.build()
.kickoff();Real scenarios where agents put this tool to work.
Implementation lives at swarmai-tools/src/main/java/ai/intelliswarm/swarmai/tool/common/EodhdMarketDataTool.java in the swarm-ai repository.