微算力 · API 导航与自营网关
API 接入 EN
未登录登录
📈

专业金融数据一站式获取

EODHD API · v1.0.0
入口已确认,内容待校验 文件树里有 SKILL.md,但正文还没采回,frontmatter 未核对。
专业技能 安全 A 级 作者 simonpierreboucher02 公开目录收录
710 下载 1 安装 2.2k 收藏 2 浏览

简介

基于 EODHD 权威金融数据 API 构建,支持全球股票、基金、外汇等市场数据的实时与历史查询,为投资分析和量化研究提供可靠数据支撑。

原始描述

Provides tools and workflows to interact with the EODHD (EOD Historical Data) API for financial data. Use this skill to fetch market data, fundamental data,...

通过你的 Agent 添加

安装目录:eodhd-api/(目录名取自 SKILL.md 的 frontmatter name,不是 URL 里的 slug)。

点「快速安装」复制一段指令贴给你的 Agent:它会先下载到 /tmp、把文件清单和校验值给你看,你确认之后才解压安装。不会一步装完、也不改系统其它位置。

或者手动安装

Claude Code~/.claude/skills/eodhd-api/
Codex CLI~/.codex/skills/eodhd-api/
DeepSeek Harness~/.agents/skills/eodhd-api/

包是「根级 SKILL.md + 作者附带的文件」,解压到上面的 <slug>/ 目录即可; 目录名不用换,也不要把包直接解压到 skills 根目录。 技能申请的权限由作者决定:装之前先看清单里有没有脚本、它会读写什么。

中文使用说明 来自收录源

核心用法

EODHD API Skill 提供了一套完整的金融数据获取工具集,用户需先配置个人 API Token,随后通过封装的 Python 客户端 eodhd_client.py 调用各类数据接口。支持的功能涵盖:历史行情(日终/日内/实时)、基本面数据、技术指标计算、财经新闻、舆情 sentiment、期权链、宏观经济指标、股票筛选器等。典型使用流程为:明确数据需求 → 实例化客户端 → 调用专用方法(如 get_eod_historical_data、get_fundamental_data)→ 执行脚本 → 解析并呈现结构化结果。

显著优点

  1. 数据覆盖全面:支持全球 70+ 交易所、股票、ETF、基金、外汇、加密货币等多资产类别,数据粒度从分钟级到日终级别齐全。
  2. 接口封装规范:统一客户端处理认证、请求组装和基础错误处理,降低直接对接 REST API 的复杂度。
  3. 功能细分精准:提供 18+ 专用方法,避免冗余调用,如独立获取分红、拆股、财报日历等高频需求。
  4. 可扩展性强:基于 Python 脚本运行,便于集成至量化回测、自动化投研流水线等场景。

潜在缺点与局限性

  • Token 依赖:所有功能强制要求有效 EODHD API Token,免费层级存在调用频次和数据范围限制,重度使用需付费订阅。
  • 网络稳定性:金融数据实时性要求高,API 响应延迟或服务中断可能影响分析连续性。
  • 数据理解门槛:返回的 JSON 结构需用户具备一定金融知识才能正确解读,如技术指标参数、财报字段含义等。
  • 无内置可视化:仅提供原始数据获取,图表展示需额外编写代码或使用其他工具。

适合的目标群体

  • 量化研究员与算法交易员:需要程序化获取历史行情和基本面数据进行策略回测。
  • 财务分析师与投资机构:进行批量股票筛选、宏观指标跟踪、财报事件监控。
  • 金融科技开发者:构建智能投顾、投资组合管理、风险分析等应用的底层数据层。

使用风险

  1. API 配额与成本风险:高频调用易触发速率限制或产生额外费用,需合理规划请求策略。
  2. 数据准确性风险:第三方数据源存在延迟或修正可能,关键交易决策建议交叉验证。
  3. Token 安全风险:API Token 明文存储于本地配置文件,共享环境需注意访问权限管控。
  4. 依赖项风险:客户端依赖 Python 运行环境及外部网络连通性,离线或隔离环境无法使用。

