All skills
okx avatar

/okx-dex-market

@7ee532c
by OKX.comokx/onchainos-skills338 stars
75

Query read-only DEX token, market, signal, social, trenches, and WebSocket data. Use for token search, rankings, liquidity, holders, risk metadata, clusters, and trades; prices, K-lines/OHLC, indexes, and wallet PnL; smart-money/KOL/whale signals; news, sentiment, and token vibe; meme-launch, developer, bundle/sniper, and co-investor research; or DEX WebSocket clients. Triggers include hot tokens, holder concentration, smart money, top-trader leaderboards, pump.fun research, new token launches, on-chain token scanning, bundled or sniper activity, and WebSocket.

Use this Skill: https://skilld.dev/gh/okx/onchainos-skills/okx-dex-market

This session only. Nothing lands on disk.

referencessocial-cli-reference.md

≈4.7k tokens on demand. Your agent reads this file only when SKILL.md points to it.

Onchain OS DEX Social — CLI Command Reference

Detailed parameter tables, return field schemas, and usage examples for all 9 social commands.

All endpoints in this skill are REST (no WebSocket channels). Upstream API: https://web3.okx.com/api/v6/dex/market/social/....


1. onchainos social news-latest

Latest crypto news feed across upstream news platforms (e.g. blockbeats, odaily, theblock). Optional filters by coin symbol, time range, importance, source platform, language. sortBy is fixed to "latest" for this endpoint.

onchainos social news-latest [options]
Param Required Default Description
--token-symbols No - Comma-separated coin symbols, max 20 (e.g. BTC,ETH)
--since No - Relative window (grammar <int><s|m|h|d>, e.g. 30m, 24h, 7d); the CLI computes the range and returns data.resolvedWindow {begin,end}. Mutually exclusive with --begin/--end — do NOT pass both.
--begin No now − 72h Begin timestamp (Unix milliseconds); max lookback 180d. Absolute alternative to --since.
--end No now End timestamp (Unix milliseconds). Absolute alternative to --since.
--importance No - 1=high, 2=medium, 3=low
--platform No - Single platform identifier (e.g. blockbeats); see news-platforms
--limit No 10 Page size, range [1, 50]
--cursor No - Pagination cursor from previous response
--max-results No - Auto-paginate across pages until N items are collected (1–500). The CLI aggregates pages and returns data.items + data.nextCursor + data.fetchedCount. News uses page-level cursors, so a whole final page is kept and the result may slightly exceed N. Mutually exclusive intent with manual --limit/--cursor paging.
--detail-level No 1 1=summary only, 2=include full content
--language No en_US Locale (e.g. en_US, zh_CN, ja_JP)

Return fields:

Field Type Description
cursor String Next-page cursor; null on the last page
articles[] Array Article list
articles[].id String Article id (pass to news-detail)
articles[].title String Article title
articles[].summary String Short summary
articles[].content String Full body (only when --detail-level 2; otherwise empty)
articles[].sourceUrl String Article URL on the upstream platform
articles[].source String First platform identifier (e.g. blockbeats)
articles[].timestamp Long Publish time (Unix milliseconds)
articles[].tokenSymbols Array&lt;String&gt; Mentioned coin symbols
articles[].importance String high / medium / low
articles[].tokenSymbolSentiments[] Array Per-coin sentiment for this article
articles[].tokenSymbolSentiments[].tokenSymbol String Token symbol
articles[].tokenSymbolSentiments[].sentiment String bullish / bearish / neutral

Examples:

# Latest 10 articles, English summary
onchainos social news-latest

# Last 24h of BTC + ETH news, high importance, full body
onchainos social news-latest \
  --token-symbols BTC,ETH \
  --begin 1773649786000 --end 1773736186000 \
  --importance 1 \
  --detail-level 2

# Only blockbeats, Chinese
onchainos social news-latest --platform blockbeats --language zh_CN

2. onchainos social news-by-symbol

