A-Share Dragon-Tiger List Market Data API: Querying Daily Rankings and Seat Details in Agents

Preface

When performing A-share market analysis or writing quantitative scripts, the Dragon Tiger List (LHB) is a commonly used public data source. You need to pull the full-market list of stocks on the list for a specific trading day, and sometimes trace back to a specific stock’s historical records to view the top 5 buying and selling brokerage seats. Organizing this manually from exchange disclosure pages or scraping third-party pages sporadically is high-maintenance and not suitable for direct integration with Coding Agents for natural language invocation.

Below is an introduction to the SkillHub community Skill “A-share Dragon Tiger List Market Data API Interface” (coordinates @user_3391caa4/lhb-api). It encapsulates HTTP interface conventions, field descriptions, and a Python client within SKILL.md. Agents can initiate Bearer authenticated requests based on the documentation, or use the included client.py to query the current day’s list, individual stock history, and account quotas.

What is this

This is a Professional edition Skill designed for Large Language Model Agents, published by user_3391caa4 and sourced from the community. The current registered version on SkillHub is 1.0.3 (The Skill homepage previously displayed v1.0.2, but the retrieval interface return value takes precedence).

The Skill package is very small: aside from SKILL.md, it includes client.py (LHBClient). The data description indicates it is the same-source data as publicly disclosed by exchanges, covering the time span from 2022 to present, with a documented total volume of 70,000+ records. The lists include daily and 3-day rankings, along with top 5 buying/selling brokerage details. The SkillHub tag is requires_api_key=true; you must provide your own API Key before use.

Official Entry Points:

  • Skill Homepage: https://www.skillhub.cn/skills/user_3391caa4/lhb-api
  • Resource Homepage: https://api.skillhub.cn/user_3391caa4/lhb-api

Core Features

The following capabilities are derived from SKILL.md and client.py within the Skill package and can be verified directly by path.

Data Fields and List Types

Common fields for a single record include: Stock Code, Name, Closing Price, Change Percentage, Turnover, Net Buy, Top 5 Buy Total, Top 5 Sell Total, and Reason for Listing; entry_type is either daily or 3day. The brokers.buy / brokers.sell returned by the daily interface represent the top 5 seats, containing rank, name, buy amount, sell amount, and net amount.

HTTP Interface

The base URL in the documentation example is http://fffy520.gicp.net:8003; the default base_url in client.py is http://fffy520.gicp.net:19968. If a request fails, you can explicitly pass a base_url consistent with the documentation when initializing the client, or confirm the current service address with your Key provider.

Interface Method Function
/api/lhb/daily GET Full Dragon Tiger List for a specified trading day or the latest trading day (including Top 5 Buy/Sell)
/api/lhb/history GET Query historical listing records by stock code (Documentation notes it does not include brokerage details)
/api/lhb/account GET Plan, daily quota, remaining count, expiration time (Documentation states it does not consume quota)

Authentication method is via request header:

Authorization: Bearer YOUR_KEY

Quota and Limits (Documentation Conventions)

  • Automatic activation upon first use; documentation states a 7-day free trial (10 times/day) is included.
  • Monthly/Quarterly/Yearly Cards: 50 times/day; long-term plans are documented as unlimited.
  • For non-long-term plans, history is limited to 30 records; unlimited for long-term plans.
  • Frequency: 30 times/second/Key; daily quota resets at 00:00 every day.
  • The daily interface has a 60-minute cache; repeated requests do not consume quota again.
  • Common HTTP status codes: 401 Invalid Key, 403 Key disabled or daily quota exhausted, 429 Too frequent.

The plan renewal description link is in the Skill documentation: http://fffy520.gicp.net:8003/renew.

Installation and Activation

The general installation method provided by the SkillHub page is to let the AI read the installation instructions and install the specified coordinates. You can send the following prompt to clients supporting Skills, such as Cursor or Claude Code:

Please install `@user_3391caa4/lhb-api` based on https://skillhub.cn/install/skillhub.md.

