skills/okx-dex-ws/SKILL.md
Use this skill when the user mentions 'onchainos ws', 'ws start', 'ws poll', 'ws stop', 'ws channels', 'ws session', 'ws channel-info', 'idle-timeout', 'idle timeout', 'WebSocket channels', 'WS频道', or asks about managing WebSocket sessions/会话管理. Also use when writing a custom WebSocket script/脚本/bot for real-time on-chain data. Covers: onchainos ws CLI commands (start/poll/stop/list/channels/channel-info), session lifecycle, idle-timeout configuration, and all 9 DEX WebSocket channels (price, candle, trades, price-info, signals, tracker, meme scanning).
npx skillsauth add okx/onchainos-skills okx-dex-wsInstall this skill globally with one command. Works with Claude Code, Cursor, and Windsurf.
3 of 9 scanners reported clean
Some scanners were skipped, did not run, or reported a non-clean status. Review each row below.
Two ways to consume real-time DEX data:
onchainos ws) — start a background session, poll events incrementally. Best for monitoring and agent-driven workflows.Read
../okx-agentic-wallet/_shared/preflight.md. If that file does not exist, read_shared/preflight.mdinstead.
This skill references ws-protocol.md files from okx-dex-market, okx-dex-token, okx-dex-signal, and okx-dex-trenches. If a referenced file is not found, the corresponding skill may not be installed — inform the user and suggest installing the missing skill from the onchainos-skills plugin.
When one of the following commands is used, show the related workflow hint after displaying results:
| Command | Workflow | File |
|---------|----------|------|
| ws start, ws poll, ws stop | Wallet Monitor (WebSocket) | ~/.onchainos/workflows/wallet-monitor-ws.md |
Hint format: "You can also try out our Wallet Monitor (WebSocket) workflow for more comprehensive results. Would you like to try it?"
onchainos ws)onchainos ws channels # list all 9 supported channels
onchainos ws channel-info --channel <name> # detailed info + example for a channel
onchainos ws start --channel <channel> [params] # start background session
onchainos ws poll --id <ID> [--channel <ch>] # pull new events
onchainos ws list # list sessions
onchainos ws stop [--id <ID>] # stop session(s)
| Channel | Group | Pattern | Required Params |
|---------|-------|---------|-----------------|
| kol_smartmoney-tracker-activity | signal | global | (none) |
| address-tracker-activity | signal | per-wallet | --wallet-addresses |
| dex-market-new-signal-openapi | signal | per-chain | --chain-index |
| price | market | per-token | --token-pair |
| dex-token-candle{period} | market | per-token | --token-pair |
| price-info | token | per-token | --token-pair |
| trades | token | per-token | --token-pair |
| dex-market-memepump-new-token-openapi | trenches | per-chain | --chain-index |
| dex-market-memepump-update-metrics-openapi | trenches | per-chain | --chain-index |
--token-pair: chainIndex:tokenContractAddress (e.g. 1:0xdac17f958d2ee523a2206206994597c13d831ec7)--chain-index: comma-separated chain IDs (e.g. 1,501,56)--wallet-addresses: comma-separated addresses, max 200--idle-timeout: auto-stop if no poll within this duration (default 30m; 1h, 2h, 300s, 0 to disable)# Smart money trade feed
onchainos ws start --channel kol_smartmoney-tracker-activity
# Track specific wallets
onchainos ws start --channel address-tracker-activity --wallet-addresses 0xAAA,0xBBB
# Token price monitoring
onchainos ws start --channel price --token-pair 1:0xdac17f958d2ee523a2206206994597c13d831ec7
# Buy signal alerts on Ethereum + Solana
onchainos ws start --channel dex-market-new-signal-openapi --chain-index 1,501
# New meme token launches on Solana
onchainos ws start --channel dex-market-memepump-new-token-openapi --chain-index 501
# K-line 1-minute candles
onchainos ws start --channel dex-token-candle1m --token-pair 1:0xdac17f958d2ee523a2206206994597c13d831ec7
When polling kol_smartmoney-tracker-activity or address-tracker-activity, these filters are available:
--min-quote-amount, --min-market-cap, --min-pnl--trader (wallet address prefix match)--tag (smart_money or kol)--trade-type (buy or sell)--since (ms timestamp)When the user wants to build a custom WebSocket client with their own logic, read the corresponding protocol reference file:
Read: ../okx-dex-market/references/ws-protocol.md
Channels: price, dex-token-candle{period}
Read: ../okx-dex-token/references/ws-protocol.md
Channels: price-info, trades
Read: ../okx-dex-signal/references/ws-protocol.md
Channels: dex-market-new-signal-openapi, kol_smartmoney-tracker-activity, address-tracker-activity
Read: ../okx-dex-trenches/references/ws-protocol.md
Channels: dex-market-memepump-new-token-openapi, dex-market-memepump-update-metrics-openapi
wss://wsdex.okx.com/ws/v6/dex"ping" every 25s, expect "pong"{"op": "subscribe", "args": [...]}{"op": "unsubscribe", "args": [...]}tools
OKX.AI Trading Hackathon (交易黑客松 / OKX.AI 交易黑客松 / 报名黑客松 / 黑客马拉松) registration. Use when the user wants to register for / sign up for / enter / join / 报名 / 参加 / 参赛 the OKX.AI trading hackathon — e.g. 'Register me for the OKX.AI Trading Hackathon', '我要参加黑客松', '帮我报名 OKX.AI 的交易黑客松' — or asks about its entry requirements / eligibility / 报名条件 / 参赛资格 / how to enter. The object is always the hackathon itself: it enters a Trading ASP the user already has and never creates one. Each activity carries its own flow, gates, and CLI reference under this skill's references/, picked by the Intent Routing table.
testing
List OKX Agentic Wallet exclusive trading competitions, register users for contests, track participation and leaderboard rankings, and claim won rewards. Use when users want to list available trading competitions or trading cups, view competition rules / prize pool / total prizes, register or sign up or enroll or join a contest, check the leaderboard (who is winning) or their own rank (am I in the prize zone, what is my place), ask did I win or query participation / claim status, claim won rewards or prizes from completed competitions, see which wallet account they registered with, or submit Telegram / WeChat / Email / Twitter contact for prize delivery to top-tier winners.
tools
HARD BLOCK — never use for prediction-market/Polymarket UpDown queries; route to okx-dapp-discovery when a named DApp (Polymarket/Aave/Hyperliquid/PancakeSwap/Morpho) appears with a timeframe, or 涨跌/updown for BTC/ETH/SOL/XRP/BNB/DOGE/HYPE. Otherwise, read-only on-chain DEX data, 6 groups: TOKEN (search, hot/热门, liquidity, holders/whale, risk metadata, cluster/持仓集中度, trade history, top traders); MARKET (price/价格, K线/OHLC, index price, wallet PnL/胜率, trade history); SIGNAL (smart money/KOL/whale tracking, buy signals/信号, leaderboard/牛人榜); SOCIAL (news/新闻, sentiment/情绪, token vibe/热度, KOL leaderboard); TRENCHES (pump.fun/meme launches/新盘/扫链, dev reputation, bundle/sniper detection/捆绑狙击者, co-investor — read-only; buy/snipe → okx-dapp-discovery); WS (onchainos ws CLI, or custom WebSocket script/脚本). Also owns Market API payment/x402, quota/额度, and MARKET_API_*_OVER_QUOTA/confirming:true for all 6 groups.
testing
监听任务进展 / 帮我盯着任务 / 任务有动静告诉我 / 历史消息 / 未读消息 / 未决策 / 待决策 / 继续监听 / task watch / user watch / monitor task progress / catch me up on tasks / outstanding decisions — OKX A2A user-session task-notification monitor: live long-poll via `okx-a2a user watch` (also drains backlog of past/missed/unread events on entry) plus un-replied decision_request lister via `okx-a2a user outdated-list`. Not for wallet / gas / task-list / status queries.