Datayes Stock Data for Openclaw

A comprehensive AI agent skill for querying Chinese and Hong Kong stock market data, including real-time quotes, financial statements, and valuation metrics.

shermanxli
v1.0.1
Apr 1, 2026
0
842
0

Install & Download

1. ClawHub CLI

The fastest way to install a skill directly from the registry.

npx clawhub@latest install datayes-stock-data

2. Manual Installation

Copy the skill folder to one of these locations

Global
~/.openclaw/skills/
Workspace
<project>/skills/

Priority: Workspace > Local > Bundled

3. Prompt Installation

Copy this prompt to OpenClaw to install it automatically.

Help me install datayes-stock-data using Clawhub. If Clawhub is not installed, install it first (npm i -g clawhub).

Prefer to download?

Get the raw skill files in a ZIP archive.

What is Datayes Stock Data?

Datayes Stock Data is a sophisticated integration within the Openclaw Skills framework designed to bridge AI agents with the Datayes financial data ecosystem. It provides programmatic access to a wide array of market intelligence, covering A-shares and Hong Kong stocks. By utilizing Python-based scripts, this skill enables agents to fetch everything from real-time snapshots and K-line data to deep-dive financial reports and capital flow information.

The skill is built with a focus on accuracy and developer flexibility, allowing for dynamic API specification retrieval. This ensures that the AI agent always uses the most current parameters and endpoints provided by Datayes. It is an essential tool for developers building financial analysts, automated trading researchers, or portfolio monitoring agents that require reliable, professional-grade market data.

Datayes Stock Data Use Cases

  • Querying real-time stock prices and market snapshots for specific tickers like BYD (002594).
  • Searching for stock codes and entity IDs using company names in natural language.
  • Analyzing historical profit statements and financial health indicators over specific date ranges.
  • Monitoring institutional shareholder holdings and capital flow trends to gauge market sentiment.
  • Extracting specific valuation metrics like PE ratios and market capitalization for comparative analysis.

How Datayes Stock Data Works

  1. The AI agent receives a user request regarding stock performance, financials, or company information.
  2. If a ticker is not provided, the agent uses the stock_search command to resolve the company name to a valid ticker or entity ID.
  3. The skill executes a spec-only request to fetch the latest API requirements, including required parameters and HTTP methods.
  4. Using the environment-stored DATAYES_TOKEN, the Python script sends an authenticated request to the Datayes verified endpoints.
  5. The script validates the response, extracts the requested fields, and provides the raw or filtered data back to the agent.
  6. The AI agent synthesizes the data into a natural language response, clarifying units, timeframes, and data sources.

Datayes Stock Data Setup

To integrate this into your Openclaw Skills workflow, follow these installation steps:

  1. Obtain an API token from the Datayes Console (https://r.datayes.com/auth/login).
  2. Configure your environment variable:
export DATAYES_TOKEN='your_api_token_here'
  1. Verify the installation by running a market snapshot query:
python3 scripts/datayes_api.py market_snapshot --param ticker=002594 --param type=stock --result-only --pretty

Datayes Stock Data Data Schema & Taxonomy

The skill interacts with the Datayes API which returns structured JSON data. It supports the following primary data categories:

Data Category Core Parameters Common Output Fields
Market Quotes ticker, type lastPrice, highPrice, volume
Financials ticker, reportType, beginDate netProfit, totalAssets, revenue
Search query entity_id, hits, ticker
Valuation ticker, field PE, PB, marketValue

Users can use the --field flag to extract nested data using dot notation (e.g., result.data.lastPrice).

Datayes Stock Data Advanced Features

  • Dynamic Specification Discovery: Automatically fetches the latest API schema to ensure parameter validation before hitting the live endpoint.
  • Secure Token Handling: Implements hostname verification to ensure the Authorization header is only sent to trusted Datayes domains.
  • Granular Extraction: Supports the --field argument for targeted data retrieval, reducing token usage in LLM prompts.
  • Multi-Parameter Support: Allows for complex queries using JSON literals for arrays and booleans directly in the CLI.
  • Automated Smoke Testing: Includes a dedicated test suite to verify connectivity and data integrity across all primary financial modules.

SKILL.md


Loading

Related Openclaw Skills

METADATA

Github Stars: 0
forks: 0

Featured*