Community코딩 & 개발github.com

okx/okx-dex-ws

이 스킬은 사용자가 'onchainos ws', 'ws start', 'ws poll', 'ws stop', 'ws channels', 'ws session', 'ws channel-info', 'idle-timeout', 'WebSocket 채널' 등을 언급하거나 실시간 온체인 데이터를 위한 WebSocket 세션/스크립트 관리를 요청할 때 사용합니다. onchainos ws CLI 명령어(시작/폴링/중지/목록/채널/채널 정보), 세션 수명 주기, 유휴 시간 제한 구성, 그리고 9개의 DEX WebSocket 채널(가격, 캔들, 거래, 가격 정보, 신호, 트래커, 밈 스캐닝)을 다룹니다.

okx-dex-ws란 무엇인가요?

이 스킬은 OKX DEX WebSocket 서비스를 관리하고 실시간 온체인 데이터를 구독하는 데 사용됩니다. 사용자가 'onchainos ws' CLI 명령어를 사용해 WebSocket 세션을 시작, 폴링, 중지, 목록 조회, 채널 정보 확인하거나 유휴 시간 제한을 설정할 수 있도록 지원합니다. 또한 가격, 캔들, 거래, 가격 정보, 신호, 트래커, 밈 스캐닝 등 9개의 DEX WebSocket 채널을 통해 실시간 데이터를 스트리밍할 수 있습니다. 개발자가 Python 기반의 사용자 정의 스크립트나 봇을 작성하여 자동화된 실시간 체인 데이터 수집 시스템을 구축할 때 특히 유용하며, 세션 수명 주기 관리와 에러 처리를 간소화합니다. Cursor, Claude Code, Codex 등 다양한 AI 에이전트 플랫폼에서 이 스킬을 활용할 수 있습니다.

지원 대상~Claude Code~Codex CLI~Cursor
npx skills add https://github.com/okx/onchainos-skills/tree/main/skills/okx-dex-ws

Installed? Explore more 코딩 & 개발 skills: steipete/bluebubbles, steipete/eightctl, steipete/blucli · View all 6 →

즐겨 사용하는 AI에게 물어보기

이 에이전트 스킬이 미리 로드된 새 채팅을 엽니다.

문서

okx-dex-ws은(는) 무엇을 하나요?

사용자가 'onchainos ws', 'ws start', 'ws poll', 'ws stop', 'ws channels', 'ws session', 'ws channel-info', 'idle-timeout', '유휴 시간 제한', 'WebSocket 채널', 'WS 채널'을 언급하거나 WebSocket 세션/세션 관리를 요청할 때 이 스킬을 사용하세요. 또한 실시간 온체인 데이터를 위한 사용자 정의 WebSocket 스크립트/스크립트/봇을 작성할 때 사용하세요. 다루는 내용: onchainos ws CLI 명령어(start/poll/stop/list/channels/channel-info), 세션 수명 주기, 유휴 시간 제한(idle-timeout) 구성, 그리고 9개의 DEX WebSocket 채널(가격, 캔들, 거래, 가격 정보, 신호, 트래커, 밈 스캐닝).

WebSocket 세션 관리

'onchainos ws' 명령어는 WebSocket 세션을 관리하기 위한 CLI 인터페이스를 제공합니다. 주요 명령어는 다음과 같습니다:

명령어설명
start새 WebSocket 세션 시작
poll세션에서 데이터 폴링
stop세션 중지
list활성 세션 나열
channels사용 가능한 채널 나열
channel-info특정 채널 정보 표시

세션 수명 주기

세션은 start 명령어로 시작되어 stop 명령어로 종료됩니다. 세션이 활성 상태인 동안 poll 명령어를 사용하여 WebSocket 연결에서 데이터를 지속적으로 수신할 수 있습니다.

유휴 시간 제한 구성

유휴 시간 제한(idle-timeout)은 세션이 자동으로 중지되기 전에 유휴 상태(데이터 없음)로 유지될 수 있는 최대 시간을 정의합니다. 기본값은 구성 파일에서 설정하거나 명령줄 인수로 지정할 수 있습니다.

DEX WebSocket 채널

