mcpField
O
okx-cex-smartmoney

okx-cex-smartmoney

github.com/okx数据与数据库1975.9k 次安装今天更新
代码仓库

关于 okx-cex-smartmoney

面向 OKX 用户的只读 Smart Money 数据分析技能,通过 CLI 查询交易员排名、表现、持仓和聚合信号。支持按条件筛选交易员,以及查看指定币种或交易员的信号趋势。

主要功能

  1. 01按条件筛选交易员排名
  2. 02查询交易员表现、持仓及历史记录
  3. 03搜索交易员昵称
  4. 04汇总多币种聪明钱信号
  5. 05查看单币种信号时间序列

适用场景

  1. 01发现并比较高排名交易员
  2. 02检查指定交易员的持仓与成交历史
  3. 03了解聪明钱关注的币种
  4. 04追踪某币种信号的历史变化

安装

复制下面的命令,在终端中运行。

$npx skills add https://github.com/okx/agent-skills --skill okx-cex-smartmoney

安装后在 Claude Code 中输入/okx-cex-smartmoney确认已加载。

包含的文件

除 SKILL.md 外,安装时一起下载的参考资料和脚本。

references/
signal-commands.md
templates.md
trader-commands.md
workflows.md

详细介绍

OKX CEX Smart Money 命令行工具

Smart Money 排行榜、交易员分析、持仓跟踪和汇总共识信号。

预检

运行任何命令之前,请遵循 ../_shared/preflight.md。 使用此文件 frontmatter 中的 metadata.version 作为步骤 2 的参考。

前置条件

  1. 安装 okx CLI:
    npm install -g @okx_ai/okx-trade-cli
    
  2. 配置凭据:
    okx config init   # select site -> follow browser OAuth flow
    
  3. 验证:okx smartmoney traders-by-filter --limit 5

安全:绝不要在聊天中接收凭据。请引导用户使用 okx config init 进行设置。


凭据与配置文件检查

在运行任何需要身份验证的命令之前,先运行以下两条命令——okx auth status --json 中的 apiKey 字段是 auth 二进制文件的内部状态,无论 ~/.okx/config.toml 是否配置了 API 密钥配置文件,该字段始终为 false。okx config show --json 是判断是否存在 API 密钥的唯一权威来源。身份验证方式会在预检步骤 2 中检测,并在本次会话中记住。

okx config show --json      # reveals API-key profiles (TOML config)
okx auth status --json      # reveals OAuth session state (auth-binary state)

按以下顺序应用规则——匹配第一项后即停止:

  • config show --json 中有任意配置文件的 api_key 字段非空 → API Key 模式。继续。
  • 没有 API 密钥配置文件,并且 auth status --json 返回 "status":"logged_in" → OAuth 模式。继续。
  • 没有 API 密钥配置文件,并且 "status":"pending" — 登录正在进行,等待其完成。
  • 没有 API 密钥配置文件,并且 "status":"not_logged_in" — 停止,加载 okx-cex-auth skill 并遵循登录步骤,等待登录完成。

Smart Money 不支持模拟模式(排行榜数据仅为实时数据)。始终静默使用实盘模式——除非发生错误,否则不要提及。

  • API Key 用户:使用 --profile <live-profile>(不含 demo=true 的配置文件)。
  • OAuth 用户:无需添加标志(默认使用实盘模式)。

**发生身份验证错误(401 / "Session expired" / "Run okx auth login first")时:**立即停止,加载 okx-cex-auth skill 并遵循重新身份验证步骤,然后重试。


技能路由

用户意图路由到技能
市场价格、行情代码、K 线okx-cex-market
现货 / 交割 / 永续 / 期权订单okx-cex-trade
账户余额、持仓、转账okx-cex-portfolio
网格 / DCA 交易机器人okx-cex-bot
Simple Earn、Flash Earn、链上 Earn、双币投资(双币赢)或 AutoEarn(自动赚币)okx-cex-earn
Smart Money 排行榜、信号、交易员分析本技能

