← Back to Skills Marketplace
417
Downloads
0
Stars
1
Active Installs
1
Versions
Install in OpenClaw
/install crypto-kline-okx
Description
获取OKX交易所BTC等加密货币历史K线数据,支持多周期与时间戳分页查询超过默认限制的记录。
README (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天数据范围
- 使用时间戳分页可查询任意历史数据
Usage Guidance
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.
Capability Analysis
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.
Capability Assessment
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.
How to Use
- Make sure OpenClaw is installed (local or Docker)
- Run the install command in chat:
/install crypto-kline-okx - After installation, invoke the skill by name or use
/crypto-kline-okx - Provide required inputs per the skill's parameter spec and get structured output
Version History
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.
Metadata
Frequently Asked Questions
What is Crypto Kline BTC加密货币K线数据?
获取OKX交易所BTC等加密货币历史K线数据,支持多周期与时间戳分页查询超过默认限制的记录。 It is an AI Agent Skill for Claude Code / OpenClaw, with 417 downloads so far.
How do I install Crypto Kline BTC加密货币K线数据?
Run "/install crypto-kline-okx" in the OpenClaw or Claude Code chat to install it in one step — no extra setup required.
Is Crypto Kline BTC加密货币K线数据 free?
Yes, Crypto Kline BTC加密货币K线数据 is completely free, licensed under MIT-0. You can download, install and use it at no cost.
Which platforms does Crypto Kline BTC加密货币K线数据 support?
Crypto Kline BTC加密货币K线数据 is cross-platform and runs anywhere OpenClaw / Claude Code is available (cross-platform).
Who created Crypto Kline BTC加密货币K线数据?
It is built and maintained by u91win (@u91win); the current version is v1.0.0.
More Skills