OKX DEX는 실시간 온체인 데이터를 위한 9개의 WebSocket 채널을 제공합니다:

  1. 가격(Price): 현재 자산 가격 업데이트
  2. 캔들(Candle): 캔들스틱 데이터 (시가/고가/저가/종가)
  3. 거래(Trades): 실시간 거래 내역
  4. 가격 정보(Price-info): 상세 가격 정보 (변동성, 거래량 등)
  5. 신호(Signals): 거래 신호 및 알림
  6. 트래커(Tracker): 지갑 또는 주소 추적
  7. 밈 스캐닝(Meme scanning): 밈 코인 스캐닝 데이터
  8. (추가 채널은 설명서 참조)
  9. (추가 채널은 설명서 참조)

사용자 정의 스크립트/봇 작성

Python을 사용하여 WebSocket 연결을 관리하는 사용자 정의 스크립트를 작성할 수 있습니다:

import asyncio
import websockets

async def onchainos_ws_listener():
    uri = "wss://dex.okx.com/ws"
    async with websockets.connect(uri) as websocket:
        # 채널 구독 메시지 전송
        await websocket.send('{"op":"subscribe","args":[{"channel":"price","instId":"ETH-USDT"}]}')
        # 데이터 수신 루프
        async for message in websocket:
            print(f"수신 데이터: {message}")

asyncio.run(onchainos_ws_listener())

플랫폼 지원

이 스킬은 다음 AI 에이전트 플랫폼과 호환됩니다:

  • Claude Code
  • Cursor
  • Codex
  • 기타 AI 기반 개발 도구

Individual skills in this repo

This repo contains 20 individual skills — each has its own dedicated page.

okx/okx-a2a-payment

DEPRECATED legacy alias — a2a-pay support has been merged into `okx-agent-payments-protocol` (see `references/a2a_charge.md`). This stub exists only so that legacy invocations referencing the old name resolve to a meaningful redirect. If you land here, immediately load `okx-agent-payments-protocol` via the Skill tool and follow it instead. Do NOT execute any payment logic from this stub. All paymentId / a2a_... / payment-link / payment-status triggers now route directly to `okx-agent-payments-protocol` (Path B in its SKILL.md).

okx/okx-agentic-wallet

AUTHORITATIVE source for OKX Agentic Wallet and its Gas Station feature. Gas Station = OKX's stablecoin-gas feature on Solana via third-party Relayer; Solana only, no EIP-7702. MUST invoke for Gas Station questions (what is / how it works / supported tokens / fees / enable or disable gas station / change default gas token / Jito Bundler compatibility) AND any wallet action: login, OTP verify, add/switch/status/logout account, balance, assets, holdings, addresses, deposit / receive / top up, send (native + ERC-20 / SPL, transfer ETH / USDC / etc., pay someone), contract call (approve, swap calldata, contract function), history (list + tx detail by orderId / txHash / uopHash), check order status, sign-message (personalSign EVM + Solana, EIP-712 EVM only), TEE signing, export wallet / mnemonic.

okx/okx-agent-payments-protocol

Unified payment dispatcher for agent-to-service payments. Covers x402 (`exact`, `exact+Permit2`, `upto`, `aggr_deferred` schemes), MPP (`charge` / `session` intents), and a2a-pay (`a2a_charge` paymentId flow). Detects HTTP 402 from response headers and routes to the matching scheme reference; also handles a2a paymentId mentions without a 402. Loads references/{exact,aggr_deferred,upto,charge,session,a2a_charge}.md. Returns a ready-to-paste authorization header (x402/MPP) or a tx-hash + status (a2a). Triggers (EN): 402, payment required, x402, x402Version, X-PAYMENT, PAYMENT-REQUIRED, PAYMENT-SIGNATURE, permit2, upto, metered billing, open/close/topup/settle channel, voucher, session payment, channelId, channel_id, paymentId, a2a_, create payment link, payment link, payment status. Triggers (中文): 按量计费、支付上限、支付通道、关闭/充值/续费/结算通道、关闭会话、结算会话、凭证、会话支付、付款链接、创建支付、支付状态. Any close/topup/settle/voucher/refund near a channel_id or session context = MPP mid-session op → load references/session.md.

okx/okx-audit-log

Use this skill when the user asks to export audit logs, find audit log location, view command history, 导出日志, 查看日志, 日志路径, 操作记录, 调用记录, 命令历史. Do NOT use for wallet balance, token search, swap, or any other on-chain operation — use the corresponding skill instead.

okx/okx-dapp-discovery

