internet-court/internet-court-skill / vendored/okx/okx-dex-market
okx-dex-market
VerifiedHARD 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.
references/ws-troubleshooting.md
View on GitHub# Capability: WS — Troubleshooting
Error handling and edge cases for the WS capability. Operational flow lives in `ws.md`.
## Edge Cases
- **`ws poll` returns no events**: not an error — there are simply no new events since the last poll. For low-traffic channels (e.g. a single token's `trades`), gaps of minutes are normal. Poll again later rather than restarting the session.
- **Session not found on `ws poll` / `ws stop`**: the session likely hit its idle-timeout (default `30m` without a poll) and auto-stopped. Run `onchainos ws list` to see live sessions; restart with `ws start` if needed. For long-gap monitoring, pass a larger `--idle-timeout` (`1h`, `2h`) or `0` to disable.
- **Missing required parameter on `ws start`**: each channel has its own required params (see the Channel Quick Reference in `ws.md`) — `--token-pair` for per-token channels, `--chain-index` for per-chain channels, `--wallet-addresses` for the address tracker. `--token-pair` format is `chainIndex:tokenContractAddress`.
- **`--wallet-addresses` cap**: max 200 addresses per session — split larger sets across sessions.
- **Custom script cannot connect / auth fails**: verify the endpoint is `wss://wsdex.okx.com/ws/v6/dex`, HMAC-SHA256 login is performed before subscribing, and a `"ping"` heartbeat is sent every 25s (server closes idle unauthenticated connections). Full protocol per channel group: the `*-ws-protocol.md` files listed in `ws.md`.
- **Events stop after ~30s of connection in a custom script**: almost always a missing heartbeat — send `"ping"` every 25s and expect `"pong"`.
## 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.
Related skills
| Skill | Stars | Updated | Works with | Status | Install |
|---|---|---|---|---|---|
| receiving-code-reviewobra/superpowersUse when receiving code review feedback, before implementing suggestions, especially if feedback seems unclear or technically questionable - requires technical rigor and verification, not performative agreement or blind implementation | Stars: 323k | Updated | Claude CodeCodex | Verified | Install |
| requesting-code-reviewobra/superpowersUse when completing tasks, implementing major features, or before merging to verify work meets requirements | Stars: 323k | Updated | Claude CodeCodex | Verified | Install |
| using-git-worktreesobra/superpowersUse when starting feature work that needs isolation from current workspace or before executing implementation plans - ensures an isolated workspace exists via native tools or git worktree fallback | Stars: 323k | Updated | Claude CodeCodex | Verified | Install |
| verification-before-completionobra/superpowersUse when about to claim work is complete, fixed, or passing, before committing or creating PRs - requires running verification commands and confirming output before making any success claims; evidence before assertions always | Stars: 323k | Updated | Claude CodeCodex | Verified | Install |