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": [...]}testing
OKX-aggregated DeFi (no specific DApp named) — product discovery, deposit/withdraw/claim execution, AND positions viewing. **If the user names ANY third-party protocol/DApp (Aave, Lido, PancakeSwap, Uniswap, Curve, Compound, Morpho, Pendle, Kamino, Raydium, Hyperliquid, Polymarket, …), route to okx-dapp-discovery — NOT here, even for 'show my Aave positions'.** INVEST triggers: 'invest in DeFi', 'earn yield', 'find best APY', 'deposit/stake for yield', 'search DeFi products', 'redeem/withdraw position', 'claim DeFi rewards', 'borrow against asset', 'repay loan', 'add/remove CLMM liquidity', 'APY/TVL history', 'depth chart', yield farming, lending, staking, liquidity pools. PORTFOLIO triggers: 'check my DeFi positions', 'view DeFi holdings/portfolio', 'my staking/lending positions', 'DeFi balance', 'DeFi 持仓', '我的DeFi资产'. Do NOT use for: DEX swaps (okx-agentic-wallet), token prices (okx-dex-market), wallet token balances (okx-agentic-wallet).
testing
ERC-8004 Agent identity: 注册/更新/上架/下架/搜索agent, register/update/activate/deactivate/search — User/ASP/Evaluator(买家/卖家/仲裁者); 我的agent/ASP, 找做X的ASP/agent有什么服务/endpoint怎么填/查口碑/传头像. + Task Marketplace: 发布/创建任务/接单/协商/验收/deliver/dispute/仲裁/拒绝/stake/unstake/change provider/change budget/修改卖家/修改预算/我的任务/my tasks/what am I working on/我的订阅/订阅列表/订阅详情/my subscriptions/what am I subscribed to/AI服务订阅(view AI-service subscriptions, buyer & ASP)/关闭/取消任务/决策列表/decision list/指定服务商/browse marketplace. + task watch: 监听任务进展/历史消息/未读消息/未决策/outstanding decisions. + okx-a2a missing/uninitialized. Match by meaning. MUST ACTIVATE on inbound envelopes: (1) {agentId, message:{source:"system", event, jobId,...}} system event; (2) {msgType:"a2a-agent-chat", jobId, sender:{role},...} agent-to-agent task chat (sender.role = COUNTERPARTY, not you); (3) literal "Read the okx-ai skill" (or legacy "Read the okx-agent-task skill") in the envelope.
testing
Onchain OS onboarding & guide hub — the single entry for first-time, 'what is this / how do I use it', OKX.AI, and customer-support intents; classifies the intent and routes to the right sub-flow via its Intent Routing table. Covers: (1) Onchain OS onboarding + welcome banner — 'what is onchainos', 'what is onchain os', 'what can it do', 'what can onchainos do', 'what does onchainos do', 'how do I use this', 'how do I play', 'how to use onchainos', 'how to play onchainos', 'how does onchainos work', 'how do I start', 'getting started', 'tutorial', 'onboarding', 'first time', 'I just installed', 'now what', 'what do I do now', 'where do I start', 'who are you', 'what are you', 'introduce onchainos', 'tell me about onchainos', 'I'm new'; (2) OKX.AI intro & role-registration routing (the Agent economic system — roles User / ASP / Evaluator) — 'what is OKX.AI', 'OKX.AI 是什么', 'how to use OKX.AI', 'OKX.AI 快速开始', and any spelling / spacing / casing / typo variant (OKXAI, okx ai, okx-ai, lowercase okx.ai, 啥是okxai); (3) customer support / Help Center — 'contact support', 'talk to a human', 'customer service', 'file a complaint', 'give feedback', 'report a bug / system error', 'help center', 'FAQ', 'user guide', 'something is broken'. NOT for: direct on-chain actions (swap / wallet / balance / token) or Agent task lifecycle (publish / accept / deliver / dispute) — those have their own skills.
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.