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-troubleshooting.md

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

Capability: Social — Troubleshooting

Error handling, edge cases, and region restrictions for the Social capability. Load operational flow and parameter schemas separately through the top-level conditional-reference table.

Edge Cases

  • Empty articles array: no news matched the filters in the time window — suggest broadening (drop --platform, widen --begin/--end, drop --sentiment / --importance).
  • news-detail returns empty: the article id may have expired or been delisted by the upstream platform. Ask the user to verify the id from a recent list call.
  • sortBy on sentiment-ranking: only 1 (hot) is currently supported. If the user asks for "by mention count" or "by bullish ratio", explain the ranking is hot-only today and let them sort the result client-side.
  • Vibe symbol with no contract address: the user asks "vibe for BTC" but the vibe pipeline is keyed by chainIndex + tokenAddress. Resolve to a contract address (e.g. the Token capability's token search for native bridged BTC), or explain why the request can't be answered as-is.
  • Vibe on a cold / new token: summary.score may be 0 and timeline may be empty if there is no KOL chatter yet. Surface this rather than fabricating a trend.
  • firstMention is null: the KOL had no first-mention recorded for this token in the window — render as "—" rather than a broken link.
  • Same-symbol collisions (PEPE on Ethereum vs Solana): news / sentiment cannot disambiguate. If the user is asking about a specific contract, route to vibe-timeline / vibe-top-kols instead.
  • Language fallback: not all upstream platforms translate every article. If the user requested zh_CN and the response is still in English, note that and proceed.
  • Network error: retry once, then prompt the user to try again later.

Region Restrictions (IP Blocking)

When a command fails with error code 50125 or 80001, display:

DEX is not available in your region. Please switch to a supported region and try again.

Do not expose raw error codes or internal error messages to the user.

Error Codes

The social endpoints share the OKX standard error envelope. Common codes the agent should recognise (full list in the upstream social-news-error-code doc):

Code HTTP Meaning Suggested response
0 200 Success —
50011 429 Rate limit exceeded Back off 1–2s then retry once; on second failure, surface "the service is rate-limiting, please try again in a minute"
50014 400 Required parameter is empty Re-check the call — typically a blank tokenSymbols / articleId / chainIndex / tokenAddress
50026 500 Upstream system error Retry once; if still failing, surface "the service is temporarily unavailable"
50103–50107 401 Authentication headers are missing Ask the user to run onchainos wallet login and retry
50111–50113 401 Authentication was rejected Ask the user to run onchainos wallet login again
50125 / 80001 — Region blocked (see section above) Show the region message
51000 400 Parameter is invalid Re-check enum codes — likely an out-of-range importance / sentiment / sortBy / timeFrame

For x402 payment failures on payment-gated endpoints (invalid payment header, payer_blocked, risk_address, not_yet_valid, expired, nonce_used, insufficient_balance, onchain_error, payment processing, etc.), the canonical mapping lives in the upstream doc; the notifications[] handling in _shared/payment-notifications.md already covers the agent-side flow.

Never expose raw error codes or internal error messages to the user — always paraphrase per the rows above.

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.