market-structure-analyzer

A cryptocurrency market research agent that examines derivatives, options, blockchain activity, trading signals, and wider economic sentiment.

In plain words
What is it for?
Use it to research tokens such as BTC, ETH, SOL, and others, inspect indicators like gamma walls and MVRV, and view charts and composite signals in a local dashboard.
Why use it?
It gathers information from several market data sources so these areas can be reviewed together instead of separately.

Skill for Claude CodeCodex

Install

Getting it into your agent

One page per mod, every tool's command on it. A separate URL per tool would split the same page into five that compete with each other.

agentmods
npx agentmods add skills/okx/plugin-store/market-structure-analyzer
Any agent
npx skills add okx/plugin-store --skill market-structure-analyzer
Clone the repo
git clone --depth 1 https://github.com/okx/plugin-store

Made for: Claude Code, Codex.

Per session 247 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 4,859 The whole file, excluding the scripts and references it only reads on demand.
Security scan A 1 finding. Scan, not verified.
Origin original No closer match found in the catalogue.
Token cost

What it costs to keep this loaded

Counted locally with the o200k_base tokenizer, which is exact for GPT models; Claude uses its own tokenizer and its counts differ. Treat this as one consistent yardstick across the catalogue rather than a bill. Prices are per million input tokens.

ModelPer sessionOnce invoked
Fable 5 $0.00247 $0.04859
Opus 5 $0.00123 $0.02429
Sonnet 5 $0.00049 $0.00972
Haiku 4.5 $0.00025 $0.00486

Measured 2d ago against content hash 641ed84f1fcb, method: parsed. Prices are Anthropic first-party input rates as of 2026-08-30, from the pricing page.

Security

Grade A, and why

market-structure-analyzer scanned grade A with 1 finding against 26 rules in 11 categories — prompt injection, anti-refusal, data exfiltration, privilege escalation, supply chain, agent snooping, system-prompt leakage, SSRF and excessive agency — measured 2d ago.

The scan reads SKILL.md. This mod also ships 3 executable files (config.py, msa_server.py, scripts/fetch_market_data.py), listed below but not scanned — reading those needs a real analyzer, not pattern matching.

A static scan of the body, not an audit. Every finding is printed with the line that produced it so you can judge whether it matters here. A mod is markdown that instructs an agent; that is exactly why what it instructs is worth reading.

Runs shell commandslowCapability

Expected in a hook, worth knowing in a rule or an instructions file.

- **Subprocess calls**: `subprocess.run()` with `capture_output=True, text=True, timeout=15`
skills/market-structure-analyzer/SKILL.md · 332 lines

How it starts

The opening of the file, as written. The whole thing — 332 lines — stays where its author put it; the contents beside it link to each section on GitHub.

Market Structure Analyzer v3.0

You are a crypto market-structure research agent. Fetch, analyze, and present advanced derivatives, options, on-chain, smart money, and macro-sentiment indicators. Data flows through three layers:

  1. OKX CeFi CLI (okx market) — primary source for all CEX derivatives + price data
  2. OnchainOS CLI (onchainos) — on-chain smart money signals + DEX hot tokens
  3. Direct HTTP — options chain (gamma wall, skew) + external macro APIs

Quick Start

1. Determine Scope

  • Which tokens? Default to BTC if unspecified. Always include BTC as baseline.
  • Which categories? Default to all. User might only want derivatives or macro.
  • How deep? Quick scan (chat only) or full report (chat + live dashboard).

2. Launch Live Dashboard (recommended)

cd <skill_dir> && python3 msa_server.py

Opens live dashboard at http://localhost:8420 with:

  • Interactive K-line candlestick chart (TradingView Lightweight Charts v4)
  • Bollinger Bands overlay, RSI pane, MACD pane
  • Timeframe selector: 5m / 15m / 1H / 4H / 1D
  • Token selector: BTC / ETH / SOL / BNB / DOGE / AVAX / ARB / XRP / LINK / PEPE
  • 12-signal composite score with auto-refresh
  • Smart Money flow + DEX Hot Tokens panels (OnchainOS)
  • All derivatives + macro panels auto-updating

Background threads handle polling:

  • Structure indicators: every 60s
  • Candle + TA data: every 30s
  • Macro + on-chain: every 60s

3. CLI-Only Mode (backward compatible)

cd <skill_dir> && python3 scripts/fetch_market_data.py BTC ETH SOL 2>/dev/null

Outputs JSON to stdout. Works exactly as before, now powered by OKX CLI.

4. Analyze & Present

A) Chat Analysis — always. Use this structure:

## [TOKEN] Market Structure Report — [Date]

### Derivatives Positioning
[2-3 sentences: funding rate direction + trend, OI magnitude + delta, basis contango/backwardation]
Key signal: [single most important takeaway]

### Options Flow (Tier 1 only)
[2-3 sentences: gamma wall location + interpretation, 25-delta skew direction, ATM IV level, butterfly spread]
Key signal: [single most important takeaway]

### On-Chain (MVRV + Realized Price)
[2-3 sentences: MVRV zone, realized price vs market price, 30d MVRV trend]
Key signal: [single most important takeaway]

### Smart Money Flow (OnchainOS)
[2-3 sentences: net buy/sell across ETH/SOL/Base, whale vs smart money flow, top movers]
Key signal: [single most important takeaway — e.g. "whales aggressively accumulating" or "smart money rotating out"]

### DEX Hot Tokens
[1-2 sentences: what's trending on-chain, DEX volume concentration, any correlation with CEX structure]

### Market Microstructure
[2-3 sentences: taker buy/sell aggression, long/short ratio, liquidation pressure + bias]
Key signal: [single most important takeaway]

### Macro Context
[2-3 sentences: Fear/Greed level + trend, BTC dominance, stablecoin dry powder, market cap change]
Key signal: [single most important takeaway]

### Composite Score
[Score from -100 to +100, label (BULLISH/LEAN BULLISH/NEUTRAL/LEAN BEARISH/BEARISH), breakdown of all 12 contributing signals with individual weights]

### Synthesis
[3-5 sentences combining ALL signals — derivatives, options, on-chain, smart money, DEX activity, and macro. Be opinionated but transparent. If signals conflict, say so.]

### Data Availability
[X/Y indicators available. List any unavailable sources.]

Read the full file on GitHub · 332 lines

Changes

What this file has done since we first saw it

Hashed on every crawl. A supply-chain change to an agent config is a question of when, not whether, so the history is kept rather than the latest state alone.

  1. 2d ago First seen · 332 lines · 247 tokens per session scan A 641ed84f1fcb

Subscribe to this mod's changes

market-structure-analyzer is a skill published in the GitHub repository okx/plugin-store (11 stars, last pushed 1mo ago), licensed MIT. It adds 247 tokens to every session and 4,859 once invoked, about $0.0012 per session on Opus 5. A static security scan graded it A with 1 finding (runs shell commands). No closer match exists in the catalogue, so it is treated as the original; first seen 2026-08-30.