命令索引(10 条命令,均为只读)

交易员系列(6)
命令类型身份验证描述
smartmoney traders-by-filterREAD必需根据资金池条件(周期 / minPnl / minWinRate / maxDrawdown / minAum)进行排行榜排名。按 authorId 分页。名称使用 min* / max* 前缀,与信号侧的 *Tier 命名空间互不重叠。
smartmoney performance-by-trader --authorIds <id1,id2>READ必需一个或多个 authorId 的 PnL / 胜率概况。--sortBy <pnl|pnlRatio>(默认值为 pnl)和 --period <3|7|30|90>(默认值为 90)决定排名和回溯时间窗口。
smartmoney search-trader --keyword <name>READ必需按昵称关键词搜索 Top Traders(最多 10 条结果,按关注者数量排名)。
smartmoney trader-positions --authorId <id>READ必需单个交易员当前的未平仓持仓。可通过 --instId <BTC-USDT-SWAP>(或不带交易对类型的基础币种)筛选。
smartmoney trader-positions-history --authorId <id>READ必需已平仓记录及已实现 PnL。按 posId 分页。
smartmoney trader-orders-history --authorId <id>READ必需订单 / 成交记录。按 ordId 分页。
Signal / coin 系列(4 个)
命令类型认证描述
smartmoney signal-overview-by-filterREADRequired多资产信号,按等级筛选的池。通过 --topInstruments(最热门的前 N 个)或 --instCcyList BTC,ETH,SOL(指定币种)选择币种——两者只能选其一。用于发现聪明资金中最热门的币种。
smartmoney signal-overview-by-trader --authorIds <id1,id2>READRequired基于手动选定的交易员集合聚合的多资产信号(通过 authorIds 直接查询)。通过 --topInstruments 或 --instCcyList 选择币种。--sortBy(默认为 pnl)和 --period(默认为 7)决定能力指标。不提供能力等级筛选项(pnlTier / winRateTier / 等)。
smartmoney signal-trend-by-filter --instCcy <ccy> [--asOfTime <yyyyMMddHH>]READRequired基于 asOfTime 锚定的单币种聪明资金信号时间序列(默认为当前 UTC 小时),按等级筛选的池。--granularity 1h|1d、--limit 控制时间桶数量。
smartmoney signal-trend-by-trader --authorIds <id1,id2> --instCcy <ccy> [--asOfTime <yyyyMMddHH>]READRequired基于手动选定的交易员集合聚合的单币种聪明资金信号时间序列(通过 authorIds 直接查询)。--granularity 1h|1d(默认为 1h)、--sortBy(默认为 pnl)、--period(默认为 7)。不提供能力等级筛选项。

时间锚点:signal-trend-by-{filter,trader} 接受可选参数 --asOfTime <yyyyMMddHH>(10 位 UTC 小时,例如 2026050100)。返回以该锚点结束的最新 --limit 个时间桶。省略 --asOfTime 时,将使用当前 UTC 小时。signal-overview-by-{filter,trader} 不提供时间输入——处理程序始终使用当前小时。

多币种选择:signal-overview-by-filter 和 signal-overview-by-trader 接受 --topInstruments(最热门的前 N 个)或 --instCcyList BTC,ETH,SOL(显式指定基础币种列表)。这两个标志不能同时使用。两者都不传时,默认为 --topInstruments=20。

⚠ 仅限线性合约:所有四个 signal-* 命令仅聚合 USDT 本位和 USDS 本位合约。上游会排除币本位合约(BTC-USD-SWAP、BTC-USD-DELIVERY、ETH-USD-SWAP、……)——交易员的币本位持仓会从 longNotional / shortNotional / tradersWithPosition 中静默剔除。如果交易员持有大量币本位敞口,但没有该币种的线性合约持仓,他们将完全不会出现在信号中。要查看交易员的完整持仓(包括币本位持仓),请运行 smartmoney trader-positions --authorId <id>。

