Stock API
zhangxiangliang/stock-api
Fetch real-time stock quotes, K-line (candlestick) history, and search symbols for China A-shares, Hong Kong, and US markets.
TickDB 统一实时行情数据 API。使用此 skill 获取外汇、贵金属、指数、美股、港股、A股、加密货币的实时和历史行情数据。
$ npx skills add LeoYeAI/openclaw-master-skills --skill tickdb-market-data -a claude-codeProject install by default; add -g for ~/.claude/skills/.
$ gh skill install LeoYeAI/openclaw-master-skills tickdb-market-data --agent claude-codeProject scope by default; add --scope user for a personal install. Needs GitHub CLI 2.90.0 or later (public preview).
$ git clone --depth 1 https://github.com/LeoYeAI/openclaw-master-skills.git skills-src && mkdir -p .claude/skills && cp -r skills-src/skills/tickdb-market-data .claude/skills/tickdb-market-data && rm -rf skills-srcUse ~/.claude/skills/ instead of .claude/skills for a personal install. The folder must contain SKILL.md.
Claude Code skills documentation · loads skills from .claude/skills/
Install the "tickdb-market-data" agent skill from https://github.com/LeoYeAI/openclaw-master-skills/tree/main/skills/tickdb-market-data into .claude/skills/tickdb-market-data/ in this project. Copy the whole folder (SKILL.md and every file beside it), keep the folder name "tickdb-market-data", then confirm the skill loads.Claude Code copies the folder itself, the same result as the manual copy. Check what it changed before you commit it.
$skill-installer install https://github.com/LeoYeAI/openclaw-master-skills/tree/main/skills/tickdb-market-dataType this inside Codex. $skill-installer <name> installs a curated skill from openai/skills. The installer writes to $CODEX_HOME/skills (default ~/.codex/skills). Restart Codex if the skill does not show up.
$ npx skills add LeoYeAI/openclaw-master-skills --skill tickdb-market-data -a codexProject install goes to .agents/skills/; add -g for ~/.codex/skills/.
$ gh skill install LeoYeAI/openclaw-master-skills tickdb-market-data --agent codexProject scope by default (.agents/skills/); add --scope user for a personal install.
$ git clone --depth 1 https://github.com/LeoYeAI/openclaw-master-skills.git skills-src && mkdir -p .agents/skills && cp -r skills-src/skills/tickdb-market-data .agents/skills/tickdb-market-data && rm -rf skills-srcUse ~/.agents/skills/ instead of .agents/skills for a personal install.
Codex skills documentation · loads skills from .agents/skills/
Install the "tickdb-market-data" agent skill from https://github.com/LeoYeAI/openclaw-master-skills/tree/main/skills/tickdb-market-data into .agents/skills/tickdb-market-data/ in this project. Copy the whole folder (SKILL.md and every file beside it), keep the folder name "tickdb-market-data", then confirm the skill loads.Codex copies the folder itself, the same result as the manual copy. Check what it changed before you commit it.
$ npx skills add LeoYeAI/openclaw-master-skills --skill tickdb-market-data -a cursorProject install goes to .agents/skills/; add -g for ~/.cursor/skills/.
$ gh skill install LeoYeAI/openclaw-master-skills tickdb-market-data --agent cursorProject scope by default (.agents/skills/); add --scope user for a personal install.
$ git clone --depth 1 https://github.com/LeoYeAI/openclaw-master-skills.git skills-src && mkdir -p .cursor/skills && cp -r skills-src/skills/tickdb-market-data .cursor/skills/tickdb-market-data && rm -rf skills-srcUse ~/.cursor/skills/ instead of .cursor/skills for a personal install.
Cursor skills documentation · loads skills from .cursor/skills/, .agents/skills/, .claude/skills/, .codex/skills/
Install the "tickdb-market-data" agent skill from https://github.com/LeoYeAI/openclaw-master-skills/tree/main/skills/tickdb-market-data into .cursor/skills/tickdb-market-data/ in this project. Copy the whole folder (SKILL.md and every file beside it), keep the folder name "tickdb-market-data", then confirm the skill loads.Cursor copies the folder itself, the same result as the manual copy. Check what it changed before you commit it.
$ gemini skills install https://github.com/LeoYeAI/openclaw-master-skills.git --path skills/tickdb-market-data--scope user (default) or --scope workspace; --path is the subfolder of the repo that holds the skill; --consent skips the security confirmation prompt.
$ npx skills add LeoYeAI/openclaw-master-skills --skill tickdb-market-data -a gemini-cliProject install goes to .agents/skills/; add -g for ~/.gemini/skills/.
$ gh skill install LeoYeAI/openclaw-master-skills tickdb-market-data --agent gemini-cliProject scope by default (.agents/skills/); add --scope user for a personal install.
$ git clone --depth 1 https://github.com/LeoYeAI/openclaw-master-skills.git skills-src && mkdir -p .gemini/skills && cp -r skills-src/skills/tickdb-market-data .gemini/skills/tickdb-market-data && rm -rf skills-srcUse ~/.gemini/skills/ instead of .gemini/skills for a personal install, then run /skills reload.
Gemini CLI skills documentation · loads skills from .gemini/skills/, .agents/skills/
Install the "tickdb-market-data" agent skill from https://github.com/LeoYeAI/openclaw-master-skills/tree/main/skills/tickdb-market-data into .gemini/skills/tickdb-market-data/ in this project. Copy the whole folder (SKILL.md and every file beside it), keep the folder name "tickdb-market-data", then confirm the skill loads.Gemini CLI copies the folder itself, the same result as the manual copy. Check what it changed before you commit it.
$ gh skill install LeoYeAI/openclaw-master-skills tickdb-market-dataInstalls for Copilot at project scope by default; add --scope user for a personal install. Preview a skill first with gh skill preview. Needs GitHub CLI 2.90.0 or later (public preview).
$ npx skills add LeoYeAI/openclaw-master-skills --skill tickdb-market-data -a github-copilotProject install goes to .agents/skills/; add -g for ~/.copilot/skills/.
$ git clone --depth 1 https://github.com/LeoYeAI/openclaw-master-skills.git skills-src && mkdir -p .github/skills && cp -r skills-src/skills/tickdb-market-data .github/skills/tickdb-market-data && rm -rf skills-srcUse ~/.copilot/skills/ instead of .github/skills for a personal install. Commit .github/skills so cloud agent and code review can use it.
GitHub Copilot skills documentation · loads skills from .github/skills/, .claude/skills/, .agents/skills/
Install the "tickdb-market-data" agent skill from https://github.com/LeoYeAI/openclaw-master-skills/tree/main/skills/tickdb-market-data into .github/skills/tickdb-market-data/ in this project. Copy the whole folder (SKILL.md and every file beside it), keep the folder name "tickdb-market-data", then confirm the skill loads.GitHub Copilot copies the folder itself, the same result as the manual copy. Check what it changed before you commit it.
$ npx skills add LeoYeAI/openclaw-master-skills --skill tickdb-market-data -a opencodeOpenCode documents no install command of its own. Project install goes to .agents/skills/; add -g for ~/.config/opencode/skills/.
$ gh skill install LeoYeAI/openclaw-master-skills tickdb-market-data --agent opencodeProject scope by default (.agents/skills/); add --scope user for a personal install.
$ git clone --depth 1 https://github.com/LeoYeAI/openclaw-master-skills.git skills-src && mkdir -p .opencode/skills && cp -r skills-src/skills/tickdb-market-data .opencode/skills/tickdb-market-data && rm -rf skills-srcUse ~/.config/opencode/skills/ instead of .opencode/skills for a personal install.
OpenCode skills documentation · loads skills from .opencode/skills/, .claude/skills/, .agents/skills/
Install the "tickdb-market-data" agent skill from https://github.com/LeoYeAI/openclaw-master-skills/tree/main/skills/tickdb-market-data into .opencode/skills/tickdb-market-data/ in this project. Copy the whole folder (SKILL.md and every file beside it), keep the folder name "tickdb-market-data", then confirm the skill loads.OpenCode copies the folder itself, the same result as the manual copy. Check what it changed before you commit it.
tickdb-market-dataTickDB 统一实时行情数据 API。使用此 skill 获取外汇、贵金属、指数、美股、港股、A股、加密货币的实时和历史行情数据。
Tickdb Market Data is an agent skill from LeoYeAI/openclaw-master-skills. TickDB 统一实时行情数据 API。使用此 skill 获取外汇、贵金属、指数、美股、港股、A股、加密货币的实时和历史行情数据。 触发场景: - 实时行情查询("BTC现在多少钱"、"黄金价格"、"特斯拉股价"、"美元兑日元汇率") - K线与技术分析("帮我查K线"、"BTC小时线"、"AAPL日K"、"画个蜡烛图") - 市场深度与成交("买卖盘"、"订单簿"、"最近成交记录") - 股票基本面("腾讯市值多少"、"苹果市盈率"、"茅台股息率"、"公司信息") - 资金流向("主力资金流入"、"大单流向"、"北向资金") - 市场指标("换手率"、"振幅"、"量比"、"年初至今涨幅") - 分时走势("今天分时图"、"当日走势"、"盘中分钟数据") - 产品搜索("支持哪些币种"、"有哪些港股"、"能查什么外汇") - API Key 相关("API Key怎么申请"、"在哪里注册"、"怎么获取key"、"我没有key") - 用户返回401或1001错误时,提示检查或重新申请API Key 常用查询快捷入口: - 📈 实时价格:BTCUSDT / XAUUSD / AAPL.US / 700.HK /…
Its SKILL.md is about 4.7k tokens, which your agent loads only when the skill is triggered. The skill folder holds 1 other file (for example `_meta.json`).
It sits in Business, Finance & HR, covering Stock and market analysis. The repository describes itself as: 🧠 Curated collection of 1209+ best OpenClaw skills — weekly updated by MyClaw.ai. The licence is MIT.
5 steps, taken from the first numbered list in SKILL.md.
Read from SKILL.md and the folder at commit e5199b5. It shows what the files ask for, not the result of running them.
Pre-approves nothing: there is no allowed-tools line, so your agent's usual permission prompts apply.
From allowed-tools in the SKILL.md frontmatter.
Shell commands in SKILL.md call:
curlFrom the folder's file list and the shell code blocks in SKILL.md.
Hosts in commands or code, which the agent is likely to contact:
api.tickdb.aitickdb.aiAlso links to:
docs.tickdb.ait.meFrom URLs in SKILL.md, links to its own repository left out.
Names these keys or tokens, usually read from environment variables:
API_KEYFrom names ending in _API_KEY, _TOKEN, _SECRET, _KEY or _PASSWORD in SKILL.md.
Tickdb Market Data loads about 4.7k tokens when it runs. Until then it costs about 159 tokens; SKILL.md has 1,116 words of instructions outside code blocks.
Estimates: characters ÷ 4, the usual rule of thumb; real counts depend on the model's tokenizer. Scripts and assets cost tokens only if the agent reads them.
The automated check found no risky patterns in SKILL.md.
Automated static check — not a guarantee. Review scripts before installing. It scans the text of SKILL.md for risky patterns (piping downloads into a shell, reading credential files, hidden Unicode, destructive commands); files beside SKILL.md are not scanned.
The full file from LeoYeAI/openclaw-master-skills at commit e5199b5, republished under its MIT licence (© LeoYeAI). 1,116 words, ~4,656 tokens.
.claude/skills/tickdb-market-data/SKILL.md (or your agent's skills folder). This skill also uses 1 other file; get the full folder from GitHub.统一实时行情数据 API,通过单一连接访问多个金融市场的实时与历史行情数据。
官网: https://tickdb.ai
文档: https://docs.tickdb.ai
https://api.tickdb.aiX-API-Key 中)重要:每次用户请求行情数据时,必须先检查是否已有可用 API Key。如果没有,自动获取试用 Key,无需用户手动申请。
用户请求行情数据
│
├─ frontmatter 中 api_key 已有值?
│ ├─ 是 → 检查是否为试用 Key 且已过期(见下方过期检查)
│ │ ├─ 未过期 / 正式 Key → 直接调用 API
│ │ └─ 已过期 → 清空 api_key,引导用户申请正式 Key
│ └─ 否 → 自动调用试用 Key 接口获取(见下方自动获取流程)
│
└─ API 返回 1001 错误(Token无效)?
└─ 是 → 清空 api_key,引导用户申请正式 Key当 frontmatter api_key 为空时,AI 必须自动执行以下步骤(无需询问用户):
GET https://tickdb.ai/api/public/claw-keys(无需认证)apiKey 字段api_key: "获取到的key值"api_key_type: "trial"api_key_obtained_at: "当前ISO 8601时间"(如 2026-03-29T12:00:00Z)每次使用 api_key 前,如果 api_key_type 为 trial:
api_key_obtained_at 时间api_key: ""、api_key_type: ""、api_key_obtained_at: ""如果用户主动提供了自己的 API Key:
api_key: "用户提供的key值"api_key_type: "official"api_key_obtained_at: ""(正式 Key 无需记录时间)AI 执行步骤(完整):
api_key 字段是否有值GET https://tickdb.ai/api/public/claw-keys 获取试用 Keyapi_key_type 为 trial:api_key: ""、api_key_type: ""、api_key_obtained_at: ""API Key 存储规范:
api_key、api_key_type、api_key_obtained_at 字段sk-xxxx...xxxx)数据来源标注(必须):
📡 数据由 TickDB.ai 提供申请地址:https://tickdb.ai
申请步骤:
费用说明:
支持渠道:
当用户询问以下问题时,直接调用对应接口:
| 用户意图 | 调用接口 | 示例请求 |
|---|---|---|
| "现在价格多少" / "实时行情" | GET /v1/market/ticker | symbols=BTCUSDT |
| "K线" / "蜡烛图" / "技术分析" | GET /v1/market/kline | symbol=BTCUSDT&interval=1h |
| "当前K线" / "实时K线" | GET /v1/market/kline/latest | symbols=BTCUSDT&interval=5m |
| "买卖盘" / "订单簿" / "深度" | GET /v1/market/depth | symbol=BTCUSDT&limit=20 |
| "最近成交" / "成交记录" | GET /v1/market/trades | symbol=BTCUSDT&limit=20 |
| "支持哪些品种" / "有哪些股票" | GET /v1/symbols/available | type=stock&market=HK |
| "股票信息" / "基本面" / "公司数据" | GET /v1/market/stock-info | symbols=700.HK,AAPL.US |
| "分时" / "当日走势" / "分钟数据" | GET /v1/market/intraday | symbols=700.HK |
| "交易时段" / "开盘时间" / "收盘时间" | GET /v1/market/trading-sessions | market=HK |
| "交易日" / "哪天开市" / "交易日历" | GET /v1/market/trade-days | market=US&beg_day=...&end_day=... |
| "市场指标" / "PE" / "市盈率" / "市值" | GET /v1/market/calc-index | symbols=AAPL.US |
| "资金流向" / "大单流入" / "主力资金" | GET /v1/market/capital-flow | symbol=700.HK |
// 最新价
data[0].last_price
// 24h涨跌额
data[0].price_change_24h
// 24h涨跌幅 (百分比)
data[0].price_change_percent_24h
// 24h最高/最低
data[0].high_24h, data[0].low_24h
// 成交量
data[0].volume_24h// 最新一根K线
const latest = data.klines[data.klines.length - 1]
// 开盘/最高/最低/收盘
latest.open, latest.high, latest.low, latest.close
// 成交量/成交额
latest.volume, latest.quote_volume
// K线时间 (毫秒转日期)
new Date(latest.time)// 买盘 (价格从高到低)
data.bids[0] // 最高买价, data.bids[0][0] = 价格, data.bids[0][1] = 数量
// 卖盘 (价格从低到高)
data.asks[0] // 最低卖价, data.asks[0][0] = 价格, data.asks[0][1] = 数量data[0].name_cn // 中文名称
data[0].exchange // 交易所
data[0].lot_size // 每手股数
data[0].eps_ttm // 市盈率(TTM)
data[0].bps // 每股净资产
data[0].dividend_yield // 股息率data[0].pe_ttm_ratio // 市盈率
data[0].pb_ratio // 市净率
data[0].total_market_value // 总市值
data[0].turnover_rate // 换手率
data[0].capital_flow // 资金流向| 参数 | 格式要求 | Python 示例 |
|---|---|---|
beg_day, end_day | YYYYMMDD(无连字符) | beg_day="20260322" |
start_time, end_time | 毫秒时间戳 | start_time=int(datetime.timestamp()*1000) |
timestamp (返回) | 毫秒,需除以1000转秒 | datetime.fromtimestamp(ts/1000) |
| 市场 | 代码 | 示例 |
|---|---|---|
| 外汇 | FOREX | EURUSD, GBPUSD, USDJPY |
| 贵金属 | METALS | XAUUSD, XAGUSD |
| 指数 | INDICES | SPX, NDX, DJI |
| 美股 | US | AAPL.US, TSLA.US, MSFT.US |
| 港股 | HK | 700.HK, 9988.HK, 3690.HK |
| A股 | CN | 000001.SH, 000001.SZ |
| 加密货币 | CRYPTO | BTCUSDT, ETHUSDT, ADAUSDT |
| 类型 | 周期值 |
|---|---|
| 分钟 | 1m, 3m, 5m, 15m, 30m |
| 小时 | 1h, 2h, 4h |
| 天 | 1d |
| 周 | 1w |
| 月 | 1M |
获取一个或多个交易品种的实时市场行情数据。
端点: GET /v1/market/ticker
参数:
| 参数名 | 类型 | 必填 | 说明 |
|---|---|---|---|
| symbols | string | 是 | 交易品种代码,多个用逗号分隔,最多50个 |
返回字段:
| 字段 | 说明 |
|---|---|
| symbol | 交易产品 |
| last_price | 最新成交价 |
| volume_24h | 24小时成交量 |
| high_24h | 24小时最高价 |
| low_24h | 24小时最低价 |
| price_change_24h | 24小时价格变化 |
| price_change_percent_24h | 24小时价格变化百分比 |
| timestamp | 数据时间戳(毫秒,UTC) |
示例请求:
curl -X GET "https://api.tickdb.ai/v1/market/ticker?symbols=XAUUSD,TSLA.US,BTCUSDT" \
-H "X-API-Key: YOUR_API_KEY"示例响应:
{
"code": 0,
"message": "success",
"data": [
{
"symbol": "XAUUSD",
"last_price": "2034.50",
"volume_24h": "125689",
"high_24h": "2045.00",
"low_24h": "2028.30",
"price_change_24h": "-5.50",
"price_change_percent_24h": "-0.27",
"timestamp": 1773292807000
}
]
}获取已结束时间周期的历史K线数据。
使用场景:
注意:如需当前正在形成的K线,使用 /v1/market/kline/latest
端点: GET /v1/market/kline
参数:
| 参数名 | 类型 | 必填 | 说明 |
|---|---|---|---|
| symbol | string | 是 | 交易产品代码 |
| interval | string | 是 | K线周期:1m, 5m, 15m, 30m, 1h, 2h, 4h, 1d, 1w, 1M |
| limit | integer | 否 | 返回记录数,默认100,最大1000 |
| start_time | integer | 否 | 开始时间戳(毫秒) |
| end_time | integer | 否 | 结束时间戳(毫秒) |
返回字段:
| 字段 | 说明 |
|---|---|
| symbol | 交易产品 |
| interval | K线周期 |
| klines[] | K线数据数组 |
| klines[].time | K线时间戳(毫秒) |
| klines[].open | 开盘价 |
| klines[].high | 最高价 |
| klines[].low | 最低价 |
| klines[].close | 收盘价 |
| klines[].volume | 成交量 |
| klines[].quote_volume | 成交额 |
示例请求:
curl -X GET "https://api.tickdb.ai/v1/market/kline?symbol=BTCUSDT&interval=1h&limit=10" \
-H "X-API-Key: YOUR_API_KEY"获取当前周期内正在形成并实时更新的K线数据。
使用场景:
注意:不建议用于历史回测或技术指标统计。
端点: GET /v1/market/kline/latest
参数:
| 参数名 | 类型 | 必填 | 说明 |
|---|---|---|---|
| symbols | string | 是 | 交易产品代码,多个用逗号分隔 |
| interval | string | 是 | K线周期:1m, 3m, 5m, 15m, 30m, 1h, 2h, 4h, 1d, 1w, 1M |
返回字段: 同历史K线
示例请求:
curl -X GET "https://api.tickdb.ai/v1/market/kline/latest?symbols=AAPL.US,TSLA.US&interval=5m" \
-H "X-API-Key: YOUR_API_KEY"获取交易品种的实时订单簿深度(买卖盘)数据。
端点: GET /v1/market/depth
支持市场: 美股、港股、加密货币
参数:
| 参数名 | 类型 | 必填 | 说明 |
|---|---|---|---|
| symbol | string | 是 | 交易产品代码 |
| limit | integer | 否 | 深度档位数,默认10,最大50 |
返回字段:
| 字段 | 说明 |
|---|---|
| symbol | 交易产品 |
| timestamp | 数据时间戳(毫秒,UTC) |
| bids | 买盘数组,每个元素为 [价格, 数量],按价格降序排列 |
| asks | 卖盘数组,每个元素为 [价格, 数量],按价格升序排列 |
示例请求:
curl -X GET "https://api.tickdb.ai/v1/market/depth?symbol=BTCUSDT&limit=10" \
-H "X-API-Key: YOUR_API_KEY"获取交易品种的最近成交执行记录。
端点: GET /v1/market/trades
支持市场: 港股、加密货币(不支持美股和A股)
参数:
| 参数名 | 类型 | 必填 | 说明 |
|---|---|---|---|
| symbol | string | 是 | 交易产品代码 |
| limit | integer | 否 | 返回成交记录数,默认50,最大200 |
返回字段:
| 字段 | 说明 |
|---|---|
| id | 成交ID |
| price | 成交价格 |
| quantity | 成交数量 |
| side | 成交方向(buy/sell) |
| timestamp | 成交时间(毫秒,UTC) |
示例请求:
curl -X GET "https://api.tickdb.ai/v1/market/trades?symbol=BTCUSDT&limit=20" \
-H "X-API-Key: YOUR_API_KEY"查询 TickDB 支持的产品,覆盖外汇、指数、美股、港股、A股、加密货币等市场,共计超过 27,000 个产品。
端点: GET /v1/symbols/available
参数:
| 参数名 | 类型 | 必填 | 说明 |
|---|---|---|---|
| type | string | 否 | 产品类型过滤:stock, crypto, forex, indices |
| market | string | 否 | 市场过滤:GLOBAL, US, HK, CN |
| limit | integer | 否 | 每页返回数量,默认100,最大1000 |
| offset | integer | 否 | 分页偏移量,默认0 |
返回字段:
| 字段 | 说明 |
|---|---|
| products[] | 产品数组 |
| products[].symbol | 产品代码 |
| products[].name | 产品名称 |
| products[].market | 市场代码 |
| products[].type | 产品类型(stock/crypto/forex/indices) |
| products[].currency | 交易币种(CNY/USD/HKD/USDT) |
| products[].is_active | 是否活跃 |
| products[].updated_at | 更新时间 |
| summary | 汇总信息 |
| summary.total_products | 产品总数 |
| summary.by_market | 按市场统计数量 |
| summary.by_type | 按类型统计数量 |
| pagination | 分页信息 |
| pagination.limit | 每页数量 |
| pagination.offset | 偏移量 |
| pagination.total | 总数 |
| pagination.count | 当前页返回数量 |
示例请求:
curl -X GET "https://api.tickdb.ai/v1/symbols/available?type=crypto&limit=20" \
-H "X-API-Key: YOUR_API_KEY"查询系统支持的K线周期列表。
端点: GET /v1/market/intervals/kline
返回字段:
| 字段 | 说明 |
|---|---|
| count | 支持的周期数量 |
| description | 接口说明 |
| intervals | 支持的K线周期列表 |
示例请求:
curl -X GET "https://api.tickdb.ai/v1/market/intervals/kline" \
-H "X-API-Key: YOUR_API_KEY"获取股票的详细信息,包括公司名称、行业分类、市值等基本面数据。
端点: GET /v1/market/stock-info
支持市场: 美股、港股、A股
参数:
| 参数名 | 类型 | 必填 | 说明 |
|---|---|---|---|
| symbols | string | 是 | 股票代码,多个用逗号分隔,最多50个 |
返回字段:
| 字段 | 说明 |
|---|---|
| symbol | 交易产品 |
| name_cn | 中文简体标的名称 |
| name_en | 英文标的名称 |
| name_hk | 中文繁体标的名称 |
| exchange | 标的所属交易所 |
| currency | 交易币种(CNY/USD/HKD) |
| lot_size | 每手股数 |
| total_shares | 总股本 |
| circulating_shares | 流通股本 |
| hk_shares | 港股股本(仅港股) |
| eps | 每股盈利 |
| eps_ttm | 每股盈利(TTM) |
| bps | 每股净资产 |
| dividend_yield | 股息率 |
| stock_derivatives | 可选值:1 - 期权,2 - 轮证 |
示例请求:
curl -X GET "https://api.tickdb.ai/v1/market/stock-info?symbols=700.HK,AAPL.US,000001.SZ" \
-H "X-API-Key: YOUR_API_KEY"获取股票当日的分时数据,包括每分钟的价格、成交量、成交额等。
端点: GET /v1/market/intraday
支持市场: 美股、港股、A股
参数:
| 参数名 | 类型 | 必填 | 说明 |
|---|---|---|---|
| symbols | string | 是 | 股票代码,多个用逗号分隔,最多50个 |
返回字段:
| 字段 | 说明 |
|---|---|
| symbol | 交易产品 |
| lines[] | 分时数据数组 |
| lines[].timestamp | 当前分钟的开始时间(毫秒) |
| lines[].price | 当前分钟的收盘价格 |
| lines[].volume | 成交量 |
| lines[].turnover | 成交额 |
| lines[].avg_price | 均价 |
示例请求:
curl -X GET "https://api.tickdb.ai/v1/market/intraday?symbols=700.HK,9988.HK" \
-H "X-API-Key: YOUR_API_KEY"查询指定市场的交易时段信息。
端点: GET /v1/market/trading-sessions
参数:
| 参数名 | 类型 | 必填 | 说明 |
|---|---|---|---|
| market | string | 是 | 市场代码:US, HK, CN |
返回字段:
| 字段 | 说明 |
|---|---|
| market | 市场代码 |
| trading_sessions[] | 交易时段数组 |
| trading_sessions[].begin_time | 交易开始时间(格式:hhmm) |
| trading_sessions[].end_time | 交易结束时间(格式:hhmm) |
| trading_sessions[].trade_session | 交易时段类型(0-盘中,1-盘前,2-盘后,3-夜盘) |
示例请求:
curl -X GET "https://api.tickdb.ai/v1/market/trading-sessions?market=US" \
-H "X-API-Key: YOUR_API_KEY"查询指定市场在特定时间范围内的交易日列表。
端点: GET /v1/market/trade-days
参数:
| 参数名 | 类型 | 必填 | 说明 |
|---|---|---|---|
| market | string | 是 | 市场代码:US, HK, CN |
| beg_day | string | 是 | 开始日期(格式:YYYYMMDD) |
| end_day | string | 是 | 结束日期(格式:YYYYMMDD) |
返回字段:
| 字段 | 说明 |
|---|---|
| market | 市场代码 |
| trade_days | 全日交易日列表(YYYYMMDD格式) |
| half_trade_days | 半日交易日列表 |
示例请求:
curl -X GET "https://api.tickdb.ai/v1/market/trade-days?market=CN&beg_day=20260201&end_day=20260228" \
-H "X-API-Key: YOUR_API_KEY"获取股票的综合市场指标,包括行情统计、估值指标、资金流向等。
端点: GET /v1/market/calc-index
支持市场: 美股、港股、A股
参数:
| 参数名 | 类型 | 必填 | 说明 |
|---|---|---|---|
| symbols | string | 是 | 股票代码,多个用逗号分隔,最多50个 |
返回字段:
| 字段 | 说明 |
|---|---|
| symbol | 交易品种代码 |
| last_done | 最新价 |
| change_val | 涨跌额 |
| change_rate | 涨跌幅 |
| volume | 成交量 |
| turnover | 成交额 |
| ytd_change_rate | 年初至今涨幅 |
| turnover_rate | 换手率 |
| total_market_value | 总市值 |
| capital_flow | 资金流向 |
| amplitude | 振幅 |
| volume_ratio | 量比 |
| pe_ttm_ratio | 市盈率 (TTM) |
| pb_ratio | 市净率 |
| dividend_ratio_ttm | 股息率 (TTM) |
| five_day_change_rate | 五日涨幅 |
| ten_day_change_rate | 十日涨幅 |
| half_year_change_rate | 半年涨幅 |
| five_minutes_change_rate | 五分钟涨幅 |
示例请求:
curl -X GET "https://api.tickdb.ai/v1/market/calc-index?symbols=700.HK,AAPL.US" \
-H "X-API-Key: YOUR_API_KEY"获取股票的资金流向数据,包括主力资金、大单、中单、小单的流入流出情况。
端点: GET /v1/market/capital-flow
支持市场: 美股、港股、A股
参数:
| 参数名 | 类型 | 必填 | 说明 |
|---|---|---|---|
| symbol | string | 是 | 股票代码 |
返回字段:
| 字段 | 说明 |
|---|---|
| symbol | 交易产品 |
| timestamp | 数据更新时间戳 |
| intraday_flow[] | 当日资金流向数组 |
| intraday_flow[].timestamp | 分钟开始时间戳 |
| intraday_flow[].inflow | 净流入 |
| distribution | 资金分布 |
| distribution.capital_in | 流入资金(large/medium/small) |
| distribution.capital_out | 流出资金(large/medium/small) |
示例请求:
curl -X GET "https://api.tickdb.ai/v1/market/capital-flow?symbol=700.HK" \
-H "X-API-Key: YOUR_API_KEY"import requests
# ⚠️ 请替换为您自己的 API Key(从 https://tickdb.ai 免费申请)
API_KEY = "YOUR_API_KEY"
BASE_URL = "https://api.tickdb.ai"
headers = {"X-API-Key": API_KEY}
# 获取实时行情
def get_ticker(symbols):
url = f"{BASE_URL}/v1/market/ticker"
params = {"symbols": ",".join(symbols)}
response = requests.get(url, headers=headers, params=params)
return response.json()
# 获取K线数据
def get_kline(symbol, interval="1h", limit=100):
url = f"{BASE_URL}/v1/market/kline"
params = {"symbol": symbol, "interval": interval, "limit": limit}
response = requests.get(url, headers=headers, params=params)
return response.json()
# 获取股票信息
def get_stock_info(symbols):
url = f"{BASE_URL}/v1/market/stock-info"
params = {"symbols": ",".join(symbols)}
response = requests.get(url, headers=headers, params=params)
return response.json()
# 使用示例
if __name__ == "__main__":
# 获取多个品种实时价格
tickers = get_ticker(["BTCUSDT", "ETHUSDT", "XAUUSD"])
print(tickers)
# 获取BTC历史K线
klines = get_kline("BTCUSDT", "1h", limit=100)
print(klines)GET /v1/market/ticker?symbols=XAUUSD,XAGUSD,EURUSD,GBPUSDGET /v1/market/kline?symbol=BTCUSDT&interval=1h&limit=500GET /v1/market/intraday?symbols=AAPL.US,TSLA.US,MSFT.USGET /v1/market/trading-sessions?market=HKGET /v1/market/trade-days?market=CN&beg_day=20260201&end_day=20260228GET /v1/market/calc-index?symbols=000001.SZ,600000.SHGET /v1/market/depth?symbol=BTCUSDT&limit=20自动获取一个临时试用 API Key,无需注册或认证。试用 Key 自获取起 7 天内有效。
端点: GET https://tickdb.ai/api/public/claw-keys
认证: 无需认证
参数: 无
返回字段:
| 字段 | 说明 |
|---|---|
| apiKey | 试用 API Key 字符串 |
示例请求:
curl -X GET "https://tickdb.ai/api/public/claw-keys"示例响应:
{
"apiKey": "ZolsmxPsj_w0zwt5iG8ghOV-DKoi6qPy"
}使用限制:
成功响应:
{
"code": 0,
"message": "success",
"data": { ... }
}错误响应(1001 Token无效):
{
"error": "Invalid or expired token",
"message": "[1001] Invalid or expired token",
"code": "Invalid or expired token"
}限流响应(3001):
{
"code": 3001,
"data": {
"limit": 60,
"plan": "starter",
"reset_at": 1774743598,
"upgrade_to": ""
},
"message": "Rate limit exceeded"
}| 错误码 | 说明 |
|---|---|
| 0 | 成功 |
| 1001 | API Key 无效或已过期 → 清空 frontmatter 所有 api_key 相关字段,引导用户前往 tickdb.ai 申请正式 Key |
| 1002 | 未提供 API Key → 自动调用试用 Key 接口获取 |
| 1003 | IP 不在白名单 |
| 1004 | 权限不足 |
| 2001 | 参数错误 |
| 2002 | 交易品种不存在 |
| 2003 | 时间范围无效 |
| 2004 | 请求数量超限 |
| 3001 | 请求频率超限 → 降低请求频率,reset_at 后重试 |
| 3002 | 配额已用尽 |
| 5000 | 服务器内部错误 |
| 5001 | 数据源不可用 |
| 5002 | 服务暂时不可用 |
如遇错误,请检查:
© LeoYeAI, MIT. Rendered from Markdown: HTML in the file is shown as text, images as links, and headings moved down two levels. Raw file
SKILL.md and 1 other file in skills/tickdb-market-data of LeoYeAI/openclaw-master-skills.
Open the folder on GitHubat commit e5199b5
Tickdb Market Data next to the 5 skills that share the most tags, products or categories with it. Stars are the repository's; “used in” counts other GitHub owners with a copy.
| Skill | Stars | Used in | Tokens | Auto-check | Licence | Repo updated |
|---|---|---|---|---|---|---|
| Tickdb Market Data this skillLeoYeAI/openclaw-master-skills | 2.2k | — | ~4.7k | Automated safety check: Pass | MIT | |
| Stock APIzhangxiangliang/stock-api | 2k | — | ~507 | Automated safety check: Pass | MIT | |
| Tushare Datazillionare/zillionare | 321 | 2 repos | ~2.3k | Automated safety check: Pass | None | |
| Tradingview MCPatilaahmettaner/tradingview-mcp | 5k | — | ~1.3k | Automated safety check: Pass | MIT | |
| Digital Oraclekomako-workshop/digital-oracle | 878 | — | ~5.9k | Automated safety check: Pass | MIT | |
| Longbridge Researchhelsome/folio | 271 | 3 repos | ~2.1k | Automated safety check: Pass | MIT |
zhangxiangliang/stock-api
Fetch real-time stock quotes, K-line (candlestick) history, and search symbols for China A-shares, Hong Kong, and US markets.
zillionare/zillionare
面向中文自然语言的 Tushare 数据研究技能。用于把“看看这只股票最近怎么样”“帮我查财报趋势”“最近哪个板块最强”“北向资金在买什么”“给我导出一份行情数据”这类请求,转成可执行的数据获取、清洗、对比、筛选、导出与简要分析流程。适用于 A 股、指数、ETF/基金、财务、估值、资金流、公告新闻、板块概念与宏观数据等研究场景。
atilaahmettaner/tradingview-mcp
AI Trading Intelligence — live prices, 30+ technical indicators, backtesting (6 strategies), walk-forward overfitting detection, trade logs, equity curves, licensed news sentiment (Marketaux), and…
komako-workshop/digital-oracle
Answer prediction questions using market trading data, not opinions.
helsome/folio
Institution ratings, consensus price targets, EPS/revenue forecasts, finance calendar, shareholder data, fund holders, insider trades (SEC Form 4), short interest, industry rankings, peer group…
helsome/folio
Earnings analysis — pre- and post-earnings. An agent skill from helsome/folio.
LeoYeAI/openclaw-master-skills
Manages pipelines on a DevOps quality and efficiency platform through its OpenAPI: list workspaces and templates, create, update, run and cancel pipelines, and read run records.
LeoYeAI/openclaw-master-skills
Patches OpenClaw's Feishu extension so an edited document triggers an isolated agent session that reads the doc and replies inline, turning it into a live chat space.
LeoYeAI/openclaw-master-skills
Multi-context memory management system for OpenClaw agents with group-isolated storage, global shared memory, workspace organization, and group-specific skills isolation.
LeoYeAI/openclaw-master-skills
Runs a brand's AI-search visibility work end to end: diagnosing how AI platforms represent it, repositioning it, producing AI-optimized content and monitoring ongoing mentions.
LeoYeAI/openclaw-master-skills
Installs and authenticates the gws CLI, then automates Gmail, Drive, Sheets, Calendar, Docs, Chat and Tasks with ready-made recipes, persona bundles and security audits.
LeoYeAI/openclaw-master-skills
Runs four advisor roles, a fitness coach, nutritionist, data analyst and TCM practitioner, to build a health profile and track workouts, diet and wellness over time.
Categories
TickDB 统一实时行情数据 API。使用此 skill 获取外汇、贵金属、指数、美股、港股、A股、加密货币的实时和历史行情数据。. Tickdb Market Data is an agent skill from LeoYeAI/openclaw-master-skills.
Tickdb Market Data fits situations like: tasks that involve Stock and market analysis.
Run `npx skills add LeoYeAI/openclaw-master-skills --skill tickdb-market-data -a claude-code`. Or copy the skill folder (skills/tickdb-market-data in LeoYeAI/openclaw-master-skills) into .claude/skills/tickdb-market-data in your project. Claude Code loads it when a task matches its description.
Run `npx skills add LeoYeAI/openclaw-master-skills --skill tickdb-market-data -a codex`. Or copy the skill folder (skills/tickdb-market-data in LeoYeAI/openclaw-master-skills) into .agents/skills/tickdb-market-data in your project. Codex loads it when a task matches its description.
Cursor, Gemini CLI, GitHub Copilot and OpenCode also load SKILL.md folders. With the skills CLI, run `npx skills add LeoYeAI/openclaw-master-skills --skill tickdb-market-data -a cursor` (or -a gemini-cli, github-copilot or opencode for the others). To copy it by hand, put the folder in .cursor/skills/tickdb-market-data, .gemini/skills/tickdb-market-data, .github/skills/tickdb-market-data and .opencode/skills/tickdb-market-data in your project.
Going by SKILL.md and its folder, Tickdb Market Data needs the command-line tools its instructions call (curl) and credentials named API_KEY. Our summary lists: Python 3; A credential in YOUR_API_KEY.
SKILL.md names 4 domains. In commands or code: api.tickdb.ai and tickdb.ai; the agent is likely to contact these when it follows the instructions. As links in the text: docs.tickdb.ai and t.me. This is read from the text; nothing was executed.
Our automated static check of SKILL.md found no risky patterns, such as piping downloads into a shell, reading credential files or hidden Unicode. It is not a guarantee. Review the folder before installing.
Tickdb Market Data is published under the MIT licence (the repository's licence). It allows redistribution, so the full SKILL.md is shown on this page.
About 4.7k tokens (SKILL.md is roughly 19k characters). Agents keep only the skill's name and description in context until a task matches; then they load SKILL.md in full.
Skills that share tags, products or a category with Tickdb Market Data: Stock API (zhangxiangliang/stock-api, 2k stars), Tushare Data (zillionare/zillionare, 321 stars), Tradingview MCP (atilaahmettaner/tradingview-mcp, 5k stars) and Digital Oracle (komako-workshop/digital-oracle, 878 stars). The comparison table on this page puts their stars, adoption, token cost, safety result and licence side by side.
LeoYeAI (a GitHub user) maintains it in LeoYeAI/openclaw-master-skills, which has 2,161 GitHub stars. The repository holds 1,235 skills in this directory. The repository was last updated on July 20, 2026.
Source: LeoYeAI/openclaw-master-skills on GitHub. Facts on this page come from the repository at the commit we read; the author's words are quoted as theirs.