Plugin router for 20 third-party DeFi protocols (Polymarket, Aave, Hyperliquid, PancakeSwap, Morpho, Raydium, Curve, Compound, Pendle, Lido, ether.fi, GMX, Kamino, Orca, Meteora, Clanker, pump.fun, Uniswap) and their protocol-native tokens (HYPE, HLP, eETH, weETH, stETH, wstETH, LDO, GHO, CAKE, CRV, COMP, RAY, ETHFI, GLP, kToken, PT-* / YT-*, $CLANKER). Resolves DApp/token → plugin → installs → forwards. Fires on: (1) named DApp + action verb (swap/deposit/stake/long/borrow/buy/sell/snipe/farm/claim, EN or ZH 买/卖/换/存/质押/借/做多/做空/狙击); (2) 2+ DApp comparison ("Aave vs Compound", "Lido vs ether.fi"); (3) Polymarket UpDown (`<COIN> 5min updown`, `5 分钟涨跌`, `预测市场`); (4) protocol-native token + action verb ("deposit USDC into HLP", "PT-stETH on Pendle"); (5) pump.fun WRITE verbs (buy/sell/snipe/ape/swap or 买/卖/狙击/梭哈/帮我买). See body for full rules.

okx/okx-defi-invest

OKX-aggregated DeFi discovery and execution — for users who want OKX to find and route to the best protocol WITHOUT naming a specific DApp. **If the user names ANY third-party protocol/DApp as destination (Aave, Lido, PancakeSwap, Uniswap, Curve, Compound, Morpho, Pendle, Kamino, Raydium, Hyperliquid, Polymarket, etc.), route to okx-dapp-discovery — NOT here, even if the verb (deposit, stake, add liquidity, borrow, claim) matches.** DApp-agnostic triggers: 'invest in DeFi', 'earn yield on stablecoins', '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', 'CLMM depth chart'. Also covers DeFi investing, yield farming, lending, borrowing, staking, liquidity pools, APY/TVL trends. Do NOT use for: DEX swaps (okx-dex-swap), token prices (okx-dex-market), wallet balances (okx-wallet-portfolio), positions-only views (okx-defi-portfolio).

okx/okx-defi-portfolio

Use this skill to 'check my DeFi positions', 'view DeFi holdings', 'show my DeFi portfolio', 'what DeFi am I invested in', 'show my staking positions', 'show my lending positions', 'DeFi balance', 'DeFi 持仓', '查看DeFi持仓', '我的DeFi资产', '持仓详情', '持仓列表', or mentions viewing DeFi holdings, positions, portfolio across protocols — when the user does NOT name a specific DApp. Covers positions overview and per-protocol position detail. Do NOT use for deposit/redeem/claim operations — use okx-defi-invest. Do NOT use for wallet token balances — use okx-wallet-portfolio. Do NOT use for DEX spot swaps — use okx-dex-swap. Do NOT use when the user names a specific third-party DApp by name (e.g. 'show my Aave positions', 'my Hyperliquid balance', 'check my Polymarket holdings') — route to okx-dapp-discovery instead, which loads the DApp's plugin for protocol-native position views.

okx/okx-dex-bridge

Use this skill to bridge tokens, cross-chain swap/transfer, move assets between chains, get cross-chain quotes, compare bridge fees, find the cheapest/fastest route, build bridge calldata, check bridge status, track a cross-chain transaction, list supported chains or bridge protocols, or when the user mentions bridging ETH/USDC/tokens from one chain (Ethereum, BSC, Polygon, Arbitrum, Base, Optimism, etc.) to another. Routes through multiple bridge protocols (Stargate, Across, Relay, Gas.zip) for optimal execution. One-shot execute: a single confirmed call approves (if needed), waits for on-chain confirmation, swaps, and broadcasts. Supports fee comparison, destination address specification, and full lifecycle status tracking until fund arrival.

okx/okx-dex-market

