{"skill":{"slug":"crypto-kline-okx","displayName":"Crypto Kline BTC加密货币K线数据","summary":"获取OKX交易所BTC等加密货币历史K线数据，支持多周期与时间戳分页查询超过默认限制的记录。","description":"# OKX K线数据技能\n\n获取OKX交易所加密货币历史K线数据，支持通过时间戳分页查询更早的历史数据。\n\n## 功能\n\n- 获取历史K线数据（1m/5m/15m/30m/1h/4h/6h/12h/1d/1w/1M）\n- 支持时间戳分页查询，可获取超过默认限制的历史数据\n- 支持BTC、ETH、SOL等主流币种\n\n## 使用方法\n\n```bash\n# 查询历史K线\nnode scripts/okx-kline.js BTC-USDT 1d 30        # BTC日线最近30条\nnode scripts/okx-kline.js ETH-USDT 4h 100       # ETH 4小时线最近100条\nnode scripts/okx-kline.js SOL-USDT 1h 50        # SOL 1小时线50条\n\n# 通过时间戳查询历史数据\n# 查询2025年4月1日的数据\nnode scripts/okx-kline.js BTC-USDT 4h --after=1743500000000\n\n# 参数说明\n# 第1个参数：交易对 (BTC-USDT/ETH-USDT/SOL-USDT等)\n# 第2个参数：周期 (1m/5m/15m/30m/1h/4h/6h/12h/1d/1w/1M)\n# 第3个参数：数量 (默认100, 最大100)\n# --after: 查询指定时间戳之前的数据 (更早)\n# --before: 查询指定时间戳之后的数据 (更新)\n```\n\n## 时间戳分页查询示例\n\n```bash\n# 查询2025年3月的数据 (需要分页多次查询)\n# OKX API单次最多返回100条，4小时K线约33天数据量\n\n# 先获取最近的数据\nnode scripts/okx-kline.js BTC-USDT 4h 100\n\n# 使用 --after 参数获取更早的数据\n# after参数需要使用毫秒级时间戳\nnode scripts/okx-kline.js BTC-USDT 4h 100 --after=1743500000000\n```\n\n## 支持的交易对\n\n所有OKX支持的现货交易对，如：\n- BTC-USDT, ETH-USDT, SOL-USDT, BNB-USDT\n- DOGE-USDT, XRP-USDT, ADA-USDT, DOT-USDT\n- ONDO-USDT, PEPE-USDT, etc.\n\n## API 限制\n\n- 单次最多100条记录\n- 4小时K线：约33天数据范围\n- 使用时间戳分页可查询任意历史数据\n","topics":["加密货币","交易"],"tags":{"latest":"1.0.0"},"stats":{"comments":0,"downloads":782,"installsAllTime":29,"installsCurrent":1,"stars":0,"versions":1},"createdAt":1773169862863,"updatedAt":1778491811973},"latestVersion":{"version":"1.0.0","createdAt":1773169862863,"changelog":"- Initial release of OKX K-line data skill.\n- Fetch historical K-line (candlestick) data from OKX for multiple intervals (1m to 1M).\n- Supports BTC, ETH, SOL, and other major spot trading pairs.\n- Allows pagination by timestamp to access data beyond default API limits.\n- Command-line usage for flexible and targeted queries.\n- Supports up to 100 records per call, with full instructions for paginated queries.","license":"MIT-0"},"metadata":null,"owner":{"handle":"u91win","userId":"s1795xd64hymg80qn5vmvbg7c183pw3r","displayName":"u91win","image":"https://avatars.githubusercontent.com/u/19883291?v=4"},"moderation":null}