6DuckLearn Skills

market intel

Real-time aggregation of trending narratives on Twitter/X, automatically capturing social momentum shifts—new topics emerging, discussion volume surging, and pushing signals at the first moment. Three core models: Daily market brief (hot topics × OKX trading pairs × real-time prices combined), anomaly alerts (comparing historical snapshots to accurately identify surges/new narratives), and in-depth keyword research (sentiment distribution + high-frequency themes + RSI/MACD technical validation)

finance Tags: okx, trading, community, okx-marketplace, finance, trend

6DuckLearn provenance: Community skill by BryanX, mirrored from the OKX Skills Marketplace (https://www.okx.com/en-sg/agent-tradekit/skills/market-intel). It is not curated, verified, or endorsed by 6DuckLearn or represented as an official OKX publication.

Financial safety boundary: Never request secrets in chat. Before any external API call or action that places, cancels, or amends an order; changes leverage; transfers funds; creates or stops a bot; subscribes to or redeems an earn product; or signs/broadcasts a transaction, show the exact live/demo profile, instrument, side, size, price constraints, fees, and worst-case loss, then obtain explicit user approval. Default to read-only or demo mode when uncertain. Treat all analysis as research, not investment advice.

Market Intel — Crypto Social Intelligence for OKX

Social intelligence -> OKX pair mapping -> price verification -> trade execution. Follow the user's input language.

Data Source: Chainbase Tops API (free, no key)

CLI: prefer chainbase (global install), fallback npx --registry https://registry.npmjs.org chainbase-cli

First run: check which chainbase. If missing, prompt user: npm install -g chainbase-cli --registry https://registry.npmjs.org

Error: non-zero exit or non-JSON -> "Data source temporarily unavailable." Rate limit: max 1 call per 5 min per endpoint.

Data Extraction (always use these, never raw API)

CMD_TRENDING -- compact trending (100KB -> 5KB):

chainbase tops trending --json 2>/dev/null | python3 -c "
import json,sys;data=json.load(sys.stdin)
for t in data.get('items',[])[:20]:
    print(json.dumps({'id':t.get('id',''),'kw':t.get('keyword',''),'summary':t.get('summary','')[:150],'authors':len(t.get('authors',[]))},ensure_ascii=False))"

CMD_SEARCH(keyword) -- top 5 topics (450KB -> 2KB):

chainbase tops search "KEYWORD_HERE" --json 2>/dev/null | python3 -c "
import json,sys;data=json.load(sys.stdin)
for t in data.get('items',[])[:5]:
    print(json.dumps({'id':t.get('id',''),'kw':t.get('keyword',''),'summary':t.get('summary','')[:150],'authors':len(t.get('authors',[]))},ensure_ascii=False))"

CMD_MENTIONS(keyword) -- 15 samples + themes (140KB -> 3KB):

chainbase tops mentions "KEYWORD_HERE" --json 2>/dev/null | python3 -c "
import json,sys;data=json.load(sys.stdin);items=data.get('items',[])
texts=[m.get('text','') if isinstance(m,dict) else str(m) for m in items]
from collections import Counter;words=Counter()
for t in texts:
    for w in t.lower().split():
        if len(w)>3: words[w]+=1
print(json.dumps({'total':len(texts),'samples':[t[:150] for t in texts[:15]],'themes':[w for w,c in words.most_common(10) if c>2]},ensure_ascii=False))"

Keyword sanitization: Before substituting any user keyword into the above commands, strip all shell metacharacters: "; | & $ ( ) \ { } < > ! #`. Only allow alphanumeric characters, spaces, hyphens, and underscores. If a keyword contains disallowed characters, reject it with a clear error message.

If chainbase not found, replace with npx --registry https://registry.npmjs.org chainbase-cli in above commands.


OKX Price Verification

After mapping social signals to OKX pairs, always verify with live market data. Use CLI first, MCP as fallback:

CLI (primary):

okx market ticker --instId BTC-USDT
okx market orderbook --instId BTC-USDT
okx market indicator --instId BTC-USDT --ind RSI

MCP fallback (if CLI unavailable):

  • market_get_ticker(instId="BTC-USDT") — last price, 24h high/low, volume, change
  • market_get_orderbook(instId="BTC-USDT") — liquidity depth for HIGH impact signals
  • market_get_indicator(instId="BTC-USDT", indicator="rsi", bar="1Dutc") — RSI/MACD context

If OKX Trade Kit is not available at all, skip price verification and note: "Price data unavailable — install OKX Trade Kit for live market context."


Module 1: Market Briefing

Triggers: market briefing / daily briefing / how is the market / what is happening in crypto / 市场简报 / 晨报 / 今天市场怎么样

  1. Run CMD_TRENDING
  2. For each topic: classify sentiment (BULLISH / BEARISH / NEUTRAL), impact (>30 authors = HIGH, 10-30 = MED, <10 = LOW)
  3. Read references/okx-pairs.md -> map keywords to OKX pairs
  4. Price verification: For each mapped OKX pair, fetch current price and 24h change via CLI or MCP (see OKX Price Verification above)
  5. Group by OKX pair, show bull/bear signals together per pair
  6. Add per-pair synthesis + actionable section

Output:

## Market Intel Briefing -- {date/time}

### BTC-USDT (${price} | 24h: {change}%)
| Narrative | Sentiment | Impact |
|-----------|-----------|--------|
| **{keyword}** ({N}) -- {summary} | BULLISH | HIGH |
| **{keyword}** ({N}) -- {summary} | BEARISH | MED |
> Synthesis: {multi-signal synthesis for this pair}

### Other (no direct OKX pair mapping)
| ... |

### Actionable
- **{pair}**: {recommendation}

### Quick Trade
To act on these signals via OKX Trade Kit:
- Check orderbook depth: `okx market orderbook --instId {pair}`
- View recent candles: `okx market candles --instId {pair} --bar 1H --limit 24`
- Place order when ready

Module 2: Signal Alert

Triggers: any signals / watch market / what changed / new narratives / 有什么异动 / 监控市场

  1. Run CMD_TRENDING, also save raw to /tmp/mi-raw.json: chainbase tops trending --json 2>/dev/null > /tmp/mi-raw.json Then run the compact extraction on /tmp/mi-raw.json
  2. Load previous snapshot /tmp/market-intel-snapshot.json (if exists)
  3. Diff:
    • topic ID only in current -> NEW: New narrative
    • topic ID in both, authors >2x previous -> SURGE (+X%)
    • First run (no snapshot) -> all flagged as new
  4. Classify sentiment, map OKX pairs via references/okx-pairs.md
  5. Price verification: For each signal's OKX pair, fetch current price via CLI or MCP
  6. Output signals
  7. Save compact snapshot (AFTER comparison):
    python3 -c "
    import json;data=json.load(open('/tmp/mi-raw.json'))
    json.dump([{'id':t['id'],'kw':t['keyword'],'n':len(t.get('authors',[]))} for t in data.get('items',[])],open('/tmp/market-intel-snapshot.json','w'))"
    

Output per signal:

SIGNAL: {New narrative | Surge (+120%)}
"{keyword}" -- {N} authors | {Category} | {Sentiment}
-> OKX: {pairs} @ ${price} (24h: {change}%)

No signals: "No new signals since last check."

For periodic monitoring, the user can re-run this module on a schedule (e.g., every 10 minutes via cron or a looping terminal command).


Module 3: Research Query

Triggers: research {topic} / tell me about {token} / social sentiment for {keyword} / {token} 社交面怎么样 / 搜索 {keyword}

  1. Extract keyword from user query
  2. Sanitize keyword per the sanitization rule above
  3. Run CMD_SEARCH(keyword) -> top 5 related topics
  4. Run CMD_MENTIONS(keyword) -> total count + 15 samples + themes
  5. Classify sentiment per topic + aggregate mention sentiment
  6. Map to OKX pairs via references/okx-pairs.md
  7. Price verification: Fetch price via CLI or MCP; optionally fetch RSI/MACD for HIGH impact signals

Output:

RESEARCH: {keyword}

-- Related Topics ({count}) --
1. **{topic}** -- {N} authors, {sentiment}
   {summary}

-- Recent Mentions ({total} posts) --
- Sentiment: ~{X}% Bullish / ~{Y}% Neutral / ~{Z}% Bearish
- Themes: {theme1}, {theme2}, {theme3}

-- OKX Market Context --
| Pair | Price | 24h Change | RSI(14) |
|------|-------|------------|---------|
| {pair} | ${price} | {change}% | {rsi} |

-> Verify pair availability on OKX before trading

OKX Pair Mapping

Read references/okx-pairs.md for the full keyword → OKX pair mapping table.

Fallback (if file unavailable): btc -> BTC-USDT, eth -> ETH-USDT, sol -> SOL-USDT, etf -> BTC-USDT + ETH-USDT

Rules: short words (sui, ai, sei) = exact match only. Unknown tokens = infer pair + flag "(unverified)".


Sentiment Classification

Classify each summary as BULLISH / BEARISH / NEUTRAL. Use language understanding across all languages. Reference keywords (guidance only):

  • Bullish: launch, listing, approved, inflow, surge, record, institutional, partnership, upgrade
  • Bearish: crash, hack, exploit, sell-off, ban, lawsuit, investigation, liquidation
  • Neutral: discussion, analysis, comparison, overview, update

OKX Trade Kit Integration

This skill outputs pair suggestions with live prices. No auto-execution. Workflow:

  1. Social intelligence identifies narratives and maps to OKX pairs
  2. OKX Trade Kit CLI/MCP confirms current price and momentum
  3. User reviews signals and decides to trade
  4. User confirms in natural language -> Claude invokes OKX Trade Kit to execute

Related skills

  • alpha vantage — Cross-asset analysis is its unique advantage—it can simultaneously pull macro data such as the S&P 500, gold, the dollar index, Federal Reserve interest rates, CPI, GDP, etc., allowing one to see at a glance whether "BTC is moving with risk assets today or pricing independently." In conjunction with the OKX Trade Kit, Alpha Vantage is responsible for in-depth historical and macroeconomic context, while OKX provides real-time prices, funding rates, and order book data, with both complementing each other to form a complete analysis chain.
  • apex crypto intelligence — AI-driven multi-exchange cryptocurrency market analysis, arbitrage detection, and hedge fund-level trading reports using real-time data from major exchanges.
  • btc altcoin market pulse — Fetches live OKX market data across Bitcoin and major altcoins, analyzes price momentum, funding rates, open interest, and BTC dominance signals to produce a structured BTC + Altcoin Market Pulse report.
  • cmc okx — CoinMarketCap × OKX dual engine, a one-stop solution for all your cryptocurrency market data needs. CMC provides market cap, supply, dominance, holding distribution, project background, and macro event calendar; the OKX Trade Kit complements with real-time prices, funding rates, open interest, 70+ technical indicators, and order book depth, with both automatically linked and mutually supportive. It supports natural language triggers, whether you ask "What’s the price of Bitcoin?", "How to read the ETH daily chart?" or "Which coin is surging?", Skill automatically recognizes intent, selects tool combinations, outputs structured tables, and includes a "Quick Take" one-sentence summary.
  • congress trades — Track U.S. Congress members' stock trades in real-time, making "smart political money" impossible to hide. Sync member trade disclosure data to a local SQLite database via the Quiver Quant API, allowing flexible queries by politician name, stock code, party, date range, and trade type. Large trades exceeding the configurable amount threshold (default $15,001) automatically trigger alerts, generating structured Alert files for real-time monitoring.
  • crypto research — A systematic cryptocurrency due diligence report, covering everything from price to holding distribution, from technical aspects to a red flag checklist, all in one go. Integrating the OKX Trade Kit (real-time prices, 70+ technical indicators, funding rates, open interest, order book depth) with CoinMarketCap (market cap, token economics, whale distribution, news sentiment), a seven-step research process is executed in parallel, covering market snapshots, technical analysis, derivatives data, project fundamentals, and recent news. The analysis framework specifically distinguishes between legitimate projects and Meme coins, evaluating key signals such as whale concentration, holder trends, 200-day moving average positions, and funding rate extremes, ultimately outputting a green flag/red flag checklist and low/medium/high/very high risk ratings.