News filtered by one or more coin symbols. Supports sort (1=latest, 2=hot), sentiment / importance / platform / time-range filters, and pagination.

onchainos social news-by-symbol --token-symbols <symbols> [options]
Param Required Default Description
--token-symbols Yes - Comma-separated coin symbols, max 20
--sort-by No 1 1=latest, 2=hot
--sentiment No - 1=bullish, 2=bearish, 3=neutral
--importance No - 1=high, 2=medium, 3=low
--platform No - Single platform identifier
--limit No 10 Page size, range [1, 50]
--cursor No - Pagination cursor
--max-results No - Auto-paginate across pages until N items are collected (1–500). The CLI aggregates pages and returns data.items + data.nextCursor + data.fetchedCount. News uses page-level cursors, so a whole final page is kept and the result may slightly exceed N. Mutually exclusive intent with manual --limit/--cursor paging.
--detail-level No 1 1=summary, 2=full body
--since No - Relative window (grammar <int><s|m|h|d>, e.g. 30m, 24h, 7d); the CLI computes the range and returns data.resolvedWindow {begin,end}. Mutually exclusive with --begin/--end — do NOT pass both.
--begin No now − 72h Begin timestamp (Unix ms); max lookback 180d. Absolute alternative to --since.
--end No now End timestamp (Unix ms). Absolute alternative to --since.
--language No en_US Locale (e.g. en_US, zh_CN)

Return fields: same shape as news-latest.

Examples:

# Hot ETH news this week
onchainos social news-by-symbol --token-symbols ETH --sort-by 2

# Bullish BTC headlines, high importance
onchainos social news-by-symbol --token-symbols BTC --sentiment 1 --importance 1

3. onchainos social news-search

Full-text search across crypto news. Supports sentiment / importance / platform / coin / time-range filters, sort, language, and pagination.

onchainos social news-search --keyword <keyword> [options]
Param Required Default Description
--keyword Yes - Search keyword
--sort-by No 1 1=latest, 2=hot
--sentiment No - 1=bullish, 2=bearish, 3=neutral
--importance No - 1=high, 2=medium, 3=low
--platform No - Single platform identifier
--token-symbols No - Comma-separated coin symbols, max 20
--since No - Relative window (grammar <int><s|m|h|d>, e.g. 30m, 24h, 7d); the CLI computes the range and returns data.resolvedWindow {begin,end}. Mutually exclusive with --begin/--end — do NOT pass both.
--begin No now − 72h Begin timestamp (Unix ms); max lookback 180d. Absolute alternative to --since.
--end No now End timestamp (Unix ms). Absolute alternative to --since.
--detail-level No 1 1=summary, 2=full body
--limit No 10 Page size, range [1, 50]
--cursor No - Pagination cursor
--max-results No - Auto-paginate across pages until N items are collected (1–500). The CLI aggregates pages and returns data.items + data.nextCursor + data.fetchedCount. News uses page-level cursors, so a whole final page is kept and the result may slightly exceed N. Mutually exclusive intent with manual --limit/--cursor paging.
--language No en_US Locale (e.g. en_US, zh_CN)

Return fields: same shape as news-latest.

Examples:

# Search "pectra upgrade" in latest order
onchainos social news-search --keyword "pectra upgrade"

# Search "ETF" in hot order, BTC + ETH only, last 7 days
onchainos social news-search \
  --keyword ETF \
  --sort-by 2 \
  --token-symbols BTC,ETH \
  --begin 1773131386000 --end 1773736186000

4. onchainos social news-detail

Get the full body of a single article by id. The response always returns at most one article in articles. Use this when a list endpoint returned only a summary (detail-level=1) and you need the full body.

onchainos social news-detail --article-id <id> [options]
Param Required Default Description
--article-id Yes - Article id (from a previous list response)
--language No en_US Locale (e.g. en_US, zh_CN)

Return fields:

