
Okx Cex Smartmoney
Query OKX journal smart-money consensus signals (long/short ratio, flows, pool stats) from the CLI so your trading bot or research agent uses live positioning context.
Overview
OKX CEX Smartmoney is an agent skill most often used in Grow (also Validate prototype, Build integrations) that exposes OKX smart-money consensus signal CLI commands for positioning analytics.
Install
npx skills add https://github.com/okx/agent-skills --skill okx-cex-smartmoneyWhat is this skill?
- `okx smartmoney signal` aggregates pool trader positions into long/short ratio, weighted ratio, and avg entry
- Requires `--instId` or `--instCcy` plus `--ts` or `--dataVersion` for snapshot selection
- Supports filters: period, PnL tier, win ratio, max retreat, asset tier, `lmtNum` (1–500), and `authorIds`
- Outputs capital flow, trend deltas, and market context with optional `--json` for agent pipelines
- Smart-money signal pool limit `--lmtNum` range 1–500 (default 100)
- Signal API path prefix `/api/v5/journal/smartmoney/`
Adoption & trust: 2.7k installs on skills.sh; 134 GitHub stars; 2/3 security scanners passed (skills.sh audits).
What problem does it solve?
You want smart-money positioning context from OKX but keep misconfiguring required `instId`/`instCcy` and snapshot timestamps on journal endpoints.
Who is it for?
Solo builders shipping OKX-connected trading assistants, signal scrapers, or internal analytics CLIs with agent-driven command construction.
Skip if: Builders with no OKX account or API access, or anyone seeking investment advice without their own risk controls and compliance review.
When should I use this skill?
You need OKX smartmoney consensus signals with correct instId/instCcy and ts/dataVersion parameters for trading analytics or bot integration.
What do I get? / Deliverables
Your agent returns structured consensus signal data—ratios, flows, and pool filters—ready for dashboards, alerts, or downstream strategy code.
- Correctly parameterized smartmoney signal requests
- JSON or tabular positioning summaries for downstream agents
- Replayable snapshot commands using ts or dataVersion
Recommended Skills
Journey fit
Spans multiple journey phases - primary shelf plus alternate fits below.
Grow analytics is canonical because the skill consumes positioning and flow metrics to inform ongoing trading and product decisions, not one-time scaffolding. Analytics subphase matches signal aggregation endpoints under `/api/v5/journal/smartmoney/` for market intelligence.
Where it fits
Script a one-off `okx smartmoney signal --instCcy BTC --ts` call to see if positioning data supports your strategy hypothesis.
Embed consensus signal fetches with `--json` into a Discord alert bot.
Schedule daily snapshots with `--dataVersion` replay to compare flow trends across periods.
How it compares
OKX journal smart-money CLI integration skill, not a generic market-data MCP server for multi-exchange feeds.
Common Questions / FAQ
Who is okx-cex-smartmoney for?
Indie developers and agent builders on Claude Code, Cursor, or Codex who trade or research on OKX and need correct smartmoney signal parameter patterns.
When should I use okx-cex-smartmoney?
Use it while validating a signal-based idea, when integrating `/api/v5/journal/smartmoney/` in Build, and in Grow for recurring positioning analytics on BTC-USDT-SWAP or spot pairs.
Is okx-cex-smartmoney safe to install?
Review the Security Audits panel on this Prism page; the skill implies network and API access—store OKX keys in secrets managers and never commit credentials.
SKILL.md
READMESKILL.md - Okx Cex Smartmoney
# Signal Commands Reference > Signal endpoints are under `/api/v5/journal/smartmoney/`. ## smartmoney signal — Consensus Signal ```bash okx smartmoney signal [--instId <id>] [--instCcy <ccy>] [--ts <ms> | --dataVersion <ver>] [--sortType <type>] [--period <d>] [--pnl <tier>] [--winRatio <tier>] [--maxRetreat <tier>] [--asset <tier>] [--lmtNum <n>] [--authorIds <ids>] [--json] ``` Aggregates pool traders' positions for a single currency to produce long/short ratio, weighted ratio, avg entry price, capital flow, trend deltas, and market context. > **At least one of `--instId` (e.g. `BTC-USDT-SWAP`) or `--instCcy` (e.g. `BTC`, SPOT/SWAP only) is required.** `--instId` takes precedence if both are set. ### Parameters | Param | Required | Default | Description | |---|---|---|---| | `--instId` | Cond. | - | **Recommended.** Full instrument name (e.g. `BTC-USDT-SWAP`). **At least one of instId / instCcy required**; instId takes precedence. | | `--instCcy` | Cond. | - | Currency code (e.g. `BTC`). SPOT and SWAP only. `--instId` takes precedence if both are set. | | `--ts` | Cond. | - | **Recommended.** Snapshot timestamp (ms UTC) — use `$(date +%s)000` for latest. **At least one of ts / dataVersion required**; if both sent, `--ts` wins. | | `--dataVersion` | Cond. | - | Alternative. Snapshot version (yyyyMMddHHmm UTC) for replaying a prior snapshot. | | `--lmtNum` | No | `100` | Candidate trader pool size limit (range 1-500) | | `--authorIds` | No | - | Comma-separated user IDs (e.g. `1001,1002,1003`) — **restricts** the trader pool to these IDs only (precise filter, not additive) | Pool filter params (sortType, period, pnl, winRatio, maxRetreat, asset) also apply. ### Signal Filter Enum Values All signal endpoints share these enum-based pool filters: | Parameter | Enum values | Default | Semantics | |---|---|---|---| | `sortType` | `pnl`, `pnlRatio` | `pnl` | Trader pool ranking basis: `pnl` = cumulative PnL, `pnlRatio` = cumulative return ratio | | `period` | `3`, `7`, `30`, `90` | `90` | Win-rate calculation window in **days** — affects `winRatio`/`avgLongWinRatio`/`avgShortWinRatio` only, **not** the snapshot range | | `pnl` | `PNL_ANY`, `PNL_TOP50`, `PNL_TOP20`, `PNL_TOP5` | `PNL_ANY` | PnL percentile filter — keeps **top N%** of traders by PnL (e.g. `PNL_TOP20` = top 20%, not top 20 traders) | | `winRatio` | `WR_ANY`, `WR_GE_50`, `WR_GE_80` | `WR_ANY` | Win-rate threshold — keeps traders with win-rate **≥ N%** | | `maxRetreat` | `MR_ANY`, `MR_LE_20`, `MR_LE_50` | `MR_ANY` | Max drawdown threshold — keeps traders with drawdown **≤ N%** | | `asset` | `AUM_ANY`, `AUM_TOP50`, `AUM_TOP20`, `AUM_TOP5` | `AUM_ANY` | AUM percentile filter — keeps **top N%** of traders by asset size | All enums are case-insensitive. Invalid values silently fall back to default. ### Response Fields (27 fields, single object in `data[0]`) | Field | Type | Description | |---|---|---| | `instId` | String | Instrument name (e.g. `BTC-USDT-SWAP`). When request used `instCcy`, this echoes the **uppercase currency code only** (e.g. `BTC`) | | `instType` | String | Instrument type: SPOT / MARGIN / FUTURES / SWAP / OPTION. Empty string `""` when request used `instCcy` path | | `longRatio` | String | Long trader ratio, decimal in [0, 1] (e.g. `"0.65"` = 65%) | | `weightedLongRatio` | String | Long ratio weighted by **notional USD value** (each trader's vote weighted by position size) | | `avgLongWinRatio` | String | Average win ratio of long-side traders over the window set by `period` param | | `avgShortWinRatio` | String | Average win ratio of short-side traders over the window set by `period` param | | `longNotionalUsdt` | String | Total long notional value in USDT | | `shortNotionalUsdt` | String | Total short notional value in USDT | | `netNotionalUsdt` | String | Net notional = `longNotionalUsdt − shortNotionalUsdt`, **can be negative** | | `tradersWithPosition` | Integer | Traders in the final pool who currently hold a position on this instrume