← 返回 Skills 市场
u91win

Crypto Kline BTC加密货币K线数据

作者 u91win · GitHub ↗ · v1.0.0 · MIT-0
cross-platform ✓ 安全检测通过
417
总下载
0
收藏
1
当前安装
1
版本数
在 OpenClaw 中安装
/install crypto-kline-okx
功能描述
获取OKX交易所BTC等加密货币历史K线数据,支持多周期与时间戳分页查询超过默认限制的记录。
使用说明 (SKILL.md)

OKX K线数据技能

获取OKX交易所加密货币历史K线数据,支持通过时间戳分页查询更早的历史数据。

功能

  • 获取历史K线数据(1m/5m/15m/30m/1h/4h/6h/12h/1d/1w/1M)
  • 支持时间戳分页查询,可获取超过默认限制的历史数据
  • 支持BTC、ETH、SOL等主流币种

使用方法

# 查询历史K线
node scripts/okx-kline.js BTC-USDT 1d 30        # BTC日线最近30条
node scripts/okx-kline.js ETH-USDT 4h 100       # ETH 4小时线最近100条
node scripts/okx-kline.js SOL-USDT 1h 50        # SOL 1小时线50条

# 通过时间戳查询历史数据
# 查询2025年4月1日的数据
node scripts/okx-kline.js BTC-USDT 4h --after=1743500000000

# 参数说明
# 第1个参数:交易对 (BTC-USDT/ETH-USDT/SOL-USDT等)
# 第2个参数:周期 (1m/5m/15m/30m/1h/4h/6h/12h/1d/1w/1M)
# 第3个参数:数量 (默认100, 最大100)
# --after: 查询指定时间戳之前的数据 (更早)
# --before: 查询指定时间戳之后的数据 (更新)

时间戳分页查询示例

# 查询2025年3月的数据 (需要分页多次查询)
# OKX API单次最多返回100条,4小时K线约33天数据量

# 先获取最近的数据
node scripts/okx-kline.js BTC-USDT 4h 100

# 使用 --after 参数获取更早的数据
# after参数需要使用毫秒级时间戳
node scripts/okx-kline.js BTC-USDT 4h 100 --after=1743500000000

支持的交易对

所有OKX支持的现货交易对,如:

  • BTC-USDT, ETH-USDT, SOL-USDT, BNB-USDT
  • DOGE-USDT, XRP-USDT, ADA-USDT, DOT-USDT
  • ONDO-USDT, PEPE-USDT, etc.

API 限制

  • 单次最多100条记录
  • 4小时K线:约33天数据范围
  • 使用时间戳分页可查询任意历史数据
安全使用建议
This script appears to do exactly what it says: fetch historical K-line data from OKX and print it. Before running: ensure you have Node installed (the script requires node), verify that you trust the included script (you can open scripts/okx-kline.js — it's short and readable), and check your http_proxy/https_proxy/HTTP_PROXY/HTTPS_PROXY environment variables — if set, your traffic will be routed through that proxy. No API keys or secrets are needed. If you want additional assurance, run the script in an isolated environment or inspect the code locally; otherwise it is reasonable to install/use.
功能分析
Type: OpenClaw Skill Name: crypto-kline-okx Version: 1.0.0 The skill bundle is a legitimate utility for fetching public cryptocurrency K-line data from the OKX exchange. The Node.js script (scripts/okx-kline.js) uses standard built-in modules (http/https), contains no external dependencies, and does not require or handle sensitive API keys. It includes standard proxy support via environment variables and lacks any indicators of data exfiltration, malicious execution, or prompt injection.
能力评估
Purpose & Capability
Name/description promise (fetch OKX K-line data with timestamp pagination) matches the provided script and SKILL.md. The code calls OKX's history-candles API and formats output as described.
Instruction Scope
SKILL.md only instructs the agent/user to run the included Node script with specific arguments and describes pagination behavior. The runtime instructions do not ask to read unrelated files or credentials. They do mention using standard http(s)_proxy environment variables to route traffic.
Install Mechanism
There is no install spec (instruction-only), which is low risk. The package contains a Node.js script; _meta.json declares 'node' required even though registry metadata earlier listed none — this minor inconsistency should be noted but is not a security problem. No downloads or external installers are used.
Credentials
The skill requests no credentials or config paths. It respects standard http(s)_proxy env vars (so if those are set they will route requests through the specified proxy). There are no other environment variables or secrets accessed.
Persistence & Privilege
The skill is user-invocable, not always-enabled, does not modify other skills or system config, and does not persist credentials or change agent settings.
如何使用
  1. 确保已安装 OpenClaw(本地或 Docker 部署)
  2. 在对话框中输入安装命令:/install crypto-kline-okx
  3. 安装完成后,直接呼叫该 Skill 的名称或使用 /crypto-kline-okx 触发
  4. 根据 Skill 的参数说明提供必要输入,即可获得结构化输出
版本历史
v1.0.0
- Initial release of OKX K-line data skill. - Fetch historical K-line (candlestick) data from OKX for multiple intervals (1m to 1M). - Supports BTC, ETH, SOL, and other major spot trading pairs. - Allows pagination by timestamp to access data beyond default API limits. - Command-line usage for flexible and targeted queries. - Supports up to 100 records per call, with full instructions for paginated queries.
元数据
Slug crypto-kline-okx
版本 1.0.0
许可证 MIT-0
累计安装 1
当前安装数 1
历史版本数 1
常见问题

Crypto Kline BTC加密货币K线数据 是什么?

获取OKX交易所BTC等加密货币历史K线数据,支持多周期与时间戳分页查询超过默认限制的记录。 它是一个面向 Claude Code / OpenClaw 的 AI Agent Skill 插件,目前累计下载 417 次。

如何安装 Crypto Kline BTC加密货币K线数据?

在 OpenClaw 或 Claude Code 对话框中运行命令「/install crypto-kline-okx」即可一键安装,无需额外配置。

Crypto Kline BTC加密货币K线数据 是免费的吗?

是的,Crypto Kline BTC加密货币K线数据 完全免费,采用 MIT-0 许可证,可自由下载、安装和使用。

Crypto Kline BTC加密货币K线数据 支持哪些平台?

Crypto Kline BTC加密货币K线数据 跨平台运行,可在任意部署了 OpenClaw / Claude Code 的环境中使用(cross-platform)。

谁开发了 Crypto Kline BTC加密货币K线数据?

由 u91win(@u91win)开发并维护,当前版本 v1.0.0。

💬 留言讨论