返回顶部
e

eodhd-apiEODHD接口工具

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.

作者: admin | 来源: ClawHub
源自
ClawHub
版本
V 1.0.0
安全检测
已通过
258
下载量
免费
免费
1
收藏
概述
安装方式
版本历史

eodhd-api

EODHD API 技能

本技能提供了一套与EOD历史数据(EODHD)API交互的综合工具包,该API是获取广泛金融数据的强大来源。

核心原则

  1. 1. API令牌优先:在使用任何功能前,确保用户已提供EODHD API令牌。config.json文件必须使用有效令牌进行更新。如果令牌缺失或无效,请要求用户提供。
  2. 使用客户端:所有API交互必须通过提供的Python客户端:scripts/eodhdclient.py。该客户端处理身份验证、请求构建和基本错误处理。
  3. 具体明确:获取数据时,使用客户端中最具体的可用函数。例如,获取股息数据应使用getdividends(),而非通用基本面数据调用。
  4. 处理错误:客户端在失败时返回{error: ...}字典。务必检查此情况,并向用户清晰报告错误。

设置:API令牌配置

首次使用前,必须配置API令牌。用户需要提供其个人EODHD API密钥。

  1. 1. 询问用户提供其EODHD API令牌。
  2. 将令牌写入配置文件,使用file工具:

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

工作流程:获取金融数据

按照以下通用工作流程从EODHD API检索和使用金融数据。

步骤1:理解用户请求

确定用户所需的具体数据类型。是历史价格、公司基本面、新闻还是其他内容?将其请求映射到eodhd_client.py脚本中的可用函数之一。

步骤2:实例化客户端并调用方法

创建Python脚本以导入并使用EODHDClient。

示例:获取历史EOD价格

python

文件:/home/ubuntu/fetch_eod.py

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

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

if error in data:
print(f发生错误:{data[error]})
else:
print(json.dumps(data, indent=2))

步骤3:执行脚本

使用shell工具运行脚本。

bash
python3.11 /home/ubuntu/fetch_eod.py

步骤4:处理并呈现数据

分析脚本输出的JSON数据。以清晰可读的格式(通常使用Markdown表格或摘要)向用户呈现信息。

可用客户端函数

eodhd_client.py脚本为最常见的EODHD API端点提供了高级接口。有关每个函数的详细用法,请参考脚本的文档字符串。

函数描述
geteodhistoricaldata获取每日收盘历史数据。
getintradayhistoricaldata
获取日内(1分钟、5分钟、1小时)历史数据。 |
| getrealtime_data | 获取实时(延迟)价格数据。 |
| getfundamentaldata | 获取公司的全面基本面数据。 |
| gettechnicalindicator | 计算并获取各种技术指标。 |
| getfinancialnews | 检索特定股票代码或主题的金融新闻。 |
| getsentimentdata | 获取聚合情绪评分。 |
| getoptionsdata | 检索期权链数据。 |
| getscreenerdata | 根据指定条件筛选股票。 |
| getmacroindicator_data | 获取某个国家的宏观经济数据。 |
| getcalendarevents | 获取即将到来的财报、IPO和拆股信息。 |
| getexchangelist | 列出所有支持的交易所。 |
| getexchangesymbols | 列出给定交易所的所有股票代码。 |
| search_instrument | 搜索股票代码和金融工具。 |
| get_dividends | 获取历史股息数据。 |
| get_splits | 获取历史股票拆股数据。 |
| getbulkeod | 获取整个交易所的批量EOD数据。 |

有关每个函数的详细参数和选项,请查阅官方EODHD API文档

标签

skill ai

通过对话安装

该技能支持在以下平台通过对话安装:

OpenClaw WorkBuddy QClaw Kimi Claude

方式一:安装 SkillHub 和技能

帮我安装 SkillHub 和 eodhd-api-1776205352 技能

方式二:设置 SkillHub 为优先技能安装源

设置 SkillHub 为我的优先技能安装源,然后帮我安装 eodhd-api-1776205352 技能

通过命令行安装

skillhub install eodhd-api-1776205352

下载

⬇ 下载 eodhd-api v1.0.0(免费)

文件大小: 4.48 KB | 发布时间: 2026-4-15 12:15

v1.0.0 最新 2026-4-15 12:15
- Initial release of the eodhd-api skill providing tools to interact with the EOD Historical Data (EODHD) API.
- Supports fetching market data, fundamentals, technical indicators, financial news, and more.
- Enforces API token setup, requiring entry and storage in a config file.
- Interactions must use the provided Python client, which handles authentication and error reporting.
- Detailed workflow guidance included for setup, data fetching, error handling, and presenting results.

Archiver·手机版·闲社网·闲社论坛·羊毛社区· 多链控股集团有限公司 · 苏ICP备2025199260号-1

Powered by Discuz! X5.0   © 2024-2025 闲社网·线报更新论坛·羊毛分享社区·http://xianshe.com

p2p_official_large
返回顶部