Field Type Description
articles[] Array Always 1 element on success
articles[].id String Article id
articles[].title String Article title
articles[].summary String Short summary
articles[].content String Full body
articles[].sourceUrl String Article URL
articles[].source String Platform identifier
articles[].timestamp Long Publish time (Unix ms)
articles[].tokenSymbols Array&lt;String&gt; Mentioned coin symbols
articles[].importance String high / medium / low
articles[].tokenSymbolSentiments[] Array Per-coin sentiment

Examples:

onchainos social news-detail --article-id abc123
onchainos social news-detail --article-id abc123 --language zh_CN

5. onchainos social news-platforms

Live list of news source platforms (domains) that can be passed to the news commands as --platform. No parameters.

onchainos social news-platforms

Return fields:

Field Type Description
platforms[] Array&lt;String&gt; Platform identifiers (e.g. blockbeats, odaily, theblock)

Example:

onchainos social news-platforms
# -> ["bwe", "odaily", "blockbeats", "blockbeats_flash", "jinsehotarticle", ...]

6. onchainos social sentiment-ranking

Top coins ranked by social activity (mention count) over a configurable window. Currently only --sort-by 1 (hot) is supported by upstream.

onchainos social sentiment-ranking [options]
Param Required Default Description
--time-frame No 1 Statistical period: 1=1h, 2=4h, 3=24h
--sort-by No 1 1=hot (only value currently supported)
--limit No 10 Page size, range [1, 50]

Return fields:

Field Type Description
period String Echo of resolved timeFrame (e.g. "1h", "4h", "24h")
ts String Server snapshot timestamp (Unix milliseconds)
details[] Array Ranked coins (length ≤ --limit)
details[].tokenSymbol String Coin symbol
details[].mentionCount String Total mentions in the window
details[].xMentionCount String X / Twitter mentions
details[].newsMentionCount String News mentions
details[].sentiment.bullishCnt String Bullish mention count
details[].sentiment.bearishCnt String Bearish mention count
details[].sentiment.neutralCnt String Neutral mention count
details[].sentiment.bullishRatio String Bullish share, 0.0–1.0
details[].sentiment.bearishRatio String Bearish share, 0.0–1.0
details[].sentiment.label String Aggregate label: bullish / bearish / neutral / mixed

Examples:

# Top 10 coins by 1h chatter (default window)
onchainos social sentiment-ranking

# Top 20 over the last 24h
onchainos social sentiment-ranking --time-frame 3 --limit 20

7. onchainos social sentiment-symbol

Sentiment metrics for one or more coins over a window, with optional time-bucketed trend array.

onchainos social sentiment-symbol --token-symbols <symbols> [options]
Param Required Default Description
--token-symbols Yes - Comma-separated coin symbols (max 20)
--time-frame No 1 Statistical period: 1=1h, 2=4h, 3=24h
--trend-points No - If > 0, include the trend array with this many equally-spaced buckets per coin. Max 50.

Return fields:

Field Type Description
period String Echo of resolved timeFrame (e.g. "1h", "4h", "24h")
ts String Server snapshot timestamp (Unix milliseconds)
details[] Array One entry per requested coin
details[].tokenSymbol String Coin symbol
details[].mentionCount String Total mentions in window
details[].xMentionCount String X / Twitter mentions
details[].newsMentionCount String News mentions
details[].sentiment Object Same shape as sentiment-ranking
details[].trend[] Array Present only when --trend-points > 0
details[].trend[].ts String Bucket timestamp (Unix milliseconds)
details[].trend[].mentionCount String Mentions in bucket
details[].trend[].bullishRatio String Bullish share in bucket
details[].trend[].bearishRatio String Bearish share in bucket

Examples:

# Current sentiment for BTC and ETH (1h window, default)
onchainos social sentiment-symbol --token-symbols BTC,ETH

# 24-bucket hourly trend for BTC over the last 24h
onchainos social sentiment-symbol --token-symbols BTC --time-frame 3 --trend-points 24

8. onchainos social vibe-timeline