技能正文


name: eodhd-api description: Provides tools and workflows to interact with the EODHD (EOD Historical Data) API for financial data. Use this skill to fetch market data, fundamental data, technical indicators, financial news, and more.

EODHD API Skill

This skill provides a comprehensive toolkit for interacting with the EOD Historical Data (EODHD) API, a powerful source for a wide range of financial data.

Core Principles

  1. API Token First: Before using any function, ensure the user has provided an EODHD API token. The config.json file must be updated with a valid token. If the token is missing or invalid, ask the user to provide one.
  2. Use the Client: All API interactions MUST go through the provided Python client: scripts/eodhd_client.py. This client handles authentication, request formation, and basic error handling.
  3. Be Specific: When fetching data, use the most specific function available in the client. For example, use get_dividends() for dividend data instead of a generic fundamental data call.
  4. Handle Errors: The client returns an {"error": "..."} dictionary on failure. Always check for this and report errors clearly to the user.

Setup: API Token Configuration

Before the first use, you must configure the API token. The user needs to provide their personal EODHD API key.

  1. Ask the user for their EODHD API token.

  2. Write the token to the configuration file using the file tool:

    default_api.file(
        action="write",
        path="/home/ubuntu/skills/eodhd-api/config.json",
        text=f"{{\"api_token\": \"{user_provided_token}\"}}"
    )
    

Workflow: Fetching Financial Data

Follow this general workflow to retrieve and use financial data from the EODHD API.

Step 1: Understand the User's Request

Identify the specific type of data the user needs. Is it historical prices, company fundamentals, news, or something else? Map their request to one of the available functions in the eodhd_client.py script.

Step 2: Instantiate the Client and Call the Method

Create a Python script to import and use the EODHDClient.

Example: Fetching Historical EOD Prices

# File: /home/ubuntu/fetch_eod.py

from skills.eodhd-api.scripts.eodhd_client import EODHDClient
import json

client = EODHDClient()
data = client.get_eod_historical_data(
    'AAPL.US', 
    from_date='2023-01-01', 
    to_date='2023-01-10'
)

if 'error' in data:
    print(f"An error occurred: {data['error']}")
else:
    print(json.dumps(data, indent=2))

Step 3: Execute the Script

Run the script using the shell tool.

python3.11 /home/ubuntu/fetch_eod.py

Step 4: Process and Present the Data

Analyze the JSON output from the script. Present the information to the user in a clear and readable format, often using Markdown tables or summaries.

Available Client Functions

The eodhd_client.py script provides a high-level interface for the most common EODHD API endpoints. Refer to the script's docstrings for detailed usage of each function.

Function Description
get_eod_historical_data Fetches end-of-day historical data.
get_intraday_historical_data Fetches intraday (1m, 5m, 1h) historical data.
get_real_time_data Fetches real-time (delayed) price data.
get_fundamental_data Fetches comprehensive fundamental data for a company.
get_technical_indicator Calculates and fetches various technical indicators.
get_financial_news Retrieves financial news for a ticker or topic.
get_sentiment_data Fetches aggregated sentiment scores.
get_options_data Retrieves options chain data.
get_screener_data Filters stocks based on specified criteria.
get_macro_indicator_data Fetches macroeconomic data for a country.
get_calendar_events Gets upcoming earnings, IPOs, and splits.
get_exchange_list Lists all supported exchanges.
get_exchange_symbols Lists all symbols for a given exchange.
search_instrument Searches for tickers and instruments.
get_dividends Fetches historical dividend data.
get_splits Fetches historical stock split data.
get_bulk_eod Fetches bulk EOD data for an entire exchange.

For detailed parameters and options for each function, consult the official EODHD API Documentation.

正文来自原始发布页, 版权归作者所有,许可未标注。 权利人认为有不妥,可申请下架。

标签

finance-accountingdata-analyticsapiautomationinvestmentstock-marketquantitative

同类 Skill