← 返回
开发者工具 Key 中文

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,...
提供与EODHD(EOD历史数据)API交互的工具和工作流程,用于获取金融数据。使用此技能可以获取市场数据、基本面数据等。
simonpierreboucher02
开发者工具 clawhub v1.0.0 1 版本 99821.1 Key: 需要
★ 1
Stars
📥 538
下载
💾 16
安装
1
版本
#latest

概述

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:

```python

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.

FunctionDescription
------
get_eod_historical_dataFetches end-of-day historical data.
get_intraday_historical_dataFetches intraday (1m, 5m, 1h) historical data.
get_real_time_dataFetches real-time (delayed) price data.
get_fundamental_dataFetches comprehensive fundamental data for a company.
get_technical_indicatorCalculates and fetches various technical indicators.
get_financial_newsRetrieves financial news for a ticker or topic.
get_sentiment_dataFetches aggregated sentiment scores.
get_options_dataRetrieves options chain data.
get_screener_dataFilters stocks based on specified criteria.
get_macro_indicator_dataFetches macroeconomic data for a country.
get_calendar_eventsGets upcoming earnings, IPOs, and splits.
get_exchange_listLists all supported exchanges.
get_exchange_symbolsLists all symbols for a given exchange.
search_instrumentSearches for tickers and instruments.
get_dividendsFetches historical dividend data.
get_splitsFetches historical stock split data.
get_bulk_eodFetches bulk EOD data for an entire exchange.

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

版本历史

共 1 个版本

  • v1.0.0 当前
    2026-03-30 15:42 安全 安全

安全检测

腾讯云安全 (Keen)

安全,无风险
查看报告

腾讯云安全 (Sanbu)

安全,无风险
查看报告

🔗 相关推荐

developer-tools

CodeConductor.ai

larsonreever
AI驱动平台,提供快速全栈开发、智能体、工作流自动化及低代码AI集成的可扩展产品创建。
★ 68 📥 180,182

Tavily api

simonpierreboucher02
教AI利用Tavily进行精准的实时网络搜索、内容抓取、站点映射和来源评估,确保正确引用与错误处理。
★ 0 📥 198
developer-tools

Github

steipete
使用 `gh` CLI 与 GitHub 交互,通过 `gh issue`、`gh pr`、`gh run` 和 `gh api` 管理议题、PR、CI 运行及高级查询。
★ 668 📥 324,165