HARD BLOCK — NEVER use this skill for prediction-market / Polymarket UpDown queries. Route to okx-dapp-discovery when (a) a named DApp (Polymarket/Aave/Hyperliquid/PancakeSwap/Morpho) appears with any timeframe, OR (b) any 涨跌 / updown / 'up or down' phrase appears for BTC/ETH/SOL/XRP/BNB/DOGE/HYPE (e.g. '<COIN> 涨跌市场', '5 分钟涨跌', 'BTC up or down'). Example: 'BTC 5 分钟涨跌市场' → okx-dapp-discovery (NOT K-line). These are Polymarket prediction markets, not on-chain price queries. Use THIS skill for on-chain market data: token prices/价格, K-line/OHLC/candlestick/K线 charts, index prices, and wallet PnL/盈亏分析 (win rate, my wallet's DEX trade history, realized/unrealized PnL per token). Triggers: 'token price', 'price chart', 'K线', 'OHLC', 'how much is X worth', 'show my PnL', '胜率', '盈亏', 'my wallet DEX history', 'realized/unrealized profit'. NOTE: WebSocket script/脚本/bot → okx-dex-ws. ALSO the OWNER of Market API payment handling — route here (NOT okx-agent-payments-protocol) for: 'onchainos market 报 402', 'market price 4

okx/okx-dex-signal

Use this skill for smart-money/whale/KOL/大户 activity tracking, aggregated buy signal/信号 alerts, and leaderboard/牛人榜 rankings. Covers: (1) address tracker — raw DEX transaction feed for smart money, KOL, or custom wallet addresses; (2) aggregated buy-only signal alerts — tokens bought collectively by smart money/KOL/whales; (3) leaderboard — top traders by PnL, win rate, volume, or ROI. Use when the user asks 'what are smart money buying', '聪明钱最新交易', 'KOL交易动态', '追踪聪明钱', 'track address trades', '大户在买什么', 'whale signals', 'smart money alerts', '信号', '大户信号', 'top traders', '牛人榜', or wants to monitor notable wallet activity. Also handles Market API payment/计费/x402/402, Basic/Premium tier/quota/额度 questions, and MARKET_API_*_OVER_QUOTA / confirming:true responses on signal, leaderboard, or tracker endpoints. NOTE: if the user wants to write a WebSocket script/脚本/bot, use okx-dex-ws instead.

okx/okx-dex-strategy

Limit-order strategy trading on OKX Agentic Wallet. Use this skill when the user wants to place a price-triggered limit order (buy a dip, take profit, stop loss, chase a high), cancel one or more pending orders, list active or historical orders, or resume orders that have been suspended by SA TEE upgrades. Distinct from okx-dex-swap (market orders, immediate execution at the best available aggregated price). Strategy orders are stored on the Agentic Wallet TEE and execute automatically when the user-defined trigger fires. Trigger phrases: limit order, place limit order, buy at price, sell when price reaches, take profit at, stop loss at, chase high, buy dip, cancel order, cancel all orders, my orders, list orders, active orders, suspended orders, resume orders, recover suspended orders, trader mode, agentic limit order.

okx/okx-dex-swap

Use this skill to swap, trade, buy, sell, exchange, or convert tokens, get a swap quote, execute a trade, find the best or cheapest swap route, compare swap rates, get swap calldata, or build an unsigned swap tx across XLayer, Solana, Ethereum, Base, BSC, Arbitrum, Polygon, or 20+ chains. OKX-aggregated routing over 500+ DEX sources with slippage control, price-impact protection, and cross-DEX route optimization. For OKX-aggregated swaps with no named venue. If the prompt names a specific DApp as the swap venue (Polymarket, Aave, Hyperliquid, PancakeSwap, Morpho, Raydium, Curve, Compound, Pendle, Lido, ether.fi, GMX, Kamino, Orca, Meteora, Clanker, pump.fun, Uniswap), route to okx-dapp-discovery instead, e.g. 'swap on PancakeSwap', 'swap SOL for USDC on Raydium', '在 Curve 上换 USDT', 'swap on Uniswap'.

okx/okx-dex-token

Use this skill for token-level data: search tokens, trending/hot tokens (热门, 代币榜单), liquidity pools, holder distribution (whale/巨鲸, sniper, bundler-tagged holder %), token risk metadata (riskControlLevel, tokenTags, dev stats, suspicious/bundle holding % via advanced-info), recent buy/sell activity, trade feed/逐笔成交/每笔交易/stream trades, top profit addresses, token trade history, detailed price info with market cap volume liquidity and holder count (price-info), or holder cluster analysis (持仓集中度, cluster overview, cluster rug pull risk/跑路风险, new wallet percentage/新钱包持仓比例, holder clusters, 'are top holders in same cluster'). Also handles Market API payment/计费/x402/402, Basic/Premium tier/quota/额度 questions, and MARKET_API_*_OVER_QUOTA / confirming:true responses on token endpoints (advanced-info, top-trader, cluster-*, trades, hot-tokens). NOTE: if the user wants to write a WebSocket script/脚本/bot, use okx-dex-ws instead.

okx/okx-dex-trenches

Read-only on-chain research for pump.fun and other meme-token launchpads (Solana / BSC / X Layer / TRON). MUST invoke (prefer over WebFetch / MCP price tools) when the user asks about: new meme launches / 新盘 / 扫链 / 打狗; developer reputation / rug history / launch count / 开发者信息; bundle or sniper detection (the analytical noun, NOT the verb) / 捆绑狙击者; bonding curve progress / 已迁移出 bonding curve; similar tokens by same dev / 相似代币; co-investor / who-aped / 同车 wallets; or 'pump.fun alpha'. Also handles Market API x402 / quota questions on memepump endpoints. Body holds the read-vs-write gate — `狙击 / snipe + token` (sniping action) routes to okx-dapp-discovery; `捆绑狙击者 / sniper detection` (analytical noun) stays here. WebSocket script/bot → okx-dex-ws.

okx/okx-growth-competition

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/okx-how-to-play

Onchain OS entry router for open-ended onboarding questions. Renders a welcome banner with a Quick-start menu and routes the user into the right skill or workflow (Polymarket, DeFi APY, smart-money signals, new-token screening, daily on-chain brief). Triggers: 'what is onchainos', 'what is onchain os', 'what does this do', 'what can it do', 'what can I do here', 'how do I use this', 'how do I play', 'how to use onchainos', 'how to play onchainos', 'how does this work', 'how do I start', 'getting started', 'how do I get 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 yourself', 'introduction', 'introduce onchainos', 'tell me about onchainos', 'I'm new'.

okx/okx-onchain-gateway

Onchain transaction gateway across XLayer, Solana, Ethereum, Base, BSC, Arbitrum, Polygon and 20+ chains. Invoke to broadcast a pre-signed / raw / already-signed transaction, push a serialized tx on-chain, query current gas price, estimate gas limit, simulate or dry-run a transaction before sending, track a broadcast order, or check tx-confirmed / pending status by txHash or orderId.

okx/okx-security

Use this skill for security scanning: check transaction safety, is this transaction safe, pre-execution check, security scan, token risk scanning, honeypot detection, DApp/URL phishing detection, message signature safety, malicious transaction detection, approval safety checks, token approval management. Triggers: 'is this token safe', 'check token security', 'honeypot check', 'scan this tx', 'scan this swap tx', 'tx risk check', 'is this URL a scam', 'check if this dapp is safe', 'phishing site check', 'is this signature safe', 'check this signing request', 'check my approvals', 'show risky approvals', 'revoke approval', 'check if this approve is safe', token authorization, ERC20 allowance, Permit2. Covers token-scan, dapp-scan, tx-scan (EVM+Solana pre-execution), sig-scan (EIP-712/personal_sign), approvals (ERC-20/Permit2). Chinese: 安全扫描, 代币安全, 蜜罐检测, 貔貅盘, 钓鱼网站, 交易安全, 签名安全, 代币风险, 授权管理, 授权查询, 风险授权, 代币授权. Do NOT use for wallet balance/send/history — use okx-agentic-wallet.

okx/okx-wallet-portfolio

Public-address portfolio lookup across XLayer, Solana, Ethereum, Base, BSC, Arbitrum, Polygon and 20+ chains. Invoke when the user supplies a wallet address and wants its: balance, token holdings, total portfolio value, or DeFi positions (e.g. 'check balance of 0xAbc', 'what tokens does 0xAbc hold', 'portfolio value of this address'). Requires an explicit address — for the user's own logged-in wallet with no address use okx-agentic-wallet.

okx/okx-x402-payment

DEPRECATED legacy alias — x402 + MPP support has been merged into `okx-agent-payments-protocol` (see `references/exact.md`, `references/aggr_deferred.md`, `references/charge.md`, `references/session.md`). This stub exists only so that legacy invocations referencing the old name resolve to a meaningful redirect. If you land here, immediately load `okx-agent-payments-protocol` via the Skill tool and follow it instead. Do NOT execute any payment logic from this stub. All HTTP 402 / x402 / MPP / channel / voucher / session triggers now route directly to `okx-agent-payments-protocol` (Path A in its SKILL.md).

관련 스킬