← All tools

Finance & Markets

EODHD Market Data

Global OHLCV, intraday, technicals, fundamentals, dividends, splits, news, and macro on 60+ exchanges.

eodhd_market_data

Overview

Fetches 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.

How it works

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.

Example

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.

Configuration

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.

Use it in a workflow

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();

What it's good for

Real scenarios where agents put this tool to work.

International ticker analysis on LSE, XETRA, TSE, ASX
Long-window OHLCV and intraday pulls for backtesting
Server-computed technical indicators (RSI, MACD, SMA/EMA, BBANDS) without local re-derivation
Macro overlays — GDP, CPI, rates, unemployment by country
Total-return calculations using dividend and split history

Source

Implementation lives at swarmai-tools/src/main/java/ai/intelliswarm/swarmai/tool/common/EodhdMarketDataTool.java in the swarm-ai repository.

Open eodhd_market_data on GitHub →