Token "vibe" (hotness) summary plus a time-bucketed timeline. Includes overall scores with change rates, mention / engagement / impression counts, and sample KOLs per bucket. Keyed by chain + contract address.

onchainos social vibe-timeline --chain <chain> --token-address <address> [options]
Param Required Default Description
--chain Yes - Chain name (resolves to chainIndex, e.g. ethereum → 1, solana → 501)
--token-address Yes - Token contract address (EVM addresses lowercase)
--time-frame No 1 1=24h, 2=72h, 3=7d, 4=30d

Return fields:

Field Type Description
summary.score String Vibe hotness score, "0"–"100"
summary.scoreType String Always "dex_vibe_hotness"
summary.scoreRange String Always "0-100"
summary.scoreChangeRate String Percent change vs previous period
summary.mentionsCount String Total mentions in window
summary.mentionsCountChangeRate String Percent change vs previous period
summary.engagement String Total engagement count
summary.engagementChangeRate String Percent change vs previous period
summary.impressions String Total impressions
summary.impressionsChangeRate String Percent change vs previous period
summary.supportFirstMentioned Boolean Whether first-mention data is available
timeline[] Array Buckets ordered oldest → newest
timeline[].ts Long Bucket timestamp (Unix ms)
timeline[].score String Vibe score at bucket
timeline[].mentionCount Integer KOL count contributing to the bucket
timeline[].kols[] Array Sample KOLs for the bucket
timeline[].kols[].handle String X / Twitter handle
timeline[].kols[].nickname String Display name
timeline[].kols[].avatar String Avatar URL
timeline[].kols[].followers String Follower count

Examples:

# 24h vibe for an ETH token
onchainos social vibe-timeline \
  --chain ethereum \
  --token-address 0xa0b86a33e6441c4f7c4c1b8b0d57e3e3c0e0f7c4

# 7-day vibe for a Solana token
onchainos social vibe-timeline \
  --chain solana \
  --token-address So11111111111111111111111111111111111111112 \
  --time-frame 3

9. onchainos social vibe-top-kols

Top KOLs discussing a token over a window, sorted by engagement / mentions / impressions. Capped at upstream TOP50.

onchainos social vibe-top-kols --chain <chain> --token-address <address> [options]
Param Required Default Description
--chain Yes - Chain name (resolves to chainIndex)
--token-address Yes - Token contract address
--sort-by No 1 1=engagement, 2=mentions, 3=impressions
--time-frame No 1 1=24h, 2=72h, 3=7d, 4=30d
--limit No 20 Page size; capped at upstream TOP50

Return fields:

Field Type Description
kols[] Array Top KOLs (length ≤ --limit, hard cap 50)
kols[].handle String X / Twitter handle
kols[].nickname String Display name
kols[].avatar String Avatar URL
kols[].followers String Follower count
kols[].engagement String Engagement count in window
kols[].mentions String Mention count in window
kols[].impressions String Impression count in window
kols[].firstMention Object | null First-mention info; null if no first mention recorded
kols[].firstMention.time Long First-mention time (Unix ms)
kols[].firstMention.contentId String Tweet id
kols[].firstMention.tweetUrl String https://x.com/{handle}/status/{contentId}

Examples:

# Top 20 KOLs by engagement (24h)
onchainos social vibe-top-kols \
  --chain ethereum \
  --token-address 0xa0b86a33e6441c4f7c4c1b8b0d57e3e3c0e0f7c4

# Top 50 KOLs by mention count over 7 days
onchainos social vibe-top-kols \
  --chain solana \
  --token-address So11111111111111111111111111111111111111112 \
  --sort-by 2 --time-frame 3 --limit 50

Input / Output Examples

User says: "What's the latest BTC news?"

onchainos social news-by-symbol --token-symbols BTC --sort-by 1 --limit 10
# -> Latest 10 BTC articles with title, source, importance, sentiment

User says: "Show me only the high-importance ETH news from blockbeats this week"