Note: During retrieval, https://skillhub.cn/install/skillhub.md returned a 500 error. If the link is temporarily unavailable, you can download the package from SkillHub and unzip it to your local Skill directory. The public download endpoint is:

curl -L "https://api.skillhub.cn/api/v1/download?slug=lhb-api" -o lhb-api.zip
unzip lhb-api.zip

After unzipping, you should obtain SKILL.md and client.py. After enabling the Skill in the Agent workspace, configure the API Key to the environment variable (consistent with client.py):

export LHB_API_KEY=YOUR_KEY

The specific Skill directory names for Cursor / Codex CLI / Claude Code vary by client version. Please place the above files in the corresponding skills path according to each product’s documentation; differences not separately specified on the official page are not expanded upon here.

Typical Usage

curl to query the daily list

When date is not passed, the documentation example fetches the latest trading day; passing date=YYYY-MM-DD specifies a date.

curl "http://fffy520.gicp.net:8003/api/lhb/daily" \
  -H "Authorization: Bearer YOUR_KEY"

curl "http://fffy520.gicp.net:8003/api/lhb/daily?date=2026-05-08" \
  -H "Authorization: Bearer YOUR_KEY"

On success, the JSON contains code, remaining (remaining quota), and a data array.

curl to query stock history and account

curl "http://fffy520.gicp.net:8003/api/lhb/history?code=002031" \
  -H "Authorization: Bearer YOUR_KEY"

curl "http://fffy520.gicp.net:8003/api/lhb/account" \
  -H "Authorization: Bearer YOUR_KEY"

Python Client

The Skill package includes client.py providing LHBClient, which relies on the standard library with no additional pip packages required:

from client import LHBClient

client = LHBClient("YOUR_API_KEY")  # Or LHBClient(key, base_url="http://fffy520.gicp.net:8003")

latest = client.daily()
one_day = client.daily("2026-05-08")
history = client.history("002031")
account = client.account()

Command line (Requires LHB_API_KEY to be set):

python client.py daily
python client.py daily 2026-05-08
python client.py history 002031
python client.py account

In Agent conversations, you can directly describe requirements (e.g., “Query the top 5 stocks by net buy on the Dragon Tiger List for 2026-05-08 and list the buying seats”). The model will select daily / history and parse the brokers fields according to SKILL.md.

Applicable Scenarios and Notes

Who is it for

  • Developers who need to quickly pull Dragon Tiger List data or view brokerage seats during conversations or scripts without writing curl commands manually every time.
  • When building stock selection factors, tracking “hot money” (speculative capital) seats, or calculating individual stock historical listing frequency, the Skill can serve as the Agent’s data description layer.

Usage Notes

  • You must provide your own Key; SkillHub metadata marks requires_api_key=true.
  • The documentation states updates occur at 18:00 on trading days, with data coverage starting from 2022-01-04; please use account to confirm quota and expiration time before live trading.
  • history and daily return fields with different depths; prioritize daily for seat analysis.
  • This is a community Skill; service domains and ports are subject to the documentation within the package. If client.py and SKILL.md have inconsistent default ports, use the actually available base_url.
  • SkillHub Statistics (Retrieval Interface): Approx. 1259 downloads, Category: professional; rating fields may differ from numbers shown on-site; refer to the SkillHub page for details.

Conclusion

The “A-share Dragon Tiger List Market Data API Interface” consolidates Dragon Tiger List REST conventions, field tables, and LHBClient into a single Agent Skill. It is suitable for driving list queries, history checks, and quota views via natural language in environments like Cursor. The installation coordinate is @user_3391caa4/lhb-api. For resources and instructions, see https://api.skillhub.cn/user_3391caa4/lhb-api , and for the community page, see https://www.skillhub.cn/skills/user_3391caa4/lhb-api .

羽毛球分组比赛记分
小程序二维码

欢迎使用《羽毛球分组比赛记分》微信小程序

Xiaoye