
okx-dex-ws
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).
- Installs
- 5.8K
- Last 24h
- —
- Trending rank
- —
- Security
- Warn
Install
Works with every agent the skills CLI supports.
npx skills add https://github.com/okx/onchainos-skills --skill okx-dex-ws- 01
Install
Run the command in your project. The CLI asks which agents to install for.
- 02
Describe the task
Ask your agent for something this skill covers. It loads okx-dex-ws automatically when relevant.
- 03
Review the result
The agent follows the SKILL.md steps, scripts and references bundled with the skill.
Security audits
Independent scans of the skill's instructions and bundled files.
SKILL.md
The instructions your agent reads when the skill is triggered.
Onchain OS DEX WebSocket — Unified Skill
Two ways to consume real-time DEX data:
- CLI (
onchainos ws) — start a background session, poll events incrementally. Best for monitoring and agent-driven workflows. - Script — write a custom WebSocket client in Python/Node/Rust. Best for bots and custom logic.
Pre-flight Checks
Read
../okx-agentic-wallet/_shared/preflight.md. If that file does not exist, read_shared/preflight.mdinstead.
Prerequisites
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.
Related Workflows
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?"
Approach 1: CLI (onchainos ws)
Discover Channels
onchainos ws channels # list all 9 supported channels
onchainos ws channel-info --channel <name> # detailed info + example for a channel
Start / Poll / Stop
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 Quick Reference
| 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 |
Parameter Formats
--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 (default30m;1h,2h,300s,0to disable)
Examples
# 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
Poll Filters (tracker channels only)
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)
Approach 2: Custom Script
When the user wants to build a custom WebSocket client with their own logic, read the corresponding protocol reference file:
Market Data (price & candlestick streams)
Read: ../okx-dex-market/references/ws-protocol.md
Channels: price, dex-token-candle{period}
Token Data (detailed token streams)
Read: ../okx-dex-token/references/ws-protocol.md
Channels: price-info, trades
Signal & Wallet Tracking
Read: ../okx-dex-signal/references/ws-protocol.md
Channels: dex-market-new-signal-openapi, kol_smartmoney-tracker-activity, address-tracker-activity
Meme/Trenches
Read: ../okx-dex-trenches/references/ws-protocol.md
Channels: dex-market-memepump-new-token-openapi, dex-market-memepump-update-metrics-openapi
Common Protocol (all channels share)
- Endpoint:
wss://wsdex.okx.com/ws/v6/dex - Auth: HMAC-SHA256 login required before subscribing
- Heartbeat: send
"ping"every 25s, expect"pong" - Subscribe:
{"op": "subscribe", "args": [...]} - Unsubscribe:
{"op": "unsubscribe", "args": [...]}
FAQ
What does the okx-dex-ws skill do?
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).
How do I install okx-dex-ws?
Run npx skills add https://github.com/okx/onchainos-skills --skill okx-dex-ws in your project. The skills CLI detects the agents you use and copies the skill into the right folder. For Claude Code you can also place the skill folder at ~/.claude/skills/okx-dex-ws/ (personal) or .claude/skills/okx-dex-ws/ (project).
Which AI agents can use okx-dex-ws?
Any agent that supports the open Agent Skills format (a folder with a SKILL.md file), including Claude Code, Codex, Cursor, GitHub Copilot, Gemini CLI, Windsurf, Cline, OpenCode and more.
Is okx-dex-ws safe to install?
Security partners have reviewed it: Gen Agent Trust Hub passed; Socket passed; Snyk flagged items to review; ZeroLeaks passed. As with any skill, read the SKILL.md and bundled scripts before installing.
Who maintains okx-dex-ws?
It is published by okx in okx/onchainos-skills. It has 5,846 recorded installs.
More from okx/onchainos-skills
okx-dex-market
okx/onchainos-skills
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.
okx-agentic-wallet
okx/onchainos-skills
Operate OKX Onchain OS wallets and execute or inspect on-chain transactions. Use for wallet login/status/accounts/addresses/balances/holdings; receive/send/transfer; swaps, bridges, limit orders, contract calls, gas estimation, simulation, broadcast, and tracking; Bitcoin UTXO/BRC-20/inscriptions; signing, approvals, wallet policy/export, public-address portfolios, security checks, and audit logs.
okx-dapp-discovery
okx/onchainos-skills
Discover supported third-party DApps and route protocol-specific requests to OKX plugins without signing or broadcasting. Use for DApp discovery or comparison; a named protocol's operations or analytics; Polymarket/UpDown prediction markets, bets, and positions; protocol-native actions involving HYPE/HLP, stETH/wstETH, CAKE, CRV, COMP, RAY, GHO, or PT/YT; pump.fun writes; and unsupported-DApp alternatives. Supported DApp names include Aave, Hyperliquid, PancakeSwap, Morpho, Raydium, Curve, Compound, Pendle, Lido, ether.fi, GMX, Kamino, Orca, Meteora, Clanker, and pump.fun. Requests to find, buy, or subscribe to a signal or signal service are OKX.AI marketplace workflows, even when they name Polymarket or another DApp.
okx-agent-payments-protocol
okx/onchainos-skills
Handle agent payments and paid endpoints via x402, MPP, payment links, a2a-pay, and HTTP-payment recurring or metered billing. Use for HTTP 402/payment-required; paid Agent or A2MCP endpoints; x402/Permit2; MPP channels, vouchers, or sessions; HTTP-payment subscriptions; or paymentId/link operations or status. Trigger phrases: x402/x402Version, X-PAYMENT, PAYMENT-REQUIRED, PAYMENT-SIGNATURE, WWW-Authenticate: Payment, x402 exact/exact+Permit2/upto/aggrdeferred, MPP charge/session, channelId/channelid, payment-channel voucher/topup/settle/refund, metered billing, paymentId, a2a, payment link, A2MCP, paid endpoint, and HTTP 402 period/permit2subscription.
okx-growth-competition
okx/onchainos-skills
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.
okx-guide
okx/onchainos-skills
Guide users through installing or updating Onchain OS, getting started, OKX.AI introduction and role-registration routing, and customer support. Use when someone wants to install or update the Onchain OS CLI or skills, is new or asks what Onchain OS or OKX.AI is, wants a quick start, needs to register a User, ASP, or Evaluator role, or asks for Help Center, support, feedback, or FAQs.
Popular docs & writing skills
grill-with-docs
mattpocock/skills
A relentless interview to sharpen a plan or design, which also creates docs (ADR's and glossary) as we go.
lark-markdown
open.feishu.cn
飞书 Markdown:查看、创建、上传、编辑和比较飞书中的原生 Markdown 文件。当用户要操作飞书 Markdown 文件,或比较其远端版本及本地草稿时使用。纯本地 Markdown 文件操作不触发本 skill。不负责将 Markdown 导入为飞书在线文档,也不负责文件搜索、权限、评论、移动、删除等云空间管理操作。
writing-beats
mattpocock/skills
Writing, exploit; assemble raw material into a journey of beats, grounding each term before a beat leans on it.
writing-shape
mattpocock/skills
Writing, exploit: shape raw material into an article, paragraph by paragraph.
writing-fragments
mattpocock/skills
Writing, explore: mine raw fragments, no structure yet.
writing-for-agents
mattpocock/skills
Writing documents for agents. Use when creating or editing skills, or modifying AGENTS.md or CLAUDE.md.