onchainos social news-by-symbol \
  --token-symbols ETH \
  --importance 1 \
  --platform blockbeats \
  --begin 1773131386000 --end 1773736186000

User says: "Open article abc123"

onchainos social news-detail --article-id abc123
# -> Full article body

User says: "What are the top 10 hottest coins right now?"

onchainos social sentiment-ranking --time-frame 1 --limit 10
# -> Ranked list with mention counts and bullish/bearish ratios

User says: "How bullish is BTC over the last 24h with hourly trend?"

onchainos social sentiment-symbol --token-symbols BTC --time-frame 1 --trend-points 24
# -> BTC sentiment summary + 24-bucket trend array

User says: "Who's tweeting about this Solana token?" (with contract address resolved)

onchainos social vibe-top-kols \
  --chain solana \
  --token-address <address> \
  --sort-by 1 --time-frame 1 --limit 20
# -> TOP20 KOLs by 24h engagement, with first-mention links

User says: "Show me the vibe trend for this ETH token over a week"

onchainos social vibe-timeline \
  --chain ethereum \
  --token-address <address> \
  --time-frame 3
# -> Vibe summary with change rates + 7d timeline with sample KOLs per bucket

Source: SKILL.md on GitHub

2 warnings6d5 checks · Risk SAFE
  • Gen Agent Trust Hub6d

    The skill is designed for querying DEX data and includes comprehensive instructions for the AI agent to handle external data securely. It retrieves information from news platforms, social media, and on-chain sources, which introduces a surface for indirect prompt injection. However, the skill explicitly commands the agent to treat this data as untrusted and not as instructions, and the underlying CLI tool includes measures to reduce the exposed content. The skill also installs a helper tool from the vendor's official package repository. No high-risk patterns were found.

  • Socket6d

    No alerts

  • Snyk6d

    Risk: MEDIUM · 2 issues

  • Runlayer6mo

    1/2 files flagged

  • ZeroLeaks5mo

    1 finding · Score: 82/100

Signed by skilld at 7ee532c. This ties the file your Agent reads to that commit on GitHub. It does not review the instructions.

Last checked against GitHub 2 days ago.

Activeupdated last week
Other metadata
metadata
{
  "author": "okx",
  "version": "4.6.3",
  "homepage": "https://web3.okx.com"
}
  • okx
  • dex
  • market-data
  • token-prices
  • kline
  • ohlc
  • pnl
  • wallet-analytics
  • portfolio

README badge

README badge for okx/onchainos-skills

Fetches on-chain token prices, K-line candlestick charts, index prices, and wallet PnL analysis (realized/unrealized gains, trade history, win rates) via the OKX DEX Market API. Supports batch price queries, per-token profit snapshots, and portfolio overviews across multiple chains.

Generated from the current SKILL.md.

Does this skill handle prediction markets like Polymarket?
No. This skill is explicitly blocked from prediction-market queries (涨跌 / updown markets). Route those to okx-dapp-discovery instead. This skill handles on-chain market data only: token prices, K-line charts, index prices, and wallet PnL.
What chains does portfolio PnL support?
Not all chains support PnL analysis. Call `onchainos market portfolio-supported-chains` first to verify the chain is supported before running wallet PnL commands.
When should I use K-line versus price?
Use K-line only when the user explicitly mentions chart, candle, K线, OHLC, or bar data. A timeframe alone (e.g. '5 minutes') does not trigger K-line — default to price instead.
Does this skill require payment after the free quota?
Some endpoints require payment via the OKX Agent Payments Protocol after free quota is exhausted. Responses may include notification codes (NEW_USER_INTRO, OLD_USER_GRACE, etc.) that indicate tier status and payment requirements.
How do I query real-time prices or candlestick data?
Use the `onchainos ws` CLI for real-time monitoring via WebSocket channels (price, dex-token-candle1m). For custom bots, read the ws-protocol specification.

Generated from the current SKILL.md. These answers refresh after source changes.