需要查看交易员的完整情况? 旧版 smartmoney trader 复合命令已移除。请并行运行 performance-by-trader、trader-positions 和 trader-orders-history。

完整的命令语法和参数请参阅 {baseDir}/references/trader-commands.md 和 {baseDir}/references/signal-commands.md。


操作流程

步骤 0 — 凭据与档案检查

执行任何需要认证的命令前:请参阅凭据与档案检查。始终在后台使用 live 模式。

步骤 1 — 确定意图

交易员发现 / 排名:

  • “推荐交易员” / “top traders” / “牛人榜” → 使用 smartmoney traders-by-filter 进行排序 / 筛选。参见 {baseDir}/references/trader-commands.md。
  • “看看某个交易员” / “trader detail” → 并行运行 performance-by-trader、trader-positions、trader-orders-history(旧的组合命令 smartmoney trader 已移除)。
  • “搜索 alice / 小明” / “find trader by nickname” → smartmoney search-trader --keyword <name>(返回 ≤10 个匹配结果,其中包含可传入其他工具的 authorId)。
  • “verify these authorIds” / 已知 authorId → smartmoney performance-by-trader --authorIds <id1,id2>(直接查询;--sortBy / --period 按指定值执行,默认值为 pnl / 90)。
  • “他的当前持仓” / “current positions only” → smartmoney trader-positions --authorId <id>。
  • “他的成交记录” / “trade history” → smartmoney trader-orders-history --authorId <id>(分页)。
  • “历史平仓” / “closed positions” / “realized PnL track record” → smartmoney trader-positions-history --authorId <id>(分页)。

信号分析:

  • “BTC 聪明钱信号” / “smart money signal for BTC” → smartmoney signal-overview-by-filter --instCcyList BTC。参见 {baseDir}/references/signal-commands.md。
  • “BTC ETH SOL 这几个币的信号” / “signals for these specific coins” → smartmoney signal-overview-by-filter --instCcyList BTC,ETH,SOL。
  • “这几个交易员看哪些币?” / “consensus among these specific traders” → smartmoney signal-overview-by-trader --authorIds <id1,id2>(默认返回该群组中最热门的前 20 个,或传入 --instCcyList)。
  • “聪明钱关注哪些币?” / “what are smart money trading right now?” → smartmoney signal-overview-by-filter(默认使用 --topInstruments=20)。参见 {baseDir}/references/signal-commands.md。
  • “信号趋势” / “signal trend over time” → smartmoney signal-trend-by-filter --instCcy <ccy> [--asOfTime <yyyyMMddHH>] [--limit 24](也可运行 signal-trend-by-trader --authorIds <ids> --instCcy <ccy>,按 authorIds 范围查询趋势)。
步骤 2 — 执行并呈现

所有命令均为只读 — 无需确认。始终传入 --json,并将结果呈现为 Markdown 表格。

对于多步骤工作流(推荐交易员后进一步查询、结合上下文进行信号分析),请阅读 {baseDir}/references/workflows.md。


全局说明

  • 安全: 切勿让用户在聊天中粘贴 API 密钥或机密信息。
  • 输出: 始终为列表 / 查询命令传入 --json,并将结果呈现为 Markdown 表格 — 切勿粘贴原始终端输出。
  • 网络错误: 如果命令因连接错误而失败,请提示用户检查 VPN:curl -I https://www.okx.com
  • 语言: 始终使用用户的语言作答。
  • 时间输入: signal-trend-by-{filter,trader} 可选用 --asOfTime <yyyyMMddHH> 作为锚点(10 位 UTC 小时);省略时使用当前 UTC 小时。--limit 控制从该锚点开始返回的时间桶数量。signal-overview-by-{filter,trader} 不接受时间输入 — 处理程序始终使用当前小时。

有关数字 / 时间格式和响应结构约定,请阅读 {baseDir}/references/templates.md。

评论

支持 Markdown